Browse Source

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>
pull/8714/head
Damien George 2 years ago
parent
commit
d84ebc31f7
  1. 8
      ports/stm32/boards/LEGO_HUB_NO6/board_init.c
  2. 2
      ports/stm32/boards/LEGO_HUB_NO6/mpconfigboard.h

8
ports/stm32/boards/LEGO_HUB_NO6/board_init.c

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

2
ports/stm32/boards/LEGO_HUB_NO6/mpconfigboard.h

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

Loading…
Cancel
Save