@@ -27,17 +27,17 @@ typedef enum {
2727otError esp_ot_process_wifi_cmd (void * aContext , uint8_t aArgsLength , char * aArgs []);
2828
2929/**
30- * @brief This function set or clear the border router initalization flag.
30+ * @brief This function sets or clears the border router initalization flag.
3131 *
3232 * @param[in] initialized border router is or not initalized.
3333 */
3434void esp_ot_wifi_border_router_init_flag_set (bool initialized );
3535
3636/**
37- * @brief This function connect the wifi .
37+ * @brief This function connects to Wi-Fi .
3838 *
39- * @param[in] ssid ssid of wifi
40- * @param[in] password password of wifi
39+ * @param[in] ssid ssid of Wi-Fi
40+ * @param[in] password password of Wi-Fi
4141 *
4242 * @return
4343 * - ESP_OK on success
@@ -46,7 +46,16 @@ void esp_ot_wifi_border_router_init_flag_set(bool initialized);
4646esp_err_t esp_ot_wifi_connect (const char * ssid , const char * password );
4747
4848/**
49- * @brief This function initalize the nvs for wifi configurations.
49+ * @brief This function disconnects Wi-Fi.
50+ *
51+ * @return
52+ * - ESP_OK on success
53+ * - others on failure
54+ */
55+ esp_err_t esp_ot_wifi_disconnect (void );
56+
57+ /**
58+ * @brief This function initializes the nvs for Wi-Fi configurations.
5059 *
5160 * @return
5261 * - ESP_OK on success
@@ -55,9 +64,9 @@ esp_err_t esp_ot_wifi_connect(const char *ssid, const char *password);
5564esp_err_t esp_ot_wifi_config_init (void );
5665
5766/**
58- * @brief This function set the wifi ssid.
67+ * @brief This function sets the Wi-Fi ssid.
5968 *
60- * @param[in] ssid pointer to ssid of wifi
69+ * @param[in] ssid pointer to ssid of Wi-Fi
6170 *
6271 * @return
6372 * - ESP_OK on success
@@ -66,9 +75,9 @@ esp_err_t esp_ot_wifi_config_init(void);
6675esp_err_t esp_ot_wifi_config_set_ssid (const char * ssid );
6776
6877/**
69- * @brief This function get the wifi ssid.
78+ * @brief This function gets the Wi-Fi ssid.
7079 *
71- * @param[in] password pointer to password of wifi
80+ * @param[in] password pointer to password of Wi-Fi
7281 *
7382 * @return
7483 * - ESP_OK on success
@@ -77,9 +86,9 @@ esp_err_t esp_ot_wifi_config_set_ssid(const char *ssid);
7786esp_err_t esp_ot_wifi_config_get_ssid (char * ssid );
7887
7988/**
80- * @brief This function set the wifi password.
89+ * @brief This function sets the Wi-Fi password.
8190 *
82- * @param[in] ssid pointer to ssid of wifi
91+ * @param[in] ssid pointer to ssid of Wi-Fi
8392 *
8493 * @return
8594 * - ESP_OK on success
@@ -88,9 +97,9 @@ esp_err_t esp_ot_wifi_config_get_ssid(char *ssid);
8897esp_err_t esp_ot_wifi_config_set_password (const char * password );
8998
9099/**
91- * @brief This function get the wifi password.
100+ * @brief This function gets the Wi-Fi password.
92101 *
93- * @param[in] password pointer to password of wifi
102+ * @param[in] password pointer to password of Wi-Fi
94103 *
95104 * @return
96105 * - ESP_OK on success
@@ -99,14 +108,24 @@ esp_err_t esp_ot_wifi_config_set_password(const char *password);
99108esp_err_t esp_ot_wifi_config_get_password (char * password );
100109
101110/**
102- * @brief This function clear the wifi configurations stored in nvs.
111+ * @brief This function clears the Wi-Fi configurations stored in nvs.
103112 *
104113 * @return
105114 * - ESP_OK on success
106115 * - others on failure
107116 */
108117esp_err_t esp_ot_wifi_config_clear (void );
109118
119+ /**
120+ * @brief This function gets the Wi-Fi state.
121+ *
122+ * @return
123+ * OT_WIFI_DISCONNECTED if Wi-Fi is disconnected
124+ * OT_WIFI_CONNECTED if Wi-Fi is connected
125+ * OT_WIFI_RECONNECTING if Wi-Fi is reconnecting
126+ */
127+ esp_ot_wifi_state_t esp_ot_wifi_state_get (void );
128+
110129#ifdef __cplusplus
111130}
112131#endif
0 commit comments