This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new d81c8bc9236 boards: tiva: Fix CC13xx red LED selection
d81c8bc9236 is described below
commit d81c8bc92369d25973808c8ccd40ce6551f16260
Author: Old-Ding <[email protected]>
AuthorDate: Mon Jul 6 10:29:38 2026 +0800
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 <[email protected]>
---
boards/arm/tiva/launchxl-cc1310/src/cc1310_userleds.c | 2 +-
boards/arm/tiva/launchxl-cc1312r1/src/cc1312_userleds.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/boards/arm/tiva/launchxl-cc1310/src/cc1310_userleds.c
b/boards/arm/tiva/launchxl-cc1310/src/cc1310_userleds.c
index e3387dc34c1..75037ad43cb 100644
--- a/boards/arm/tiva/launchxl-cc1310/src/cc1310_userleds.c
+++ b/boards/arm/tiva/launchxl-cc1310/src/cc1310_userleds.c
@@ -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;
}
diff --git a/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_userleds.c
b/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_userleds.c
index 277712bed16..3904d2cee58 100644
--- a/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_userleds.c
+++ b/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_userleds.c
@@ -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;
}