diff --git a/configs/nucleo-l432kc/src/stm32_userleds.c b/configs/nucleo-l432kc/src/stm32_userleds.c index 0ff3ce66c8..8dec7afee3 100644 --- a/configs/nucleo-l432kc/src/stm32_userleds.c +++ b/configs/nucleo-l432kc/src/stm32_userleds.c @@ -181,7 +181,7 @@ void board_userled_initialize(void) void board_userled(int led, bool ledon) { - if (led == 1) + if (led == BOARD_LD2) { stm32l4_gpiowrite(GPIO_LD2, ledon); } @@ -193,10 +193,7 @@ void board_userled(int led, bool ledon) void board_userled_all(uint8_t ledset) { - if (led == 1) - { - stm32l4_gpiowrite(GPIO_LD2, (ledset & BOARD_LD2_BIT) != 0); - } + stm32l4_gpiowrite(GPIO_LD2, (ledset & BOARD_LD2_BIT) != 0); } /****************************************************************************