1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

boards/msba2: add default MTD backend

This commit is contained in:
Benjamin Valentin 2020-09-04 00:46:40 +02:00
parent 00bbacc7e8
commit 07dc9cc53b
3 changed files with 25 additions and 0 deletions

View File

@ -6,3 +6,10 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += ltc4150
USEMODULE += sht11
endif
# default to mtd_mci if no other MTD backend is selected
ifneq (,$(filter mtd,$(USEMODULE)))
ifeq (,$(filter mtd_%,$(USEMODULE)))
USEMODULE += mtd_mci
endif
endif

View File

@ -26,9 +26,16 @@
#include "board.h"
#include "cpu.h"
#include "mtd.h"
#include "periph/init.h"
#include "stdio_base.h"
#ifdef MODULE_MTD_MCI
extern const mtd_desc_t mtd_mci_driver;
static mtd_dev_t _mtd_mci = { .driver = &mtd_mci_driver };
mtd_dev_t *mtd0 = &_mtd_mci;
#endif
void board_init(void)
{
/* LEDS */

View File

@ -20,6 +20,7 @@
#define BOARD_H
#include "lpc23xx.h"
#include "mtd.h"
#include "bitarithm.h"
#ifdef __cplusplus
@ -45,6 +46,16 @@ extern "C" {
#define LED1_TOGGLE (FIO3PIN ^= LED1_MASK)
/** @} */
/**
* @name MTD configuration
* @{
*/
#ifdef MODULE_MTD_MCI
extern mtd_dev_t *mtd0;
#define MTD_0 mtd0
#endif
/** @} */
#ifdef __cplusplus
}
#endif