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:
Old-Ding 2026-07-06 10:29:38 +08:00 committed by Xiang Xiao
parent bab2b4a5f2
commit d81c8bc923
2 changed files with 2 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;
}