configs/nucleo-l432kc/src: Fix some bogus logic noted by Fanda.

This commit is contained in:
Gregory Nutt 2018-01-15 18:22:29 -06:00
parent e238c8b090
commit a30ccce7ce

View File

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