esp_wifi: fix deinit return wrong value

1. Deinit does not return ESP_ERR_WIFI_NOT_INIT if the wifi driver is no longer initialized.
2. Fix get wrong channel value use esp_wifi_get_config.
3. Fix bug of missing unlock when wifi stop.
4. Fix annotation error of api esp_wifi_connect.
This commit is contained in:
muhaidong 2022-08-02 11:45:21 +08:00
parent 2c8f83ec72
commit 7f2d6e96b4

View File

@ -339,7 +339,7 @@ esp_err_t esp_wifi_restore(void);
*
* @attention 1. This API only impact WIFI_MODE_STA or WIFI_MODE_APSTA mode
* @attention 2. If the ESP32 is connected to an AP, call esp_wifi_disconnect to disconnect.
* @attention 3. The scanning triggered by esp_wifi_start_scan() will not be effective until connection between ESP32 and the AP is established.
* @attention 3. The scanning triggered by esp_wifi_scan_start() will not be effective until connection between ESP32 and the AP is established.
* If ESP32 is scanning and connecting at the same time, ESP32 will abort scanning and return a warning message and error
* number ESP_ERR_WIFI_STATE.
* If you want to do reconnection after ESP32 received disconnect event, remember to add the maximum retry time, otherwise the called