Skip to content

Commit 80a9340

Browse files
committed
led: update kconfig
1 parent e0803ff commit 80a9340

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

main/Kconfig.projbuild

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ config ENABLE_LED
9797
bool "Enable LED"
9898
default y
9999
help
100-
Select this to enable LED.
100+
Select this to enable LED Output.
101101

102-
choice LED_MODE
103-
prompt "LED Mode"
104-
default LED_MODE_HIGH
102+
choice LED_ACTIVE_LEVEL
103+
prompt "LED Active Level"
104+
default LED_ACTIVE_HIGH
105105
depends on ENABLE_LED
106106
help
107-
Select LED Mode.
107+
Select LED Active Level.
108108

109-
config LED_MODE_HIGH
110-
bool "High level is on"
111-
config LED_MODE_LOW
112-
bool "Low level is on"
109+
config LED_ACTIVE_HIGH
110+
bool "Active High"
111+
config LED_ACTIVE_LOW
112+
bool "Active Low"
113113
endchoice
114114

115115
config LED_PIN

main/src/user/led.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ static void led_task_handle(void *pvParameter)
4040
xLastWakeTime = xTaskGetTickCount();
4141

4242
if (i++ % led_mode_table[led_mode_index][1]) {
43-
#ifdef CONFIG_LED_MODE_HIGH
44-
gpio_set_level(CONFIG_LED_PIN, 0);
45-
} else {
43+
#ifdef CONFIG_LED_ACTIVE_LOW
4644
gpio_set_level(CONFIG_LED_PIN, 1);
45+
} else {
46+
gpio_set_level(CONFIG_LED_PIN, 0);
4747
}
4848
#else
49-
gpio_set_level(CONFIG_LED_PIN, 1);
50-
} else {
5149
gpio_set_level(CONFIG_LED_PIN, 0);
50+
} else {
51+
gpio_set_level(CONFIG_LED_PIN, 1);
5252
}
5353
#endif
5454

0 commit comments

Comments
 (0)