stm32/mboot: Allow overriding led_init and led_state in board folder.

Allows for custom functions/logic to display mboot state.
This commit is contained in:
Andrew Leech 2020-02-24 17:59:32 +11:00 committed by Damien George
parent 2966d83a65
commit 03b1ed80e7
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}