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

Commit b1751ff

Browse files
authored
v1.9.0 for ESP32_S2/C3 & LwIP Ethernet
### Releases v1.9.0 1. Add support to `ESP32S2/C3` boards using `LwIP W5500 or ENC28J60 Ethernet`
1 parent 1734ab6 commit b1751ff

File tree

17 files changed

+412
-62
lines changed

17 files changed

+412
-62
lines changed

Images/ESP32S2_DEV.png

352 KB
Loading

Images/ESP32_C3_DevKitC_02.png

205 KB
Loading

README.md

Lines changed: 317 additions & 36 deletions
Large diffs are not rendered by default.

changelog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@
1515
## Table of Contents
1616

1717
* [Changelog](#changelog)
18-
* [Releases v1.8.0](#releases-v180)
18+
* [Releases v1.9.0](#releases-v190)
19+
* [Releases v1.8.0](#releases-v180)
1920

2021
---
2122
---
2223

2324
## Changelog
2425

26+
### Releases v1.9.0
27+
28+
1. Add support to `ESP32S2/C3` boards using `LwIP W5500 or ENC28J60 Ethernet`
29+
2530
### Releases v1.8.0
2631

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

examples/ESP32_SC_ENC/FullyFeaturedSSL_ESP32_SC_ENC/FullyFeaturedSSL_ESP32_SC_ENC.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ void setup()
225225
Serial.println(ASYNC_MQTT_ESP32_VERSION);
226226

227227
AMQTT_LOGWARN(F("Default SPI pinout:"));
228+
AMQTT_LOGWARN1(F("SPI_HOST:"), ETH_SPI_HOST);
228229
AMQTT_LOGWARN1(F("MOSI:"), MOSI_GPIO);
229230
AMQTT_LOGWARN1(F("MISO:"), MISO_GPIO);
230231
AMQTT_LOGWARN1(F("SCK:"), SCK_GPIO);
@@ -267,8 +268,8 @@ void setup()
267268

268269
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
269270
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
270-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
271-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
271+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
272+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
272273

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

examples/ESP32_SC_ENC/FullyFeaturedSSL_ESP32_SC_ENC/defines.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919

2020
/////////////////////////////////////////////
2121

22+
// For ESP32-S3
2223
// Optional values to override default settings
23-
//#define SPI_HOST SPI2_HOST
24+
//#define ETH_SPI_HOST SPI2_HOST
2425
//#define SPI_CLOCK_MHZ 8
2526

2627
// Must connect INT to GPIOxx or not working
@@ -31,6 +32,20 @@
3132
//#define SCK_GPIO 12
3233
//#define CS_GPIO 10
3334

35+
// For ESP32_C3
36+
// Optional values to override default settings
37+
// Don't change unless you know what you're doing
38+
//#define ETH_SPI_HOST SPI2_HOST
39+
//#define SPI_CLOCK_MHZ 8
40+
41+
// Must connect INT to GPIOxx or not working
42+
//#define INT_GPIO 10
43+
44+
//#define MISO_GPIO 5
45+
//#define MOSI_GPIO 6
46+
//#define SCK_GPIO 4
47+
//#define CS_GPIO 7
48+
3449
/////////////////////////////////////////////
3550

3651
#include <WebServer_ESP32_SC_ENC.h> // https://github.com/khoih-prog/WebServer_ESP32_SC_ENC

examples/ESP32_SC_ENC/FullyFeatured_ESP32_SC_ENC/FullyFeatured_ESP32_SC_ENC.ino

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ void setup()
211211
Serial.println(ASYNC_MQTT_ESP32_VERSION);
212212

213213
AMQTT_LOGWARN(F("Default SPI pinout:"));
214+
AMQTT_LOGWARN1(F("SPI_HOST:"), ETH_SPI_HOST);
214215
AMQTT_LOGWARN1(F("MOSI:"), MOSI_GPIO);
215216
AMQTT_LOGWARN1(F("MISO:"), MISO_GPIO);
216217
AMQTT_LOGWARN1(F("SCK:"), SCK_GPIO);
@@ -242,8 +243,8 @@ void setup()
242243

243244
//bool begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_GPIO, int INT_GPIO, int SPI_CLOCK_MHZ,
244245
// int SPI_HOST, uint8_t *ENC28J60_Mac = ENC28J60_Default_Mac);
245-
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST );
246-
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, SPI_HOST, mac[index] );
246+
//ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST );
247+
ETH.begin( MISO_GPIO, MOSI_GPIO, SCK_GPIO, CS_GPIO, INT_GPIO, SPI_CLOCK_MHZ, ETH_SPI_HOST, mac[index] );
247248

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

examples/ESP32_SC_ENC/FullyFeatured_ESP32_SC_ENC/defines.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919

2020
/////////////////////////////////////////////
2121

22+
// For ESP32-S3
2223
// Optional values to override default settings
23-
//#define SPI_HOST SPI2_HOST
24+
//#define ETH_SPI_HOST SPI2_HOST
2425
//#define SPI_CLOCK_MHZ 8
2526

2627
// Must connect INT to GPIOxx or not working
@@ -31,6 +32,20 @@
3132
//#define SCK_GPIO 12
3233
//#define CS_GPIO 10
3334

35+
// For ESP32_C3
36+
// Optional values to override default settings
37+
// Don't change unless you know what you're doing
38+
//#define ETH_SPI_HOST SPI2_HOST
39+
//#define SPI_CLOCK_MHZ 8
40+
41+
// Must connect INT to GPIOxx or not working
42+
//#define INT_GPIO 10
43+
44+
//#define MISO_GPIO 5
45+
//#define MOSI_GPIO 6
46+
//#define SCK_GPIO 4
47+
//#define CS_GPIO 7
48+
3449
/////////////////////////////////////////////
3550

3651
#include <WebServer_ESP32_SC_ENC.h> // https://github.com/khoih-prog/WebServer_ESP32_SC_ENC

examples/ESP32_SC_W5500/FullyFeaturedSSL_ESP32_SC_W5500/defines.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
//////////////////////////////////////////////////////////
2121

22+
// For ESP32-S3
2223
// Optional values to override default settings
23-
// Don't change unless you know what you're doing
24-
//#define ETH_SPI_HOST SPI3_HOST
24+
//#define ETH_SPI_HOST SPI2_HOST
2525
//#define SPI_CLOCK_MHZ 25
2626

2727
// Must connect INT to GPIOxx or not working
@@ -32,6 +32,20 @@
3232
//#define SCK_GPIO 12
3333
//#define CS_GPIO 10
3434

35+
// For ESP32_C3
36+
// Optional values to override default settings
37+
// Don't change unless you know what you're doing
38+
//#define ETH_SPI_HOST SPI2_HOST
39+
//#define SPI_CLOCK_MHZ 25
40+
41+
// Must connect INT to GPIOxx or not working
42+
//#define INT_GPIO 10
43+
44+
//#define MISO_GPIO 5
45+
//#define MOSI_GPIO 6
46+
//#define SCK_GPIO 4
47+
//#define CS_GPIO 7
48+
3549
//////////////////////////////////////////////////////////
3650

3751
#include <WebServer_ESP32_SC_W5500.h>

examples/ESP32_SC_W5500/FullyFeatured_ESP32_SC_W5500/defines.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
//////////////////////////////////////////////////////////
2121

22+
// For ESP32-S3
2223
// Optional values to override default settings
23-
// Don't change unless you know what you're doing
24-
//#define ETH_SPI_HOST SPI3_HOST
24+
//#define ETH_SPI_HOST SPI2_HOST
2525
//#define SPI_CLOCK_MHZ 25
2626

2727
// Must connect INT to GPIOxx or not working
@@ -32,6 +32,20 @@
3232
//#define SCK_GPIO 12
3333
//#define CS_GPIO 10
3434

35+
// For ESP32_C3
36+
// Optional values to override default settings
37+
// Don't change unless you know what you're doing
38+
//#define ETH_SPI_HOST SPI2_HOST
39+
//#define SPI_CLOCK_MHZ 25
40+
41+
// Must connect INT to GPIOxx or not working
42+
//#define INT_GPIO 10
43+
44+
//#define MISO_GPIO 5
45+
//#define MOSI_GPIO 6
46+
//#define SCK_GPIO 4
47+
//#define CS_GPIO 7
48+
3549
//////////////////////////////////////////////////////////
3650

3751
#include <WebServer_ESP32_SC_W5500.h>

0 commit comments

Comments
 (0)