diff --git a/tests/pkg/fatfs_vfs/main.c b/tests/pkg/fatfs_vfs/main.c index f7f4e4050d076..59856e535911a 100644 --- a/tests/pkg/fatfs_vfs/main.c +++ b/tests/pkg/fatfs_vfs/main.c @@ -62,11 +62,9 @@ static vfs_mount_t _test_vfs_mount = { .private_data = (void *)&fatfs, }; -#if defined(MODULE_MTD_NATIVE) || defined(MODULE_MTD_MCI) +#if defined(MODULE_MTD_NATIVE) || defined(MODULE_MTD_MCI) || defined(MODULE_MTD_SDMMC) /* mtd devices are provided in the board's board_init.c*/ -#endif - -#if defined(MODULE_MTD_SDCARD) +#elif defined(MODULE_MTD_SDCARD) #define SDCARD_SPI_NUM ARRAY_SIZE(sdcard_spi_params) extern sdcard_spi_t sdcard_spi_devs[SDCARD_SPI_NUM]; mtd_sdcard_t mtd_sdcard_devs[SDCARD_SPI_NUM]; @@ -398,20 +396,18 @@ static void test_libc(void) int main(void) { -#if MODULE_MTD_SDCARD +#if defined(MODULE_MTD_NATIVE) || defined(MODULE_MTD_MCI) + fatfs.dev = mtd_dev_get(0); +#elif defined(MODULE_MTD_SDMMC) + fatfs.dev = mtd_sdmmc_dev0; +#elif defined(MODULE_MTD_SDCARD) for(unsigned int i = 0; i < SDCARD_SPI_NUM; i++){ mtd_sdcard_devs[i].base.driver = &mtd_sdcard_driver; mtd_sdcard_devs[i].sd_card = &sdcard_spi_devs[i]; mtd_sdcard_devs[i].params = &sdcard_spi_params[i]; mtd_init(&mtd_sdcard_devs[i].base); } -#endif - -#if defined(MODULE_MTD_NATIVE) || defined(MODULE_MTD_MCI) - fatfs.dev = mtd_dev_get(0); -#endif -#if defined(MODULE_MTD_SDCARD) fatfs.dev = mtd_sdcard; #endif