diff --git a/flight/Bootloaders/BootloaderUpdater/pios_board.c b/flight/Bootloaders/BootloaderUpdater/pios_board.c index 93973b470..0b7cb9efc 100644 --- a/flight/Bootloaders/BootloaderUpdater/pios_board.c +++ b/flight/Bootloaders/BootloaderUpdater/pios_board.c @@ -35,6 +35,8 @@ #include void PIOS_Board_Init(void) { + const struct pios_board_info * bdinfo = &pios_board_info_blob; + /* Enable Prefetch Buffer */ FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable); @@ -42,8 +44,15 @@ void PIOS_Board_Init(void) { FLASH_SetLatency(FLASH_Latency_2); /* Delay system */ - PIOS_DELAY_Init(); - + PIOS_DELAY_Init(); + + /* LEDs */ +#if defined(PIOS_INCLUDE_LED) + const struct pios_led_cfg * led_cfg = PIOS_BOARD_HW_DEFS_GetLedCfg(bdinfo->board_rev); + PIOS_Assert(led_cfg); + PIOS_LED_Init(led_cfg); +#endif /* PIOS_INCLUDE_LED */ + /* Initialize the PiOS library */ PIOS_GPIO_Init(); }