From 7f65c67e187c1ef50f109ed4cb1b85365394d1f3 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Sun, 10 Sep 2023 10:08:59 +0200 Subject: [PATCH] fixup! drivers/mtd_default: use XFA with MTD pointers --- drivers/include/mtd_default.h | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/drivers/include/mtd_default.h b/drivers/include/mtd_default.h index cbeee64e74c70..671218635aed1 100644 --- a/drivers/include/mtd_default.h +++ b/drivers/include/mtd_default.h @@ -25,6 +25,47 @@ extern "C" { #endif +#if defined(MODULE_MTD_SDCARD_DEFAULT) +#include "mtd_sdcard.h" +#endif + +#if defined(MODULE_MTD_EMULATED) +#include "mtd_emulated.h" +#endif + +#if !DOXYGEN + +/** + * @brief Declare `mtd*` according to the `MTD_*` symbols defined by the board + */ +#ifdef MTD_0 +extern mtd_dev_t *MTD_0; +#endif +#ifdef MTD_1 +extern mtd_dev_t *MTD_1; +#endif +#ifdef MTD_2 +extern mtd_dev_t *MTD_2; +#endif +#ifdef MTD_3 +extern mtd_dev_t *MTD_3; +#endif +#ifdef MTD_4 +extern mtd_dev_t *MTD_4; +#endif +#ifdef MTD_5 +extern mtd_dev_t *MTD_5; +#endif +#endif /* !DOXYGEN */ + +#if defined(MODULE_MTD_SDCARD_DEFAULT) +extern mtd_sdcard_t mtd_sdcard_dev0; +#endif + +#if defined(MODULE_MTD_EMULATED) +extern mtd_emulated_t mtd_emulated_dev0; +#endif + /** * @brief Get the default MTD device by index *