summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-11-11 18:14:50 +1100
committerDamien George <damien@micropython.org>2020-11-11 21:47:13 +1100
commitb99300b53ecc8db1ced8d96953ba4eaf2026f069 (patch)
tree8131f7c0db422bfd79f42e1c35181868a6d8a8cc
parent4c3976bbcaf58266fdcaab264fee5b7a94a682e5 (diff)
downloadmicropython-b99300b53ecc8db1ced8d96953ba4eaf2026f069.tar.gz
micropython-b99300b53ecc8db1ced8d96953ba4eaf2026f069.zip
stm32/boardctrl: Define MICROPY_BOARD_EARLY_INIT alongside others.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/stm32/boardctrl.h4
-rw-r--r--ports/stm32/main.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/ports/stm32/boardctrl.h b/ports/stm32/boardctrl.h
index 05bade305c..6f79dfb890 100644
--- a/ports/stm32/boardctrl.h
+++ b/ports/stm32/boardctrl.h
@@ -28,6 +28,10 @@
#include "py/mpconfig.h"
+#ifndef MICROPY_BOARD_EARLY_INIT
+#define MICROPY_BOARD_EARLY_INIT()
+#endif
+
#ifndef MICROPY_BOARD_BEFORE_SOFT_RESET_LOOP
#define MICROPY_BOARD_BEFORE_SOFT_RESET_LOOP boardctrl_before_soft_reset_loop
#endif
diff --git a/ports/stm32/main.c b/ports/stm32/main.c
index c749cac978..db8222479b 100644
--- a/ports/stm32/main.c
+++ b/ports/stm32/main.c
@@ -385,10 +385,7 @@ void stm32_main(uint32_t reset_mode) {
__HAL_RCC_D2SRAM3_CLK_ENABLE();
#endif
-
- #if defined(MICROPY_BOARD_EARLY_INIT)
MICROPY_BOARD_EARLY_INIT();
- #endif
// basic sub-system init
#if defined(STM32WB)