mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
boards: tiva: Fix CC13xx red LED selection
Compare the requested LED id with BOARD_RLED instead of assigning it. BOARD_RLED is nonzero, so the assignment made every non-green LED request select the red LED instead of rejecting invalid ids. Generated-by: OpenAI Codex Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
This commit is contained in:
parent
bab2b4a5f2
commit
d81c8bc923
2 changed files with 2 additions and 2 deletions
|
|
@ -62,7 +62,7 @@ void board_userled(int led, bool ledon)
|
|||
{
|
||||
pinconfig = &g_gpio_gled;
|
||||
}
|
||||
else if (led = BOARD_RLED)
|
||||
else if (led == BOARD_RLED)
|
||||
{
|
||||
pinconfig = &g_gpio_rled;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ void board_userled(int led, bool ledon)
|
|||
{
|
||||
pinconfig = &g_gpio_gled;
|
||||
}
|
||||
else if (led = BOARD_RLED)
|
||||
else if (led == BOARD_RLED)
|
||||
{
|
||||
pinconfig = &g_gpio_rled;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue