mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/mcb2388: add default MTD backend
This commit is contained in:
parent
f738ac66d3
commit
00bbacc7e8
@ -2,3 +2,10 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_adc
|
||||
USEMODULE += saul_gpio
|
||||
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
|
||||
|
@ -22,9 +22,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 */
|
||||
|
@ -20,6 +20,7 @@
|
||||
#define BOARD_H
|
||||
|
||||
#include "lpc23xx.h"
|
||||
#include "mtd.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -104,6 +105,16 @@ extern "C" {
|
||||
GPIO_UNDEF, GPIO_UNDEF }
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name MTD configuration
|
||||
* @{
|
||||
*/
|
||||
#ifdef MODULE_MTD_MCI
|
||||
extern mtd_dev_t *mtd0;
|
||||
#define MTD_0 mtd0
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user