Skip to content

Commit 3c071e1

Browse files
committed
update IDF libraries and includes
1 parent 261bc5a commit 3c071e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1952
-349
lines changed

libraries/WiFi/src/WiFiAP.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ bool WiFiAPClass::softAPdisconnect(bool wifioff)
189189
*/
190190
uint8_t WiFiAPClass::softAPgetStationNum()
191191
{
192-
uint16_t number;
193-
if(esp_wifi_get_ap_num(&number) == ESP_OK) {
194-
return number;
192+
wifi_sta_list_t clients;
193+
if(esp_wifi_ap_get_sta_list(&clients) == ESP_OK) {
194+
return clients.num;
195195
}
196196
return 0;
197197
}

libraries/WiFi/src/WiFiScan.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ void WiFiScanClass::_scanDone()
9999
{
100100
WiFiScanClass::_scanComplete = true;
101101
WiFiScanClass::_scanStarted = false;
102-
esp_wifi_get_ap_num(&(WiFiScanClass::_scanCount));
102+
esp_wifi_scan_get_ap_num(&(WiFiScanClass::_scanCount));
103103
if(WiFiScanClass::_scanCount) {
104-
WiFiScanClass::_scanResult = new wifi_ap_list_t[WiFiScanClass::_scanCount];
104+
WiFiScanClass::_scanResult = new wifi_ap_record_t[WiFiScanClass::_scanCount];
105105
if(WiFiScanClass::_scanResult) {
106-
esp_wifi_get_ap_list(&(WiFiScanClass::_scanCount), (wifi_ap_list_t*)_scanResult);
106+
esp_wifi_scan_get_ap_records(&(WiFiScanClass::_scanCount), (wifi_ap_record_t*)_scanResult);
107107
} else {
108108
//no memory
109109
WiFiScanClass::_scanCount = 0;
@@ -121,7 +121,7 @@ void * WiFiScanClass::_getScanInfoByIndex(int i)
121121
if(!WiFiScanClass::_scanResult || (size_t) i > WiFiScanClass::_scanCount) {
122122
return 0;
123123
}
124-
return reinterpret_cast<wifi_ap_list_t*>(WiFiScanClass::_scanResult) + i;
124+
return reinterpret_cast<wifi_ap_record_t*>(WiFiScanClass::_scanResult) + i;
125125
}
126126

127127
/**
@@ -150,7 +150,7 @@ int8_t WiFiScanClass::scanComplete()
150150
void WiFiScanClass::scanDelete()
151151
{
152152
if(WiFiScanClass::_scanResult) {
153-
delete[] reinterpret_cast<wifi_ap_list_t*>(WiFiScanClass::_scanResult);
153+
delete[] reinterpret_cast<wifi_ap_record_t*>(WiFiScanClass::_scanResult);
154154
WiFiScanClass::_scanResult = 0;
155155
WiFiScanClass::_scanCount = 0;
156156
}
@@ -170,7 +170,7 @@ void WiFiScanClass::scanDelete()
170170
*/
171171
bool WiFiScanClass::getNetworkInfo(uint8_t i, String &ssid, uint8_t &encType, int32_t &rssi, uint8_t* &bssid, int32_t &channel)
172172
{
173-
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
173+
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
174174
if(!it) {
175175
return false;
176176
}
@@ -190,7 +190,7 @@ bool WiFiScanClass::getNetworkInfo(uint8_t i, String &ssid, uint8_t &encType, in
190190
*/
191191
String WiFiScanClass::SSID(uint8_t i)
192192
{
193-
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
193+
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
194194
if(!it) {
195195
return String();
196196
}
@@ -205,7 +205,7 @@ String WiFiScanClass::SSID(uint8_t i)
205205
*/
206206
wifi_auth_mode_t WiFiScanClass::encryptionType(uint8_t i)
207207
{
208-
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
208+
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
209209
if(!it) {
210210
return WIFI_AUTH_OPEN;
211211
}
@@ -219,7 +219,7 @@ wifi_auth_mode_t WiFiScanClass::encryptionType(uint8_t i)
219219
*/
220220
int32_t WiFiScanClass::RSSI(uint8_t i)
221221
{
222-
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
222+
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
223223
if(!it) {
224224
return 0;
225225
}
@@ -234,7 +234,7 @@ int32_t WiFiScanClass::RSSI(uint8_t i)
234234
*/
235235
uint8_t * WiFiScanClass::BSSID(uint8_t i)
236236
{
237-
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
237+
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
238238
if(!it) {
239239
return 0;
240240
}
@@ -249,7 +249,7 @@ uint8_t * WiFiScanClass::BSSID(uint8_t i)
249249
String WiFiScanClass::BSSIDstr(uint8_t i)
250250
{
251251
char mac[18] = { 0 };
252-
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
252+
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
253253
if(!it) {
254254
return String();
255255
}
@@ -259,7 +259,7 @@ String WiFiScanClass::BSSIDstr(uint8_t i)
259259

260260
int32_t WiFiScanClass::channel(uint8_t i)
261261
{
262-
wifi_ap_list_t* it = reinterpret_cast<wifi_ap_list_t*>(_getScanInfoByIndex(i));
262+
wifi_ap_record_t* it = reinterpret_cast<wifi_ap_record_t*>(_getScanInfoByIndex(i));
263263
if(!it) {
264264
return 0;
265265
}

platform.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ compiler.warning_flags.all=-Wall -Wextra
1313

1414
compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
1515
compiler.sdk.path={runtime.platform.path}/tools/sdk
16-
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/lwip"
16+
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE='"mbedtls/esp_config.h"' -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/lwip"
1717

1818
compiler.c.cmd=xtensa-esp32-elf-gcc
1919
compiler.c.flags=-c {compiler.warning_flags} -Os -g3 -Wpointer-arith -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -ffunction-sections -fdata-sections -mlongcalls -nostdlib -MMD -std=gnu99 -fstrict-volatile-bitfields
@@ -26,7 +26,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
2626

2727
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
2828
compiler.c.elf.flags="-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -nostdlib -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority
29-
compiler.c.elf.libs=-lgcc -lc -lm -lhal -lcore -lnet80211 -lphy -lrtc -lpp -lwpa -lsmartconfig -lbtdm_app -lbt -ldriver -lesp32 -lcrypto -lexpat -lfreertos -ljson -llog -llwip -lmbedtls -lnghttp -lnvs_flash -lspi_flash -ltcpip_adapter
29+
compiler.c.elf.libs=-lgcc -lc -lm -lhal -lcore -lnet80211 -lphy -lrtc -lpp -lwpa -lsmartconfig -lbtdm_app -lbt -ldriver -lesp32 -lcrypto -lexpat -lfreertos -ljson -llog -llwip -lmbedtls -lnghttp -lnvs_flash -lspi_flash -ltcpip_adapter -lnewlib -lvfs
3030

3131
compiler.as.cmd=xtensa-esp32-elf-as
3232

0 commit comments

Comments
 (0)