configs/nucleo-* and configs/stm32l476vg-disco: Fix more stm32_userleds.c bogus logic
This commit is contained in:
parent
bb7703dc8c
commit
802f146781
@ -181,9 +181,9 @@ void board_userled_initialize(void)
|
||||
|
||||
void board_userled(int led, bool ledon)
|
||||
{
|
||||
if (led == 1)
|
||||
if (led == BOARD_LD2)
|
||||
{
|
||||
stm32f0_gpiowrite(GPIO_LD2, ldeon);
|
||||
stm32f0_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)
|
||||
{
|
||||
stm32f0_gpiowrite(GPIO_LD2, (ledset & BOARD_LD2_BIT) != 0);
|
||||
}
|
||||
stm32f0_gpiowrite(GPIO_LD2, (ledset & BOARD_LD2_BIT) != 0);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -181,9 +181,9 @@ void board_userled_initialize(void)
|
||||
|
||||
void board_userled(int led, bool ledon)
|
||||
{
|
||||
if (led == 1)
|
||||
if (led == BOARD_LD2)
|
||||
{
|
||||
stm32f0_gpiowrite(GPIO_LD2, ldeon);
|
||||
stm32f0_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)
|
||||
{
|
||||
stm32f0_gpiowrite(GPIO_LD2, (ledset & BOARD_LD2_BIT) != 0);
|
||||
}
|
||||
stm32f0_gpiowrite(GPIO_LD2, (ledset & BOARD_LD2_BIT) != 0);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -181,9 +181,9 @@ void board_userled_initialize(void)
|
||||
|
||||
void board_userled(int led, bool ledon)
|
||||
{
|
||||
if (led == 1)
|
||||
if (led == BOARD_LD2)
|
||||
{
|
||||
stm32_gpiowrite(GPIO_LD2, ldeon);
|
||||
stm32_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)
|
||||
{
|
||||
stm32_gpiowrite(GPIO_LD2, (ledset & BOARD_LD2_BIT) != 0);
|
||||
}
|
||||
stm32_gpiowrite(GPIO_LD2, (ledset & BOARD_LD2_BIT) != 0);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -181,9 +181,9 @@ void board_userled_initialize(void)
|
||||
|
||||
void board_userled(int led, bool ledon)
|
||||
{
|
||||
if (led == 1)
|
||||
if (led == BOARD_LD2)
|
||||
{
|
||||
stm32l4_gpiowrite(GPIO_LD2, ldeon);
|
||||
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);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -172,7 +172,7 @@ void board_userled_initialize(void)
|
||||
{
|
||||
/* Configure LD2 GPIO for output */
|
||||
|
||||
stm32_configgpio(GPIO_LD2);
|
||||
stm32l4_configgpio(GPIO_LD2);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -181,9 +181,9 @@ void board_userled_initialize(void)
|
||||
|
||||
void board_userled(int led, bool ledon)
|
||||
{
|
||||
if (led == 1)
|
||||
if (led == BOARD_LD2)
|
||||
{
|
||||
stm32_gpiowrite(GPIO_LD2, ldeon);
|
||||
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)
|
||||
{
|
||||
stm32_gpiowrite(GPIO_LD2, (ledset & BOARD_LD2_BIT) != 0);
|
||||
}
|
||||
stm32l4_gpiowrite(GPIO_LD2, (ledset & BOARD_LD2_BIT) != 0);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -192,11 +192,11 @@ void board_userled(int led, bool ledon)
|
||||
switch (led)
|
||||
{
|
||||
case BOARD_LED_RED:
|
||||
stm32l4_gpiowrite(GPIO_LED_RED, ldeon);
|
||||
stm32l4_gpiowrite(GPIO_LED_RED, ledon);
|
||||
break;
|
||||
|
||||
case BOARD_LED_GRN:
|
||||
stm32l4_gpiowrite(GPIO_LED_GRN, ldeon);
|
||||
stm32l4_gpiowrite(GPIO_LED_GRN, ledon);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user