mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
boards/waspmote-pro: make use of mtd_sdcard_default
This commit is contained in:
parent
b71b097be4
commit
b1feb0fd93
@ -17,13 +17,8 @@ config BOARD_WASPMOTE_PRO
|
|||||||
select HAS_PERIPH_SPI
|
select HAS_PERIPH_SPI
|
||||||
select HAS_PERIPH_TIMER
|
select HAS_PERIPH_TIMER
|
||||||
select HAS_PERIPH_UART
|
select HAS_PERIPH_UART
|
||||||
select HAS_SDCARD_SPI
|
|
||||||
|
|
||||||
select HAVE_MTD_SDCARD
|
|
||||||
select HAVE_SDCARD_SPI
|
|
||||||
|
|
||||||
|
select HAVE_MTD_SDCARD_DEFAULT
|
||||||
select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT
|
select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT
|
||||||
select MODULE_MTD if MODULE_VFS_DEFAULT
|
|
||||||
select MODULE_SDCARD_SPI if MODULE_MTD
|
|
||||||
|
|
||||||
source "$(RIOTKCONFIG)/Kconfig.ztimer_only"
|
source "$(RIOTKCONFIG)/Kconfig.ztimer_only"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
ifneq (,$(filter mtd,$(USEMODULE)))
|
ifneq (,$(filter mtd,$(USEMODULE)))
|
||||||
USEMODULE += mtd_sdcard
|
USEMODULE += mtd_sdcard_default
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# default to using fatfs on SD card
|
# default to using fatfs on SD card
|
||||||
|
@ -25,35 +25,6 @@
|
|||||||
#include "board.h"
|
#include "board.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
|
||||||
#if defined(MODULE_MTD_SDCARD)
|
|
||||||
#include "mtd_sdcard.h"
|
|
||||||
#include "sdcard_spi.h"
|
|
||||||
#include "sdcard_spi_params.h"
|
|
||||||
|
|
||||||
#if defined(MODULE_FATFS_VFS)
|
|
||||||
#include "fs/fatfs.h"
|
|
||||||
#include "vfs_default.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* this is provided by the sdcard_spi driver see drivers/sdcard_spi/sdcard_spi.c */
|
|
||||||
extern sdcard_spi_t sdcard_spi_devs[ARRAY_SIZE(sdcard_spi_params)];
|
|
||||||
|
|
||||||
mtd_sdcard_t mtd_sdcard_dev = {
|
|
||||||
.base = {
|
|
||||||
.driver = &mtd_sdcard_driver,
|
|
||||||
},
|
|
||||||
.sd_card = &sdcard_spi_devs[0],
|
|
||||||
.params = &sdcard_spi_params[0]
|
|
||||||
};
|
|
||||||
|
|
||||||
mtd_dev_t *mtd0 = (mtd_dev_t *)&mtd_sdcard_dev;
|
|
||||||
|
|
||||||
#if IS_USED(MODULE_FATFS_VFS)
|
|
||||||
VFS_AUTO_MOUNT(fatfs, VFS_MTD(mtd_sdcard_dev), VFS_DEFAULT_SD(0), 0);
|
|
||||||
#endif /* MODULE_FATFS_VFS */
|
|
||||||
|
|
||||||
#endif /* MODULE_MTD_SDCARD */
|
|
||||||
|
|
||||||
void board_init(void)
|
void board_init(void)
|
||||||
{
|
{
|
||||||
/* initialize UART_1 on AUX1 */
|
/* initialize UART_1 on AUX1 */
|
||||||
|
Loading…
Reference in New Issue
Block a user