Commit 45a0c6da authored by Damien George's avatar Damien George

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: default avatarDamien George <damien@micropython.org>
parent bd5152c9
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment