AP_Periph: allow safety LED as backup main LED for DNA

This commit is contained in:
Andrew Tridgell 2021-05-07 11:48:09 +10:00
parent 5a7e870cfb
commit a23e821f94
1 changed files with 3 additions and 0 deletions

View File

@ -1175,6 +1175,9 @@ static void can_wait_node_id(void)
// blink LED in recognisable pattern while waiting for DNA
#ifdef HAL_GPIO_PIN_LED
palWriteLine(HAL_GPIO_PIN_LED, (led_pattern & (1U<<led_idx))?1:0);
#elif defined(HAL_GPIO_PIN_SAFE_LED)
// or use safety LED if defined
palWriteLine(HAL_GPIO_PIN_SAFE_LED, (led_pattern & (1U<<led_idx))?1:0);
#else
(void)led_pattern;
(void)led_idx;