Skip to content

Commit 45a0c6d

Browse files
committed
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>
1 parent bd5152c commit 45a0c6d

File tree

1 file changed

+3
-3
lines changed
  • ports/stm32/mboot

1 file changed

+3
-3
lines changed

ports/stm32/mboot/ui.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static led0_state_t led0_cur_state = LED0_STATE_OFF;
6767
static uint32_t led0_ms_interval = 0;
6868
static int led0_toggle_count = 0;
6969

70-
MP_WEAK void led_init(void) {
70+
void led_init(void) {
7171
#if defined(MBOOT_BOARD_LED_INIT)
7272
// Custom LED init function provided by the board.
7373
MBOOT_BOARD_LED_INIT();
@@ -88,7 +88,7 @@ MP_WEAK void led_init(void) {
8888
led0_cur_state = LED0_STATE_OFF;
8989
}
9090

91-
MP_WEAK void led_state(uint32_t led, int val) {
91+
static void led_state(uint32_t led, int val) {
9292
#if defined(MBOOT_BOARD_LED_STATE)
9393
// Custom LED state function provided by the board.
9494
return MBOOT_BOARD_LED_STATE(led, val);
@@ -115,7 +115,7 @@ void led_state_all(unsigned int mask) {
115115
#endif
116116
}
117117

118-
void led0_state(led0_state_t state) {
118+
static void led0_state(led0_state_t state) {
119119
led0_cur_state = state;
120120
if (state == LED0_STATE_OFF || state == LED0_STATE_ON) {
121121
led_state(LED0, state);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy