diff options
Diffstat (limited to 'wirish')
-rw-r--r-- | wirish/boards.cpp | 10 | ||||
-rw-r--r-- | wirish/boards_private.h | 1 | ||||
-rw-r--r-- | wirish/stm32f2/boards_setup.cpp | 6 |
3 files changed, 16 insertions, 1 deletions
diff --git a/wirish/boards.cpp b/wirish/boards.cpp index 7616245..471325f 100644 --- a/wirish/boards.cpp +++ b/wirish/boards.cpp @@ -71,10 +71,18 @@ void init(void) { setup_adcs(); setup_timers(); wirish::priv::board_setup_usb(); + wirish::priv::series_init(); boardInit(); } -/* Provide a default boardInit(). */ +/* Provide a default no-op series_init() */ +namespace wirish { + namespace priv { + __weak void series_init(void) {} + } +} + +/* Provide a default no-op boardInit(). */ __weak void boardInit(void) { } diff --git a/wirish/boards_private.h b/wirish/boards_private.h index cdac844..4607913 100644 --- a/wirish/boards_private.h +++ b/wirish/boards_private.h @@ -59,6 +59,7 @@ namespace wirish { void board_setup_clock_prescalers(void); void board_setup_gpio(void); void board_setup_usb(void); + void series_init(void); } } diff --git a/wirish/stm32f2/boards_setup.cpp b/wirish/stm32f2/boards_setup.cpp index 9832bb7..d1ceac0 100644 --- a/wirish/stm32f2/boards_setup.cpp +++ b/wirish/stm32f2/boards_setup.cpp @@ -37,6 +37,7 @@ #include "boards_private.h" #include <libmaple/gpio.h> +#include <libmaple/syscfg.h> #include <wirish/wirish_types.h> // PLL configuration for 25 MHz external oscillator --> 120 MHz SYSCLK. @@ -85,5 +86,10 @@ namespace wirish { // Nothing to do. } + void series_init(void) { + // We need SYSCFG for external interrupts + syscfg_init(); + } + } } |