diff --git a/drivers/include/sdmmc/sdmmc.h b/drivers/include/sdmmc/sdmmc.h index acf76b27a692b..0f0faa0bbec5a 100644 --- a/drivers/include/sdmmc/sdmmc.h +++ b/drivers/include/sdmmc/sdmmc.h @@ -1391,21 +1391,21 @@ typedef struct sdmmc_dev { * @brief SDIO/SD/MMC device descriptor references as read-only XFA * * The array contains the references to all SDIO/SD/MMC device descriptors. - * The i-th device in this array can then be accessed with `sdmmc_dev_xfa[i]`. + * The i-th device in this array can then be accessed with `sdmmc_devs[i]`. * The number of SDIO/SD/MMC device descriptor references defined in this array - * is `XFA_LEN(sdmmc_dev_xfa)`, see @ref SDMMC_NUMOF. + * is `XFA_LEN(sdmmc_devs)`, see @ref SDMMC_NUMOF. * * @warning To ensure to have the references to all SDIO/SD/MMC device * descriptors in this array, the low-level SDIO/SD/MMC peripheral * drivers must define the references to their SDIO/SD/MMC * device descriptors as XFA members by using the macro - * `XFA_CONST(sdmmc_dev_xfa, 0)` as shown in the example below. + * `XFA_CONST(sdmmc_devs, 0)` as shown in the example below. * * For example, if the low-level * SDIO/SD/MMC peripheral driver defines an MCU-specific SDIO/SD/MMC * device descriptor structure `_mcu_sdmmc_dev_t` and defines the device * descriptors in an array `_mcu_sdmmc_dev`, it must define the references - * to them as members of the XFA `sdmmc_dev_xfa` as follows: + * to them as members of the XFA `sdmmc_devs` as follows: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c} * typedef struct { * sdmmc_dev_t sdmmc_dev; // Inherited sdmmc_dev_t struct @@ -1413,7 +1413,7 @@ typedef struct sdmmc_dev { * ... * } _mcu_sdmmc_dev_t; * - * static _mcu_sdmmc_dev_t _sdmmc_devs[] = { + * static _mcu_sdmmc_dev_t _mcu_sdmmc_devs[] = { * { * ... * }, @@ -1422,27 +1422,27 @@ typedef struct sdmmc_dev { * }, * }; * - * XFA_CONST(sdmmc_dev_xfa, 0) sdmmc_dev_t * const _sdmmc_1 = (sdmmc_dev_t * const)&_sdmmc_devs[0]; - * XFA_CONST(sdmmc_dev_xfa, 0) sdmmc_dev_t * const _sdmmc_2 = (sdmmc_dev_t * const)&_sdmmc_devs[1]; + * XFA_CONST(sdmmc_devs, 0) sdmmc_dev_t * const _sdmmc_1 = (sdmmc_dev_t * const)&_mcu_sdmmc_devs[0]; + * XFA_CONST(sdmmc_devs, 0) sdmmc_dev_t * const _sdmmc_2 = (sdmmc_dev_t * const)&_mcu_sdmmc_devs[1]; * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * */ #if !DOXYGEN -XFA_USE_CONST(sdmmc_dev_t * const, sdmmc_dev_xfa); +XFA_USE_CONST(sdmmc_dev_t * const, sdmmc_devs); #else -sdmmc_dev_t sdmmc_dev_xfa[]; +sdmmc_dev_t sdmmc_devs[]; #endif /** * @brief Number of SDIO/SD/MMC devices defined */ -#define SDMMC_NUMOF XFA_LEN(sdmmc_dev_t *, sdmmc_dev_xfa) +#define SDMMC_NUMOF XFA_LEN(sdmmc_dev_t *, sdmmc_devs) /** * @brief Retrieve SDIO/SD/MMC device descriptor reference from device index * * The function converts the device index to the corresponding SDIO/SD/MMC - * device descriptor. See also @ref sdmmc_dev_xfa. + * device descriptor. See also @ref sdmmc_devs. * * @param[in] num SDIO/SD/MMC peripheral index * @@ -1452,7 +1452,7 @@ sdmmc_dev_t sdmmc_dev_xfa[]; */ static inline sdmmc_dev_t *sdmmc_get_dev(unsigned num) { - return (num < SDMMC_NUMOF) ? sdmmc_dev_xfa[num] : NULL; + return (num < SDMMC_NUMOF) ? sdmmc_devs[num] : NULL; } /** diff --git a/drivers/sdmmc/sdmmc.c b/drivers/sdmmc/sdmmc.c index dec61c62339aa..e5b910faf07d0 100644 --- a/drivers/sdmmc/sdmmc.c +++ b/drivers/sdmmc/sdmmc.c @@ -254,7 +254,7 @@ typedef struct __attribute__((packed)) { } sdmmc_sw_status_t; /* Definition of the XFA for the SDIO/SD/MMC device descriptor references */ -XFA_INIT_CONST(sdmmc_dev_t * const, sdmmc_dev_xfa); +XFA_INIT_CONST(sdmmc_dev_t * const, sdmmc_devs); /* forward declaration of internal functions */ static int _send_cmd(sdmmc_dev_t *dev, sdmmc_cmd_t cmd_idx, uint32_t arg,