Skip to content

Commit 67baf6e

Browse files
committed
workaround: prevent build issue with missing PinMap_SD* for SDMMC
This commit is a workaround waiting update of the core to specify which target have or not SDMMC signals. Signed-off-by: Frederic Pillon <[email protected]>
1 parent e7516f1 commit 67baf6e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Diff for: src/bsp_sd.h

+22
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,28 @@ Please update the core or install previous library version."
9090
#define GPIO_PIN_All GPIO_PIN_ALL
9191
#endif
9292

93+
/* Workaround while core does not defined *_NA for SDMMCx signals availability */
94+
#if defined(SDMMC1) || defined(SDMMC2)
95+
#if defined(STM32L4P5xx) || defined(STM32L4Q5xx) || defined(STM32L4R5xx) || defined(STM32L4R7xx) ||\
96+
defined(STM32L4R9xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx)
97+
#define STM32L4xx_PLUS
98+
#endif
99+
#if defined(STM32F7xx) || (defined(STM32L4xx) && !defined(STM32L4xx_PLUS))
100+
#if !defined(SDMMC_CKIN_NA)
101+
#define SDMMC_CKIN_NA
102+
#endif
103+
#if !defined(SDMMC_CDIR_NA)
104+
#define SDMMC_CDIR_NA
105+
#endif
106+
#if !defined(SDMMC_D0DIR_NA)
107+
#define SDMMC_D0DIR_NA
108+
#endif
109+
#if !defined(SDMMC_D123DIR_NA)
110+
#define SDMMC_D123DIR_NA
111+
#endif
112+
#endif /* STM32F7xx || STM32L4xx_PLUS */
113+
#endif /* SDMMC1 || SDMMC2 */
114+
93115
/* Default SDx pins definitions */
94116
#ifndef SDX_D0
95117
#define SDX_D0 NUM_DIGITAL_PINS

0 commit comments

Comments
 (0)