summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/mphalport.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/mphalport.c')
-rw-r--r--stmhal/mphalport.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stmhal/mphalport.c b/stmhal/mphalport.c
index 82a345b8ad..7a86989ffd 100644
--- a/stmhal/mphalport.c
+++ b/stmhal/mphalport.c
@@ -104,15 +104,15 @@ void mp_hal_gpio_clock_enable(GPIO_TypeDef *gpio) {
} else if (gpio == GPIOH) {
__GPIOH_CLK_ENABLE();
#endif
- #ifdef __GPIOI_CLK_ENABLE
+ #if defined(GPIOI) && defined(__GPIOI_CLK_ENABLE)
} else if (gpio == GPIOI) {
__GPIOI_CLK_ENABLE();
#endif
- #ifdef __GPIOJ_CLK_ENABLE
+ #if defined(GPIOJ) && defined(__GPIOJ_CLK_ENABLE)
} else if (gpio == GPIOJ) {
__GPIOJ_CLK_ENABLE();
#endif
- #ifdef __GPIOK_CLK_ENABLE
+ #if defined(GPIOK) && defined(__GPIOK_CLK_ENABLE)
} else if (gpio == GPIOK) {
__GPIOK_CLK_ENABLE();
#endif