diff options
author | Damien George <damien@micropython.org> | 2022-06-09 12:21:18 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-06-09 13:24:08 +1000 |
commit | 45a0c6da5b4170402a3491d39a1d75b5025526e2 (patch) | |
tree | bbff144e1434f219a6c75504d8fce51855f8a8d7 | |
parent | bd5152c928a4a0809eaa340e0f8ae788a949daea (diff) |
stm32/mboot: Remove MP_WEAK on led funcs and make some of them static.
Both led_init and led_state are configurable via MBOOT_BOARD_LED_INIT and
MBOOT_BOARD_LED_STATE respectively, so don't need to be MP_WEAK.
Furthermore, led_state and led0_state are private to ui.c so can be made
static.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r-- | ports/stm32/mboot/ui.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ports/stm32/mboot/ui.c b/ports/stm32/mboot/ui.c index 9924ecd0b..c1fea55da 100644 --- a/ports/stm32/mboot/ui.c +++ b/ports/stm32/mboot/ui.c @@ -67,7 +67,7 @@ static led0_state_t led0_cur_state = LED0_STATE_OFF; static uint32_t led0_ms_interval = 0; static int led0_toggle_count = 0; -MP_WEAK void led_init(void) { +void led_init(void) { #if defined(MBOOT_BOARD_LED_INIT) // Custom LED init function provided by the board. MBOOT_BOARD_LED_INIT(); @@ -88,7 +88,7 @@ MP_WEAK void led_init(void) { led0_cur_state = LED0_STATE_OFF; } -MP_WEAK void led_state(uint32_t led, int val) { +static void led_state(uint32_t led, int val) { #if defined(MBOOT_BOARD_LED_STATE) // Custom LED state function provided by the board. return MBOOT_BOARD_LED_STATE(led, val); @@ -115,7 +115,7 @@ void led_state_all(unsigned int mask) { #endif } -void led0_state(led0_state_t state) { +static void led0_state(led0_state_t state) { led0_cur_state = state; if (state == LED0_STATE_OFF || state == LED0_STATE_ON) { led_state(LED0, state); |