File tree Expand file tree Collapse file tree 4 files changed +15
-15
lines changed
Expand file tree Collapse file tree 4 files changed +15
-15
lines changed Original file line number Diff line number Diff 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
6161config 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
6666choice 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
7979config SC_KEY_PIN
8080 int "SmartConfig Key Pin"
8181 default 0
82- depends on ENABLE_SMARTCONFIG
82+ depends on ENABLE_SC_KEY
8383endmenu
8484
8585menu "NTP Configuration"
Original file line number Diff line number Diff line change 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_ */
Original file line number Diff line number Diff line change 1616
1717#define TAG "key"
1818
19- #ifdef CONFIG_ENABLE_SMARTCONFIG
19+ #ifdef CONFIG_ENABLE_SC_KEY
2020static uint8_t gpio_pin [] = {
21- #ifdef CONFIG_ENABLE_SMARTCONFIG
21+ #ifdef CONFIG_ENABLE_SC_KEY
2222 CONFIG_SC_KEY_PIN ,
2323#endif
2424};
2525
2626static 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
3434static 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
4040static 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
Original file line number Diff line number Diff line change 2121
2222#define SC_KEY_TAG "sc_key"
2323
24- #ifdef CONFIG_ENABLE_SMARTCONFIG
24+ #ifdef CONFIG_ENABLE_SC_KEY
2525void 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
You can’t perform that action at this time.
0 commit comments