mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-07-15 08:32:42 +08:00
feat(esptouch_v2): support esptouch_v2
This commit is contained in:
@ -28,6 +28,7 @@ typedef enum {
|
||||
SC_TYPE_ESPTOUCH = 0, /**< protocol: ESPTouch */
|
||||
SC_TYPE_AIRKISS, /**< protocol: AirKiss */
|
||||
SC_TYPE_ESPTOUCH_AIRKISS, /**< protocol: ESPTouch and AirKiss */
|
||||
SC_TYPE_ESPTOUCH_V2, /**< protocol: ESPTouch V2*/
|
||||
} smartconfig_type_t;
|
||||
|
||||
/** Smartconfig event declarations */
|
||||
@ -54,12 +55,16 @@ typedef struct {
|
||||
|
||||
/** Configure structure for esp_smartconfig_start */
|
||||
typedef struct {
|
||||
bool enable_log; /**< Enable smartconfig logs. */
|
||||
bool enable_log; /**< Enable smartconfig logs. */
|
||||
bool esp_touch_v2_enable_crypt; /**< Enable ESPTOUCH V2 crypt. */
|
||||
char* esp_touch_v2_key; /**< ESPTOUCH V2 crypt key, len should be 16. */
|
||||
} smartconfig_start_config_t;
|
||||
|
||||
#define SMARTCONFIG_START_CONFIG_DEFAULT() { \
|
||||
.enable_log = false \
|
||||
};
|
||||
.enable_log = false, \
|
||||
.esp_touch_v2_enable_crypt = false,\
|
||||
.esp_touch_v2_key = NULL \
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Get the version of SmartConfig.
|
||||
@ -139,6 +144,18 @@ esp_err_t esp_smartconfig_set_type(smartconfig_type_t type);
|
||||
*/
|
||||
esp_err_t esp_smartconfig_fast_mode(bool enable);
|
||||
|
||||
/**
|
||||
* @brief Get reserved data of ESPTouch_v2.
|
||||
*
|
||||
* @param rvd_data reserved data
|
||||
* @param len length of reserved data
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - others: fail
|
||||
*/
|
||||
esp_err_t esp_smartconfig_get_rvd_data(uint8_t* rvd_data, uint8_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user