Skip to content

Commit 1786b5d

Browse files
committed
sc_key: update kconfig define
1 parent 2e4340f commit 1786b5d

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

main/Kconfig.projbuild

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@ config WIFI_HOSTNAME_PREFIX
5252
help
5353
WiFi hostname prefix for the device to use.
5454

55-
config ENABLE_SMARTCONFIG
56-
bool "Enable SmartConfig"
55+
config ENABLE_SC_KEY
56+
bool "Enable SmartConfig Key"
5757
default y
5858
help
59-
Select this to enable smartconfig.
59+
Select this to enable smartconfig key.
6060

6161
config SC_KEY_HOLD_TIME
6262
int "SmartConfig Key Hold Time (ms)"
6363
default 500
64-
depends on ENABLE_SMARTCONFIG
64+
depends on ENABLE_SC_KEY
6565

6666
choice SC_KEY_ACTIVE_LEVEL
6767
prompt "SmartConfig Key Active Level"
6868
default SC_KEY_ACTIVE_LOW
69-
depends on ENABLE_SMARTCONFIG
69+
depends on ENABLE_SC_KEY
7070
help
7171
Select SmartConfig Key Active Level.
7272

@@ -79,7 +79,7 @@ endchoice
7979
config SC_KEY_PIN
8080
int "SmartConfig Key Pin"
8181
default 0
82-
depends on ENABLE_SMARTCONFIG
82+
depends on ENABLE_SC_KEY
8383
endmenu
8484

8585
menu "NTP Configuration"

main/inc/user/key_handle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
#ifndef INC_USER_KEY_HANDLE_H_
99
#define INC_USER_KEY_HANDLE_H_
1010

11-
extern void key_smartconfig_handle(void);
11+
extern void sc_key_handle(void);
1212

1313
#endif /* INC_USER_KEY_HANDLE_H_ */

main/src/user/key.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,30 @@
1616

1717
#define TAG "key"
1818

19-
#ifdef CONFIG_ENABLE_SMARTCONFIG
19+
#ifdef CONFIG_ENABLE_SC_KEY
2020
static uint8_t gpio_pin[] = {
21-
#ifdef CONFIG_ENABLE_SMARTCONFIG
21+
#ifdef CONFIG_ENABLE_SC_KEY
2222
CONFIG_SC_KEY_PIN,
2323
#endif
2424
};
2525

2626
static uint8_t gpio_val[] = {
27-
#ifdef CONFIG_SC_KEY_ACTIVE_LOW
27+
#ifdef CONFIG_ENABLE_SC_KEY
2828
0,
2929
#else
3030
1,
3131
#endif
3232
};
3333

3434
static uint16_t gpio_hold[] = {
35-
#ifdef CONFIG_ENABLE_SMARTCONFIG
35+
#ifdef CONFIG_ENABLE_SC_KEY
3636
CONFIG_SC_KEY_HOLD_TIME,
3737
#endif
3838
};
3939

4040
static void (*key_handle[])(void) = {
41-
#ifdef CONFIG_ENABLE_SMARTCONFIG
42-
key_smartconfig_handle,
41+
#ifdef CONFIG_ENABLE_SC_KEY
42+
sc_key_handle,
4343
#endif
4444
};
4545

main/src/user/key_handle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#define SC_KEY_TAG "sc_key"
2323

24-
#ifdef CONFIG_ENABLE_SMARTCONFIG
24+
#ifdef CONFIG_ENABLE_SC_KEY
2525
void key_smartconfig_handle(void)
2626
{
2727
xEventGroupClearBits(user_event_group, KEY_SCAN_RUN_BIT);
@@ -40,4 +40,4 @@ void key_smartconfig_handle(void)
4040
smartconfig_start_config_t sc_cfg = SMARTCONFIG_START_CONFIG_DEFAULT();
4141
ESP_ERROR_CHECK(esp_smartconfig_start(&sc_cfg));
4242
}
43-
#endif // CONFIG_ENABLE_SMARTCONFIG
43+
#endif // CONFIG_ENABLE_SC_KEY

0 commit comments

Comments
 (0)