stm32/boards/LEGO_HUB_NO6: Use multi-colour LED for mboot status.
This gives more information to the user when doing updates from SPI flash. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
fae9205594
commit
d84ebc31f7
|
@ -124,11 +124,11 @@ void board_mboot_led_init(void) {
|
||||||
|
|
||||||
void board_mboot_led_state(int led, int state) {
|
void board_mboot_led_state(int led, int state) {
|
||||||
if (state) {
|
if (state) {
|
||||||
hub_display_set(28, 0x7fff);
|
hub_display_set(28 + led, 0x7fff);
|
||||||
hub_display_set(31, 0x7fff);
|
hub_display_set(31 + led, 0x7fff);
|
||||||
} else {
|
} else {
|
||||||
hub_display_set(28, 0);
|
hub_display_set(28 + led, 0);
|
||||||
hub_display_set(31, 0);
|
hub_display_set(31 + led, 0);
|
||||||
}
|
}
|
||||||
hub_display_update();
|
hub_display_update();
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,6 +145,8 @@
|
||||||
#define MBOOT_SPIFLASH_CONFIG (&board_mboot_spiflash_config)
|
#define MBOOT_SPIFLASH_CONFIG (&board_mboot_spiflash_config)
|
||||||
|
|
||||||
#define MBOOT_LED1 0
|
#define MBOOT_LED1 0
|
||||||
|
#define MBOOT_LED2 1
|
||||||
|
#define MBOOT_LED3 2
|
||||||
#define MBOOT_BOARD_LED_INIT board_mboot_led_init
|
#define MBOOT_BOARD_LED_INIT board_mboot_led_init
|
||||||
#define MBOOT_BOARD_LED_STATE board_mboot_led_state
|
#define MBOOT_BOARD_LED_STATE board_mboot_led_state
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue