|
26 | 26 | #define __ESP_STA_H__
|
27 | 27 |
|
28 | 28 | #include "queue.h"
|
29 |
| - |
| 29 | +#include "esp_wifi.h" |
30 | 30 | #ifdef __cplusplus
|
31 | 31 | extern "C" {
|
32 | 32 | #endif
|
@@ -142,11 +142,32 @@ bool wifi_station_connect(void);
|
142 | 142 | */
|
143 | 143 | bool wifi_station_disconnect(void);
|
144 | 144 |
|
| 145 | +typedef enum { |
| 146 | + WIFI_SCAN_TYPE_ACTIVE = 0, /**< active scan */ |
| 147 | + WIFI_SCAN_TYPE_PASSIVE, /**< passive scan */ |
| 148 | +} wifi_scan_type_t; |
| 149 | + |
| 150 | +/** @brief Range of active scan times per channel */ |
| 151 | +typedef struct { |
| 152 | + uint32_t min; /**< minimum active scan time per channel, units: millisecond */ |
| 153 | + uint32_t max; /**< maximum active scan time per channel, units: millisecond, values above 1500ms may |
| 154 | + cause station to disconnect from AP and are not recommended. */ |
| 155 | +} wifi_active_scan_time_t; |
| 156 | + |
| 157 | +/** @brief Aggregate of active & passive scan time per channel */ |
| 158 | +typedef union { |
| 159 | + wifi_active_scan_time_t active; /**< active scan time per channel, units: millisecond. */ |
| 160 | + uint32_t passive; /**< passive scan time per channel, units: millisecond, values above 1500ms may |
| 161 | + cause station to disconnect from AP and are not recommended. */ |
| 162 | +} wifi_scan_time_t; |
| 163 | + |
145 | 164 | struct scan_config {
|
146 |
| - uint8 *ssid; /**< SSID of AP */ |
147 |
| - uint8 *bssid; /**< MAC address of AP */ |
148 |
| - uint8 channel; /**< channel, scan the specific channel */ |
149 |
| - uint8 show_hidden; /**< enable to scan AP whose SSID is hidden */ |
| 165 | + uint8 *ssid; /**< SSID of AP */ |
| 166 | + uint8 *bssid; /**< MAC address of AP */ |
| 167 | + uint8 channel; /**< channel, scan the specific channel */ |
| 168 | + uint8 show_hidden; /**< enable to scan AP whose SSID is hidden */ |
| 169 | + wifi_scan_type_t scan_type; /**< scan type, active or passive */ |
| 170 | + wifi_scan_time_t scan_time; /**< scan time per channel */ |
150 | 171 | };
|
151 | 172 |
|
152 | 173 | typedef enum {
|
|
0 commit comments