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:
Damien George 2022-06-02 13:32:10 +10:00
parent fae9205594
commit d84ebc31f7
2 changed files with 6 additions and 4 deletions

View File

@ -124,11 +124,11 @@ void board_mboot_led_init(void) {
void board_mboot_led_state(int led, int state) {
if (state) {
hub_display_set(28, 0x7fff);
hub_display_set(31, 0x7fff);
hub_display_set(28 + led, 0x7fff);
hub_display_set(31 + led, 0x7fff);
} else {
hub_display_set(28, 0);
hub_display_set(31, 0);
hub_display_set(28 + led, 0);
hub_display_set(31 + led, 0);
}
hub_display_update();
}

View File

@ -145,6 +145,8 @@
#define MBOOT_SPIFLASH_CONFIG (&board_mboot_spiflash_config)
#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_STATE board_mboot_led_state