Skip to content

Commit 88e50a9

Browse files
authored
Merge branch 'master' into docs/version-compare
2 parents c197e59 + f2026f1 commit 88e50a9

File tree

120 files changed

+4114
-3153
lines changed

Some content is hidden

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

120 files changed

+4114
-3153
lines changed

Diff for: .github/scripts/on-push.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [ "$BUILD_PIO" -eq 0 ]; then
7272
FQBN_ESP32H2="espressif:esp32:esp32h2:PartitionScheme=huge_app"
7373

7474
SKETCHES_ESP32="\
75-
$ARDUINO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
75+
$ARDUINO_ESP32_PATH/libraries/NetworkClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
7676
$ARDUINO_ESP32_PATH/libraries/BLE/examples/Server/Server.ino\
7777
$ARDUINO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino\
7878
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
@@ -90,7 +90,7 @@ else
9090
BOARD="esp32dev"
9191
OPTIONS="board_build.partitions = huge_app.csv"
9292
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino" && \
93-
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino" && \
93+
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/NetworkClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino" && \
9494
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/BluetoothSerial/examples/SerialToSerialBT/SerialToSerialBT.ino" && \
9595
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/BLE/examples/Server/Server.ino" && \
9696
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino"

Diff for: CMakeLists.txt

+15-7
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ set(ARDUINO_ALL_LIBRARIES
9393
Insights
9494
LittleFS
9595
NetBIOS
96+
Network
9697
Preferences
9798
RainMaker
9899
SD_MMC
@@ -104,7 +105,7 @@ set(ARDUINO_ALL_LIBRARIES
104105
Update
105106
USB
106107
WebServer
107-
WiFiClientSecure
108+
NetworkClientSecure
108109
WiFi
109110
WiFiProv
110111
Wire
@@ -198,20 +199,27 @@ set(ARDUINO_LIBRARY_WebServer_SRCS
198199
libraries/WebServer/src/Parsing.cpp
199200
libraries/WebServer/src/detail/mimetable.cpp)
200201

201-
set(ARDUINO_LIBRARY_WiFiClientSecure_SRCS
202-
libraries/WiFiClientSecure/src/ssl_client.cpp
203-
libraries/WiFiClientSecure/src/WiFiClientSecure.cpp)
202+
set(ARDUINO_LIBRARY_NetworkClientSecure_SRCS
203+
libraries/NetworkClientSecure/src/ssl_client.cpp
204+
libraries/NetworkClientSecure/src/NetworkClientSecure.cpp)
205+
206+
set(ARDUINO_LIBRARY_Network_SRCS
207+
libraries/Network/src/NetworkInterface.cpp
208+
libraries/Network/src/NetworkEvents.cpp
209+
libraries/Network/src/NetworkManager.cpp
210+
libraries/Network/src/NetworkClient.cpp
211+
libraries/Network/src/NetworkServer.cpp
212+
libraries/Network/src/NetworkUdp.cpp)
204213

205214
set(ARDUINO_LIBRARY_WiFi_SRCS
206215
libraries/WiFi/src/WiFiAP.cpp
207-
libraries/WiFi/src/WiFiClient.cpp
208216
libraries/WiFi/src/WiFi.cpp
209217
libraries/WiFi/src/WiFiGeneric.cpp
210218
libraries/WiFi/src/WiFiMulti.cpp
211219
libraries/WiFi/src/WiFiScan.cpp
212-
libraries/WiFi/src/WiFiServer.cpp
213220
libraries/WiFi/src/WiFiSTA.cpp
214-
libraries/WiFi/src/WiFiUdp.cpp)
221+
libraries/WiFi/src/STA.cpp
222+
libraries/WiFi/src/AP.cpp)
215223

216224
set(ARDUINO_LIBRARY_WiFiProv_SRCS libraries/WiFiProv/src/WiFiProv.cpp)
217225

Diff for: Kconfig.projbuild

+63-82
Original file line numberDiff line numberDiff line change
@@ -256,157 +256,138 @@ config ARDUINO_SELECTIVE_COMPILATION
256256
bool "Include only specific Arduino libraries"
257257
default n
258258

259-
config ARDUINO_SELECTIVE_ArduinoOTA
260-
bool "Enable ArduinoOTA"
261-
depends on ARDUINO_SELECTIVE_COMPILATION
262-
select ARDUINO_SELECTIVE_WiFi
263-
select ARDUINO_SELECTIVE_ESPmDNS
264-
default y
265-
266-
config ARDUINO_SELECTIVE_AsyncUDP
267-
bool "Enable AsyncUDP"
268-
depends on ARDUINO_SELECTIVE_COMPILATION
269-
default y
270-
271-
config ARDUINO_SELECTIVE_AzureIoT
272-
bool "Enable AzureIoT"
273-
depends on ARDUINO_SELECTIVE_COMPILATION
274-
select ARDUINO_SELECTIVE_HTTPClient
275-
default y
276-
277-
config ARDUINO_SELECTIVE_BLE
278-
bool "Enable BLE"
279-
depends on ARDUINO_SELECTIVE_COMPILATION
280-
default y
281-
282-
config ARDUINO_SELECTIVE_BluetoothSerial
283-
bool "Enable BluetoothSerial"
259+
config ARDUINO_SELECTIVE_SPI
260+
bool "Enable SPI"
284261
depends on ARDUINO_SELECTIVE_COMPILATION
285262
default y
286263

287-
config ARDUINO_SELECTIVE_DNSServer
288-
bool "Enable DNSServer"
264+
config ARDUINO_SELECTIVE_Wire
265+
bool "Enable Wire"
289266
depends on ARDUINO_SELECTIVE_COMPILATION
290-
select ARDUINO_SELECTIVE_WiFi
291267
default y
292268

293269
config ARDUINO_SELECTIVE_EEPROM
294270
bool "Enable EEPROM"
295271
depends on ARDUINO_SELECTIVE_COMPILATION
296272
default y
297273

298-
config ARDUINO_SELECTIVE_ESP32
299-
bool "Enable ESP32"
274+
config ARDUINO_SELECTIVE_Preferences
275+
bool "Enable Preferences"
300276
depends on ARDUINO_SELECTIVE_COMPILATION
301277
default y
302278

303-
config ARDUINO_SELECTIVE_ESPmDNS
304-
bool "Enable ESPmDNS"
279+
config ARDUINO_SELECTIVE_Ticker
280+
bool "Enable Ticker"
305281
depends on ARDUINO_SELECTIVE_COMPILATION
306-
select ARDUINO_SELECTIVE_WiFi
307282
default y
308283

309-
config ARDUINO_SELECTIVE_FFat
310-
bool "Enable FFat"
284+
config ARDUINO_SELECTIVE_Update
285+
bool "Enable Update"
311286
depends on ARDUINO_SELECTIVE_COMPILATION
312-
select ARDUINO_SELECTIVE_FS
313287
default y
314288

315289
config ARDUINO_SELECTIVE_FS
316290
bool "Enable FS"
317291
depends on ARDUINO_SELECTIVE_COMPILATION
318292
default y
319293

320-
config ARDUINO_SELECTIVE_HTTPClient
321-
bool "Enable HTTPClient"
322-
depends on ARDUINO_SELECTIVE_COMPILATION
323-
select ARDUINO_SELECTIVE_WiFi
324-
select ARDUINO_SELECTIVE_WiFiClientSecure
294+
config ARDUINO_SELECTIVE_SD
295+
bool "Enable SD"
296+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_FS
325297
default y
326298

327-
config ARDUINO_SELECTIVE_LITTLEFS
328-
bool "Enable LITTLEFS"
329-
depends on ARDUINO_SELECTIVE_COMPILATION
330-
select ARDUINO_SELECTIVE_FS
299+
config ARDUINO_SELECTIVE_SD_MMC
300+
bool "Enable SD_MMC"
301+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_FS
331302
default y
332303

333-
config ARDUINO_SELECTIVE_NetBIOS
334-
bool "Enable NetBIOS"
335-
depends on ARDUINO_SELECTIVE_COMPILATION
336-
select ARDUINO_SELECTIVE_WiFi
304+
config ARDUINO_SELECTIVE_SPIFFS
305+
bool "Enable SPIFFS"
306+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_FS
337307
default y
338308

339-
config ARDUINO_SELECTIVE_Preferences
340-
bool "Enable Preferences"
341-
depends on ARDUINO_SELECTIVE_COMPILATION
309+
config ARDUINO_SELECTIVE_FFat
310+
bool "Enable FFat"
311+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_FS
342312
default y
343313

344-
config ARDUINO_SELECTIVE_SD
345-
bool "Enable SD"
346-
depends on ARDUINO_SELECTIVE_COMPILATION
347-
select ARDUINO_SELECTIVE_FS
314+
config ARDUINO_SELECTIVE_LITTLEFS
315+
bool "Enable LITTLEFS"
316+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_FS
348317
default y
349318

350-
config ARDUINO_SELECTIVE_SD_MMC
351-
bool "Enable SD_MMC"
319+
config ARDUINO_SELECTIVE_Networking
320+
bool "Enable Networking"
352321
depends on ARDUINO_SELECTIVE_COMPILATION
353-
select ARDUINO_SELECTIVE_FS
354322
default y
355323

356-
config ARDUINO_SELECTIVE_SimpleBLE
357-
bool "Enable SimpleBLE"
358-
depends on ARDUINO_SELECTIVE_COMPILATION
324+
config ARDUINO_SELECTIVE_ArduinoOTA
325+
bool "Enable ArduinoOTA"
326+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Networking
327+
select ARDUINO_SELECTIVE_ESPmDNS
359328
default y
360329

361-
config ARDUINO_SELECTIVE_SPI
362-
bool "Enable SPI"
363-
depends on ARDUINO_SELECTIVE_COMPILATION
330+
config ARDUINO_SELECTIVE_AsyncUDP
331+
bool "Enable AsyncUDP"
332+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Networking
364333
default y
365334

366-
config ARDUINO_SELECTIVE_SPIFFS
367-
bool "Enable SPIFFS"
368-
depends on ARDUINO_SELECTIVE_COMPILATION
369-
select ARDUINO_SELECTIVE_FS
335+
config ARDUINO_SELECTIVE_DNSServer
336+
bool "Enable DNSServer"
337+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Networking
370338
default y
371339

372-
config ARDUINO_SELECTIVE_Ticker
373-
bool "Enable Ticker"
374-
depends on ARDUINO_SELECTIVE_COMPILATION
340+
config ARDUINO_SELECTIVE_ESPmDNS
341+
bool "Enable ESPmDNS"
342+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Networking
375343
default y
376344

377-
config ARDUINO_SELECTIVE_Update
378-
bool "Enable Update"
379-
depends on ARDUINO_SELECTIVE_COMPILATION
345+
config ARDUINO_SELECTIVE_HTTPClient
346+
bool "Enable HTTPClient"
347+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Networking
348+
select ARDUINO_SELECTIVE_WiFiClientSecure
349+
default y
350+
351+
config ARDUINO_SELECTIVE_NetBIOS
352+
bool "Enable NetBIOS"
353+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Networking
380354
default y
381355

382356
config ARDUINO_SELECTIVE_WebServer
383357
bool "Enable WebServer"
384-
depends on ARDUINO_SELECTIVE_COMPILATION
358+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Networking
385359
default y
386360
select ARDUINO_SELECTIVE_FS
387361

388362
config ARDUINO_SELECTIVE_WiFi
389363
bool "Enable WiFi"
390-
depends on ARDUINO_SELECTIVE_COMPILATION
364+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Networking
391365
default y
392366

393367
config ARDUINO_SELECTIVE_WiFiClientSecure
394368
bool "Enable WiFiClientSecure"
395-
depends on ARDUINO_SELECTIVE_COMPILATION
396-
select ARDUINO_SELECTIVE_WiFi
369+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Networking
397370
default y
398371

399372
config ARDUINO_SELECTIVE_WiFiProv
400373
bool "Enable WiFiProv"
374+
depends on ARDUINO_SELECTIVE_COMPILATION && ARDUINO_SELECTIVE_Networking && ARDUINO_SELECTIVE_WiFi
375+
default y
376+
377+
config ARDUINO_SELECTIVE_BLE
378+
bool "Enable BLE"
401379
depends on ARDUINO_SELECTIVE_COMPILATION
402-
select ARDUINO_SELECTIVE_WiFi
403380
default y
404381

405-
config ARDUINO_SELECTIVE_Wire
406-
bool "Enable Wire"
382+
config ARDUINO_SELECTIVE_BluetoothSerial
383+
bool "Enable BluetoothSerial"
407384
depends on ARDUINO_SELECTIVE_COMPILATION
408385
default y
409386

387+
config ARDUINO_SELECTIVE_SimpleBLE
388+
bool "Enable SimpleBLE"
389+
depends on ARDUINO_SELECTIVE_COMPILATION
390+
default y
410391

411392
endmenu
412393

Diff for: cores/esp32/esp32-hal-gpio.c

+11
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,16 @@ extern void ARDUINO_ISR_ATTR __pinMode(uint8_t pin, uint8_t mode)
151151
}
152152
}
153153

154+
#ifdef RGB_BUILTIN
155+
uint8_t RGB_BUILTIN_storage = 0;
156+
#endif
157+
154158
extern void ARDUINO_ISR_ATTR __digitalWrite(uint8_t pin, uint8_t val)
155159
{
156160
#ifdef RGB_BUILTIN
157161
if(pin == RGB_BUILTIN){
158162
//use RMT to set all channels on/off
163+
RGB_BUILTIN_storage=val;
159164
const uint8_t comm_val = val != 0 ? RGB_BRIGHTNESS : 0;
160165
neopixelWrite(RGB_BUILTIN, comm_val, comm_val, comm_val);
161166
return;
@@ -170,6 +175,12 @@ extern void ARDUINO_ISR_ATTR __digitalWrite(uint8_t pin, uint8_t val)
170175

171176
extern int ARDUINO_ISR_ATTR __digitalRead(uint8_t pin)
172177
{
178+
#ifdef RGB_BUILTIN
179+
if(pin == RGB_BUILTIN){
180+
return RGB_BUILTIN_storage;
181+
}
182+
#endif
183+
173184
if(perimanGetPinBus(pin, ESP32_BUS_TYPE_GPIO) != NULL){
174185
return gpio_get_level((gpio_num_t)pin);
175186
}

Diff for: docs/en/api/wifi.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ Function to get the IPv6 address.
345345

346346
.. code-block:: arduino
347347
348-
IPAddress softAPIPv6();
348+
IPAddress softAPlinkLocalIPv6();
349349
350350
The function will return the AP IPv6 address in ``IPAddress`` format.
351351

Diff for: libraries/ArduinoOTA/examples/BasicOTA/BasicOTA.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <WiFi.h>
22
#include <ESPmDNS.h>
3-
#include <WiFiUdp.h>
3+
#include <NetworkUdp.h>
44
#include <ArduinoOTA.h>
55

66
const char* ssid = "..........";

Diff for: libraries/ArduinoOTA/src/ArduinoOTA.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#define LWIP_OPEN_SRC
33
#endif
44
#include <functional>
5-
#include <WiFiUdp.h>
65
#include "ArduinoOTA.h"
6+
#include "NetworkClient.h"
77
#include "ESPmDNS.h"
88
#include "MD5Builder.h"
99
#include "Update.h"
@@ -128,7 +128,7 @@ void ArduinoOTAClass::begin() {
128128
if (!_hostname.length()) {
129129
char tmp[20];
130130
uint8_t mac[6];
131-
WiFi.macAddress(mac);
131+
Network.macAddress(mac);
132132
sprintf(tmp, "esp32-%02x%02x%02x%02x%02x%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
133133
_hostname = tmp;
134134
}
@@ -266,7 +266,7 @@ void ArduinoOTAClass::_runUpdate() {
266266
_progress_callback(0, _size);
267267
}
268268

269-
WiFiClient client;
269+
NetworkClient client;
270270
if (!client.connect(_ota_ip, _ota_port)) {
271271
if (_error_callback) {
272272
_error_callback(OTA_CONNECT_ERROR);

Diff for: libraries/ArduinoOTA/src/ArduinoOTA.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#ifndef __ARDUINO_OTA_H
22
#define __ARDUINO_OTA_H
33

4-
#include <WiFi.h>
5-
#include <functional>
4+
#include "Network.h"
65
#include "Update.h"
6+
#include <functional>
77

88
#define INT_BUFFER_SIZE 16
99

@@ -86,7 +86,7 @@ class ArduinoOTAClass
8686
String _hostname;
8787
String _partition_label;
8888
String _nonce;
89-
WiFiUDP _udp_ota;
89+
NetworkUDP _udp_ota;
9090
bool _initialized;
9191
bool _rebootOnSuccess;
9292
bool _mdnsEnabled;

0 commit comments

Comments
 (0)