You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ut...@apache.org on 2018/03/19 16:37:33 UTC
[mynewt-core] 04/04: Fixed clock initialisation for mcu's where one
port is missing.
This is an automated email from the ASF dual-hosted git repository.
utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 420a06504b8446ae5fc25e80dc20c5ec7f8619ec
Author: Markus Lampert <ma...@bibi.ca>
AuthorDate: Sat Mar 17 22:14:42 2018 -0700
Fixed clock initialisation for mcu's where one port is missing.
---
hw/mcu/stm/stm32f3xx/src/hal_gpio.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/hw/mcu/stm/stm32f3xx/src/hal_gpio.c b/hw/mcu/stm/stm32f3xx/src/hal_gpio.c
index d63d29a..1d43a7a 100644
--- a/hw/mcu/stm/stm32f3xx/src/hal_gpio.c
+++ b/hw/mcu/stm/stm32f3xx/src/hal_gpio.c
@@ -187,54 +187,63 @@ hal_gpio_clk_enable(uint32_t port_idx)
__HAL_RCC_GPIOB_CLK_ENABLE();
}
break;
+#endif
#if HAL_GPIO_PORT_COUNT > 2
case 2:
if (!__HAL_RCC_GPIOC_IS_CLK_ENABLED()) {
__HAL_RCC_GPIOC_CLK_ENABLE();
}
break;
+#endif
#if HAL_GPIO_PORT_COUNT > 3
case 3:
if (!__HAL_RCC_GPIOD_IS_CLK_ENABLED()) {
__HAL_RCC_GPIOD_CLK_ENABLE();
}
break;
+#endif
#if HAL_GPIO_PORT_COUNT > 4 && defined GPIOE_BASE
case 4:
if (!__HAL_RCC_GPIOE_IS_CLK_ENABLED()) {
__HAL_RCC_GPIOE_CLK_ENABLE();
}
break;
+#endif
#if HAL_GPIO_PORT_COUNT > 5
case 5:
if (!__HAL_RCC_GPIOF_IS_CLK_ENABLED()) {
__HAL_RCC_GPIOF_CLK_ENABLE();
}
break;
+#endif
#if HAL_GPIO_PORT_COUNT > 6
case 6:
if (!__HAL_RCC_GPIOG_IS_CLK_ENABLED()) {
__HAL_RCC_GPIOG_CLK_ENABLE();
}
break;
+#endif
#if HAL_GPIO_PORT_COUNT > 7
case 7:
if (!__HAL_RCC_GPIOH_IS_CLK_ENABLED()) {
__HAL_RCC_GPIOH_CLK_ENABLE();
}
break;
+#endif
#if HAL_GPIO_PORT_COUNT > 8
case 8:
if (!__HAL_RCC_GPIOI_IS_CLK_ENABLED()) {
__HAL_RCC_GPIOI_CLK_ENABLE();
}
break;
+#endif
#if HAL_GPIO_PORT_COUNT > 9
case 9:
if (!__HAL_RCC_GPIOJ_IS_CLK_ENABLED()) {
__HAL_RCC_GPIOJ_CLK_ENABLE();
}
break;
+#endif
#if HAL_GPIO_PORT_COUNT > 10
case 10:
if (!__HAL_RCC_GPIOK_IS_CLK_ENABLED()) {
@@ -242,15 +251,6 @@ hal_gpio_clk_enable(uint32_t port_idx)
}
break;
#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
default:
assert(0);
break;
--
To stop receiving notification emails like this one, please contact
utzig@apache.org.