aboutsummaryrefslogtreecommitdiffstats
path: root/boards/ST_STM8L_DISCOVERY
diff options
context:
space:
mode:
Diffstat (limited to 'boards/ST_STM8L_DISCOVERY')
-rw-r--r--boards/ST_STM8L_DISCOVERY/board.c11
-rw-r--r--boards/ST_STM8L_DISCOVERY/board.h4
2 files changed, 7 insertions, 8 deletions
diff --git a/boards/ST_STM8L_DISCOVERY/board.c b/boards/ST_STM8L_DISCOVERY/board.c
index c7c44809e..b46bf007d 100644
--- a/boards/ST_STM8L_DISCOVERY/board.c
+++ b/boards/ST_STM8L_DISCOVERY/board.c
@@ -25,6 +25,7 @@
* @details Digital I/O ports static configuration as defined in @p board.h.
* This variable is used by the HAL when initializing the PAL driver.
*/
+#if HAL_USE_PAL || defined(__DOXYGEN__)
ROMCONST PALConfig pal_default_config =
{
{
@@ -36,6 +37,7 @@ ROMCONST PALConfig pal_default_config =
{VAL_GPIOFODR, 0, VAL_GPIOFDDR, VAL_GPIOFCR1, VAL_GPIOFCR2},
}
};
+#endif
/*
* TIM 2 clock after the prescaler.
@@ -44,14 +46,9 @@ ROMCONST PALConfig pal_default_config =
#define TIM2_ARR ((TIM2_CLOCK / CH_FREQUENCY) - 1)
/*
- * Board initialization code.
+ * Board-specific initialization code.
*/
-void hwinit(void) {
-
- /*
- * HAL initialization.
- */
- halInit();
+void boardInit(void) {
/*
* TIM2 initialization as system tick.
diff --git a/boards/ST_STM8L_DISCOVERY/board.h b/boards/ST_STM8L_DISCOVERY/board.h
index 3355c28c9..4dfb28ca4 100644
--- a/boards/ST_STM8L_DISCOVERY/board.h
+++ b/boards/ST_STM8L_DISCOVERY/board.h
@@ -157,12 +157,14 @@
} \
}
+#if !defined(_FROM_ASM_)
#ifdef __cplusplus
extern "C" {
#endif
- void hwinit(void);
+ void boardInit(void);
#ifdef __cplusplus
}
#endif
+#endif /* _FROM_ASM_ */
#endif /* _BOARD_H_ */