Function esp_idf_svc::sys::esp_wifi_scan_get_ap_record

source ·
pub unsafe extern "C" fn esp_wifi_scan_get_ap_record(
    ap_record: *mut wifi_ap_record_t,
) -> i32
Expand description

@brief Get one AP record from the scanned AP list.

@attention Different from esp_wifi_scan_get_ap_records(), this API only gets one AP record from the scanned AP list each time. This API will free the memory of one AP record, if the user doesn’t get all records in the scannned AP list, then needs to call esp_wifi_clear_ap_list() to free the remaining memory.

@param[out] ap_record pointer to one AP record

@return

  • ESP_OK: succeed
  • ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
  • ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
  • ESP_ERR_INVALID_ARG: invalid argument
  • ESP_FAIL: scan APs is NULL, means all AP records fetched or no AP found