summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Leech <andrew.leech@planetinnovation.com.au>2020-02-24 17:59:32 +1100
committerDamien George <damien.p.george@gmail.com>2020-03-22 13:48:45 +1100
commit03b1ed80e76eb7b3f7dbab3fc8ee546f63fbd255 (patch)
tree562c492f71828d729e7bdff8a6b177d1c7e0a50b
parent2966d83a65be9fc3664a3d2ac46c4f081bd9b830 (diff)
stm32/mboot: Allow overriding led_init and led_state in board folder.
Allows for custom functions/logic to display mboot state.
-rw-r--r--ports/stm32/mboot/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/mboot/main.c b/ports/stm32/mboot/main.c
index 015800ce4..4d7a08ace 100644
--- a/ports/stm32/mboot/main.c
+++ b/ports/stm32/mboot/main.c
@@ -415,7 +415,7 @@ void mp_hal_pin_config_speed(uint32_t port_pin, uint32_t speed) {
#define LED3 MICROPY_HW_LED4
#endif
-void led_init(void) {
+MP_WEAK void led_init(void) {
mp_hal_pin_output(LED0);
mp_hal_pin_output(LED1);
#ifdef LED2
@@ -426,7 +426,7 @@ void led_init(void) {
#endif
}
-void led_state(int led, int val) {
+MP_WEAK void led_state(int led, int val) {
if (led == 1) {
led = LED0;
}