Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit ad9a1a9

Browse files
authored
v2.5.0 for ESP32_S2/C3 & LwIP Ethernet
### Releases v2.5.0 1. Add support to `ESP32S2/C3` boards using `LwIP W5500 or ENC28J60 Ethernet`
1 parent fc07d21 commit ad9a1a9

File tree

12 files changed

+69
-27
lines changed

12 files changed

+69
-27
lines changed

Images/ESP32S2_DEV.png

352 KB
Loading

Images/ESP32_C3_DevKitC_02.png

205 KB
Loading

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@
1717
## Table of Contents
1818

1919
* [Changelog](#changelog)
20+
* [Releases v2.5.0](#releases-v250)
2021
* [Releases v2.4.0](#releases-v240)
2122

2223
---
2324
---
2425

2526
## Changelog
2627

28+
### Releases v2.5.0
29+
30+
1. Add support to `ESP32S2/C3` boards using `LwIP W5500 or ENC28J60 Ethernet`
31+
2732
### Releases v2.4.0
2833

2934
1. Initial coding to port [AsyncHTTPSRequest_Generic](https://github.com/khoih-prog/AsyncHTTPSRequest_Generic) to `ESP32/S2/S3/C3` boards using `LwIP W5500 / ENC28J60 / LAN8720 Ethernet`

examples/ESP32_SC_ENC/AsyncHTTPSRequest_ESP32_SC_ENC/AsyncHTTPSRequest_ESP32_SC_ENC.ino

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
#error This AsyncHTTPSRequest_ESP32_Ethernet library is currently supporting only ESP32 using LwIP Ethernet
4545
#endif
4646

47-
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPSRequest_ESP32_Ethernet v2.4.0"
48-
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_MIN 2004000
47+
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPSRequest_ESP32_Ethernet v2.5.0"
48+
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_MIN 2005000
4949

5050
/////////////////////////////////////////////////////////
5151

@@ -78,8 +78,9 @@
7878

7979
/////////////////////////////////////////////
8080

81+
// For ESP32-S3
8182
// Optional values to override default settings
82-
//#define SPI_HOST SPI2_HOST
83+
//#define ETH_SPI_HOST SPI2_HOST
8384
//#define SPI_CLOCK_MHZ 8
8485

8586
// Must connect INT to GPIOxx or not working
@@ -90,6 +91,20 @@
9091
//#define SCK_GPIO 12
9192
//#define CS_GPIO 10
9293

94+
// For ESP32_C3
95+
// Optional values to override default settings
96+
// Don't change unless you know what you're doing
97+
//#define ETH_SPI_HOST SPI2_HOST
98+
//#define SPI_CLOCK_MHZ 8
99+
100+
// Must connect INT to GPIOxx or not working
101+
//#define INT_GPIO 10
102+
103+
//#define MISO_GPIO 5
104+
//#define MOSI_GPIO 6
105+
//#define SCK_GPIO 4
106+
//#define CS_GPIO 7
107+
93108
/////////////////////////////////////////////
94109

95110
#include <WebServer_ESP32_SC_ENC.h> // https://github.com/khoih-prog/WebServer_ESP32_SC_ENC
@@ -237,7 +252,7 @@ void setup()
237252
#endif
238253

239254
AHTTPS_LOGWARN(F("Default SPI pinout:"));
240-
AHTTPS_LOGWARN1(F("SPI_HOST:"), SPI_HOST);
255+
AHTTPS_LOGWARN1(F("SPI_HOST:"), ETH_SPI_HOST);
241256
AHTTPS_LOGWARN1(F("MOSI:"), MOSI_GPIO);
242257
AHTTPS_LOGWARN1(F("MISO:"), MISO_GPIO);
243258
AHTTPS_LOGWARN1(F("SCK:"), SCK_GPIO);
@@ -257,8 +272,8 @@ void setup()
257272

258273
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
259274
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
260-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
261-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
275+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
276+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
262277

263278
// Static IP, leave without this line to get IP via DHCP
264279
//bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = 0, IPAddress dns2 = 0);

examples/ESP32_SC_W5500/AsyncHTTPSRequest_ESP32_SC_W5500/AsyncHTTPSRequest_ESP32_SC_W5500.ino

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
#error This AsyncHTTPSRequest_ESP32_Ethernet library is currently supporting only ESP32 using LwIP Ethernet
4545
#endif
4646

47-
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPSRequest_ESP32_Ethernet v2.4.0"
48-
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_MIN 2004000
47+
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_MIN_TARGET "AsyncHTTPSRequest_ESP32_Ethernet v2.5.0"
48+
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_MIN 2005000
4949

5050
/////////////////////////////////////////////////////////
5151

@@ -78,9 +78,9 @@
7878

7979
//////////////////////////////////////////////////////////
8080

81+
// For ESP32-S3
8182
// Optional values to override default settings
82-
// Don't change unless you know what you're doing
83-
//#define ETH_SPI_HOST SPI3_HOST
83+
//#define ETH_SPI_HOST SPI2_HOST
8484
//#define SPI_CLOCK_MHZ 25
8585

8686
// Must connect INT to GPIOxx or not working
@@ -91,6 +91,20 @@
9191
//#define SCK_GPIO 12
9292
//#define CS_GPIO 10
9393

94+
// For ESP32_C3
95+
// Optional values to override default settings
96+
// Don't change unless you know what you're doing
97+
//#define ETH_SPI_HOST SPI2_HOST
98+
//#define SPI_CLOCK_MHZ 25
99+
100+
// Must connect INT to GPIOxx or not working
101+
//#define INT_GPIO 10
102+
103+
//#define MISO_GPIO 5
104+
//#define MOSI_GPIO 6
105+
//#define SCK_GPIO 4
106+
//#define CS_GPIO 7
107+
94108
//////////////////////////////////////////////////////////
95109

96110
#include <WebServer_ESP32_SC_W5500.h> // https://github.com/khoih-prog/WebServer_ESP32_SC_W5500

library.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"AsyncHTTPSRequest_ESP32_Ethernet",
3-
"version": "2.4.0",
3+
"version": "2.5.0",
44
"description":"Simple Async HTTPS Request library, supporting GET, POST, PUT, PATCH, DELETE and HEAD, on top of AsyncTCP_SSL library for ESP32/S2/S3/C3, WT32_ETH01 (ESP32 + LAN8720), ESP32 using LwIP ENC28J60, W5500 or LAN8720",
55
"keywords":"communication, async, tcp, http, https, ssl, tls, esp32, esp32-s2, esp32-s3, esp32-c3, wt32-eth01, ethernet, w5500, enc28j60, lan8720, lwip, lwip-ethernet, lwip-enc28j60, lwip-w5500, lwip-lan8720",
66
"authors": [
@@ -57,13 +57,13 @@
5757
{
5858
"owner": "khoih-prog",
5959
"name": "WebServer_ESP32_SC_ENC",
60-
"version": ">=1.0.0",
60+
"version": ">=1.2.0",
6161
"platforms": ["espressif32"]
6262
},
6363
{
6464
"owner": "khoih-prog",
6565
"name": "WebServer_ESP32_SC_W5500",
66-
"version": ">=1.0.1",
66+
"version": ">=1.2.0",
6767
"platforms": ["espressif32"]
6868
}
6969
],

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=AsyncHTTPSRequest_ESP32_Ethernet
2-
version=2.4.0
2+
version=2.5.0
33
author=Bob Lemaire,Khoi Hoang <khoih.prog@gmail.com>
44
maintainer=Khoi Hoang <khoih.prog@gmail.com>
55
license=GPLv3

platformio/platformio.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ lib_deps =
4343
; WebServer_WT32_ETH01@>=1.5.1
4444
; WebServer_ESP32_W5500@>=1.5.1
4545
; WebServer_ESP32_ENC@>=1.5.1
46-
; WebServer_ESP32_SC_W5500@>=1.0.1
47-
; WebServer_ESP32_SC_ENC@>=1.0.0
46+
; WebServer_ESP32_SC_W5500@>=1.2.0
47+
; WebServer_ESP32_SC_ENC@>=1.2.0
4848
; PlatformIO 5.x
4949
khoih-prog/AsyncTCP_SSL@>=1.3.1
5050
khoih-prog/WebServer_WT32_ETH01@>=1.5.1
5151
khoih-prog/WebServer_ESP32_W5500@>=1.5.1
5252
khoih-prog/WebServer_ESP32_ENC@>=1.5.1
53-
khoih-prog/WebServer_ESP32_SC_W5500@>=1.0.1
54-
khoih-prog/WebServer_ESP32_SC_ENC@>=1.0.0
53+
khoih-prog/WebServer_ESP32_SC_W5500@>=1.2.0
54+
khoih-prog/WebServer_ESP32_SC_ENC@>=1.2.0
5555

5656
; ============================================================
5757
build_flags =

src/AsyncHTTPSRequest_ESP32_Ethernet.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
You should have received a copy of the GNU General Public License along with this program.
1919
If not, see <https://www.gnu.org/licenses/>.
2020
21-
Version: 2.4.0
21+
Version: 2.5.0
2222
2323
Version Modified By Date Comments
2424
------- ----------- ---------- -----------
2525
2.4.0 K Hoang 16/12/2022 Initial coding to port to ESP32S3 boards using LwIP W5500 or ENC28J60 Ethernet
26+
2.5.0 K Hoang 21/12/2022 Add support to ESP32S2/C3 boards using LwIP W5500 or ENC28J60 Ethernet
2627
*****************************************************************************************************************************/
2728

2829
#pragma once

src/AsyncHTTPSRequest_ESP32_Ethernet.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
You should have received a copy of the GNU General Public License along with this program.
1919
If not, see <https://www.gnu.org/licenses/>.
2020
21-
Version: 2.4.0
21+
Version: 2.5.0
2222
2323
Version Modified By Date Comments
2424
------- ----------- ---------- -----------
2525
2.4.0 K Hoang 16/12/2022 Initial coding to port to ESP32S3 boards using LwIP W5500 or ENC28J60 Ethernet
26+
2.5.0 K Hoang 21/12/2022 Add support to ESP32S2/C3 boards using LwIP W5500 or ENC28J60 Ethernet
2627
*****************************************************************************************************************************/
2728

2829
#pragma once
@@ -38,13 +39,13 @@
3839

3940
////////////////////////////////////////
4041

41-
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION "AsyncHTTPSRequest_ESP32_Ethernet v2.4.0"
42+
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION "AsyncHTTPSRequest_ESP32_Ethernet v2.5.0"
4243

4344
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_MAJOR 2
44-
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_MINOR 4
45+
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_MINOR 5
4546
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_PATCH 0
4647

47-
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_INT 2004000
48+
#define ASYNC_HTTPS_REQUEST_ESP32_ETHERNET_VERSION_INT 2005000
4849

4950
////////////////////////////////////////
5051

0 commit comments

Comments
 (0)