Skip to content

Commit b738321

Browse files
committed
Merge branch 'bugfix/add_clear_ap_list_interface' into 'master'
esp_wifi:add clear ap list interface See merge request espressif/esp-idf!19441
2 parents 2310736 + b9a0a3d commit b738321

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

components/esp_wifi/include/esp_wifi.h

+15
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,21 @@ esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number);
453453
esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records);
454454

455455

456+
/**
457+
* @brief Clear AP list found in last scan
458+
*
459+
* @attention When the obtained ap list fails,bss info must be cleared,otherwise it may cause memory leakage.
460+
*
461+
* @return
462+
* - ESP_OK: succeed
463+
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
464+
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
465+
* - ESP_ERR_WIFI_MODE: WiFi mode is wrong
466+
* - ESP_ERR_INVALID_ARG: invalid argument
467+
*/
468+
esp_err_t esp_wifi_clear_ap_list(void);
469+
470+
456471
/**
457472
* @brief Get information of AP which the ESP32 station is associated with
458473
*

0 commit comments

Comments
 (0)