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

Commit 12d24f6

Browse files
authored
v1.0.1 to use SPI_DMA_CH_AUTO
#### Releases v1.0.1 1. Using `SPI_DMA_CH_AUTO` instead of manually selected 2. Add example [multiFileProject]](https://github.com/khoih-prog/WebServer_ESP32_SC_W5500/tree/main/examples/multiFileProject)
1 parent 95545b5 commit 12d24f6

22 files changed

+358
-73
lines changed

README.md

Lines changed: 104 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* [VS Code & PlatformIO](#vs-code--platformio)
2626
* [Libraries' Patches](#libraries-patches)
2727
* [1. For fixing ESP32 compile error](#1-for-fixing-esp32-compile-error)
28+
* [HOWTO Fix `Multiple Definitions` Linker Error](#howto-fix-multiple-definitions-linker-error)
2829
* [HOWTO Use analogRead() with ESP32 running WiFi and/or BlueTooth (BT/BLE)](#howto-use-analogread-with-esp32-running-wifi-andor-bluetooth-btble)
2930
* [1. ESP32 has 2 ADCs, named ADC1 and ADC2](#1--esp32-has-2-adcs-named-adc1-and-adc2)
3031
* [2. ESP32 ADCs functions](#2-esp32-adcs-functions)
@@ -50,6 +51,7 @@
5051
* [12. WebClient](examples/WebClient)
5152
* [13. WebClientRepeating](examples/WebClientRepeating)
5253
* [14. WebServer](examples/WebServer)
54+
* [15. **multiFileProject**](examples/multiFileProject)
5355
* [Example AdvancedWebServer](#example-advancedwebserver)
5456
* [File AdvancedWebServer.ino](#file-advancedwebserverino)
5557
* [Debug Terminal Output Samples](#debug-terminal-output-samples)
@@ -100,7 +102,7 @@ Please also check these twin libraries
100102
1. [WebServer_WT32_ETH01](https://github.com/khoih-prog/WebServer_WT32_ETH01) for ESP32-based `WT32_ETH01` using `LwIP LAN8720`
101103
2. [WebServer_ESP32_ENC](https://github.com/khoih-prog/WebServer_ESP32_ENC) for ESP32-boards using `LwIP ENC28J60`
102104
3. [WebServer_ESP32_W5500](https://github.com/khoih-prog/WebServer_ESP32_W5500) for ESP32-boards using `LwIP W5500`
103-
105+
4. [WebServer_ESP32_SC_ENC](https://github.com/khoih-prog/WebServer_ESP32_SC_ENC) for ESP32_S3-boards using `LwIP ENC28J60`
104106

105107

106108
#### Currently supported Boards
@@ -111,6 +113,23 @@ This [**WebServer_ESP32_SC_W5500** library](https://github.com/khoih-prog/WebSer
111113

112114
Hopefully the `ESP32_S2` and `ESP32_C3-based` boards will be supported in the near future to use `LwIP W5500 or ENC28J60 Ethernet`
113115

116+
117+
#### ESP32S3_DEV
118+
119+
<p align="center">
120+
<img src="https://github.com/khoih-prog/WebServer_ESP32_SC_W5500/raw/main/pics/ESP32S3_DEV.png">
121+
</p>
122+
123+
#### W5500
124+
125+
<p align="center">
126+
<img src="https://github.com/khoih-prog/WebServer_ESP32_SC_W5500/raw/main/pics/W5500.png">
127+
</p>
128+
129+
<p align="center">
130+
<img src="https://github.com/khoih-prog/WebServer_ESP32_SC_W5500/raw/main/pics/W5500_small.png">
131+
</p>
132+
114133
---
115134
---
116135

@@ -157,6 +176,32 @@ To fix [`ESP32 compile error`](https://github.com/espressif/arduino-esp32), just
157176
- [Server.h](LibraryPatches/esp32/cores/esp32/Server.h)
158177

159178

179+
---
180+
---
181+
182+
183+
### HOWTO Fix `Multiple Definitions` Linker Error
184+
185+
The current library implementation, using `xyz-Impl.h` instead of standard `xyz.cpp`, possibly creates certain `Multiple Definitions` Linker error in certain use cases.
186+
187+
You can include this `.hpp` file
188+
189+
```cpp
190+
// Can be included as many times as necessary, without `Multiple Definitions` Linker Error
191+
#include "WebServer_ESP32_SC_W5500.hpp" //https://github.com/khoih-prog/WebServer_ESP32_SC_W5500
192+
```
193+
194+
in many files. But be sure to use the following `.h` file **in just 1 `.h`, `.cpp` or `.ino` file**, which must **not be included in any other file**, to avoid `Multiple Definitions` Linker Error
195+
196+
```cpp
197+
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
198+
#include "WebServer_ESP32_SC_W5500.h" //https://github.com/khoih-prog/WebServer_ESP32_SC_W5500
199+
```
200+
201+
Check the new [**multiFileProject** example](examples/multiFileProject) for a `HOWTO` demo.
202+
203+
204+
160205
---
161206
---
162207

@@ -358,6 +403,52 @@ void serveStatic();
358403
size_t streamFile();
359404
```
360405

406+
407+
---
408+
---
409+
410+
### How to connect W5500 to ESP32_S3
411+
412+
You can change the `INT` pin to another one. Default is `GPIO4`
413+
414+
```cpp
415+
// Must connect INT to GPIOxx or not working
416+
#define INT_GPIO 4
417+
```
418+
419+
---
420+
421+
422+
#### ESP32S3_DEV
423+
424+
<p align="center">
425+
<img src="https://github.com/khoih-prog/WebServer_ESP32_SC_W5500/raw/main/pics/ESP32S3_DEV.png">
426+
</p>
427+
428+
#### W5500
429+
430+
<p align="center">
431+
<img src="https://github.com/khoih-prog/WebServer_ESP32_SC_W5500/raw/main/pics/W5500.png">
432+
</p>
433+
434+
<p align="center">
435+
<img src="https://github.com/khoih-prog/WebServer_ESP32_SC_W5500/raw/main/pics/W5500_small.png">
436+
</p>
437+
438+
439+
440+
|W5500|<--->|ESP32_S3|
441+
|:-:|:-:|:-:|
442+
|MOSI|<--->|GPIO11|
443+
|MISO|<--->|GPIO13|
444+
|SCK|<--->|GPIO12|
445+
|SS|<--->|GPIO10|
446+
|INT|<--->|GPIO4|
447+
|RST|<--->|RST|
448+
|GND|<--->|GND|
449+
|3.3V|<--->|3.3V|
450+
451+
361452
---
362453
---
363454

@@ -379,7 +470,7 @@ size_t streamFile();
379470
12. [WebClient](examples/WebClient)
380471
13. [WebClientRepeating](examples/WebClientRepeating)
381472
14. [WebServer](examples/WebServer)
382-
473+
15. [**multiFileProject**](examples/multiFileProject)
383474

384475
---
385476
---
@@ -406,7 +497,7 @@ The following are debug terminal output and screen shot when running example [Ad
406497

407498
```cpp
408499
Start AdvancedWebServer on ESP32S3_DEV with ESP32_S3_W5500
409-
WebServer_ESP32_SC_W5500 v1.0.0 for core v2.0.0+
500+
WebServer_ESP32_SC_W5500 v1.0.1 for core v2.0.0+
410501
[EWS] Default SPI pinout:
411502
[EWS] SPI_HOST: 2
412503
[EWS] MOSI: 11
@@ -434,7 +525,7 @@ The terminal output of **ESP32S3_DEV with W5500** running [MQTT_ThingStream exam
434525
435526
```cpp
436527
Start MQTT_ThingStream on ESP32S3_DEV with ESP32_S3_W5500
437-
WebServer_ESP32_SC_W5500 v1.0.0 for core v2.0.0+
528+
WebServer_ESP32_SC_W5500 v1.0.1 for core v2.0.0+
438529
[EWS] Default SPI pinout:
439530
[EWS] SPI_HOST: 2
440531
[EWS] MOSI: 11
@@ -467,7 +558,7 @@ The terminal output of **ESP32S3_DEV with W5500** running [MQTTClient_Auth examp
467558

468559
```cpp
469560
Start MQTTClient_Auth on ESP32S3_DEV with ESP32_S3_W5500
470-
WebServer_ESP32_SC_W5500 v1.0.0 for core v2.0.0+
561+
WebServer_ESP32_SC_W5500 v1.0.1 for core v2.0.0+
471562
[EWS] Default SPI pinout:
472563
[EWS] SPI_HOST: 2
473564
[EWS] MOSI: 11
@@ -497,7 +588,7 @@ The terminal output of **ESP32S3_DEV with W5500** running [MQTTClient_Basic exam
497588
498589
```cpp
499590
Start MQTTClient_Basic on ESP32S3_DEV with ESP32_S3_W5500
500-
WebServer_ESP32_SC_W5500 v1.0.0 for core v2.0.0+
591+
WebServer_ESP32_SC_W5500 v1.0.1 for core v2.0.0+
501592
[EWS] Default SPI pinout:
502593
[EWS] SPI_HOST: 2
503594
[EWS] MOSI: 11
@@ -527,7 +618,7 @@ The terminal output of **ESP32S3_DEV with W5500** running [WebClient example](ex
527618

528619
```cpp
529620
Start WebClient on ESP32S3_DEV with ESP32_S3_W5500
530-
WebServer_ESP32_SC_W5500 v1.0.0 for core v2.0.0+
621+
WebServer_ESP32_SC_W5500 v1.0.1 for core v2.0.0+
531622
[EWS] Default SPI pinout:
532623
[EWS] SPI_HOST: 2
533624
[EWS] MOSI: 11
@@ -613,7 +704,7 @@ The terminal output of **ESP32S3_DEV with W5500** running [UDPSendReceive exampl
613704
614705
```cpp
615706
Start UDPSendReceive on ESP32S3_DEV with ESP32_S3_W5500
616-
WebServer_ESP32_SC_W5500 v1.0.0 for core v2.0.0+
707+
WebServer_ESP32_SC_W5500 v1.0.1 for core v2.0.0+
617708
[EWS] Default SPI pinout:
618709
[EWS] SPI_HOST: 2
619710
[EWS] MOSI: 11
@@ -683,11 +774,14 @@ Submit issues to: [WebServer_ESP32_SC_W5500 issues](https://github.com/khoih-pro
683774

684775
1. Bug Searching and Killing
685776
2. Add support to **ESP32_S2 and ESP32_C3-based boards** using `LwIP W5500 Ethernet`
686-
3. Add support to **ESP32_S2/S3 and ESP32_C3-based boards** using `LwIP ENC28J60 Ethernet`
777+
3. Add support to **ESP32_S2 and ESP32_C3-based boards** using `LwIP ENC28J60 Ethernet`
687778

688779
### DONE
689780

690781
1. Add support to **ESP32S3-based boards** using `LwIP W5500 Ethernet`
782+
2. Using `SPI_DMA_CH_AUTO` instead of manually selected
783+
3. Add example [multiFileProject]](https://github.com/khoih-prog/WebServer_ESP32_SC_W5500/tree/main/examples/multiFileProject)
784+
691785

692786
---
693787
---
@@ -728,7 +822,7 @@ If you want to contribute to this project:
728822

729823
## Copyright
730824

731-
- Copyright (c) 2016- Hristo Gochkov
825+
- Copyright (c) 2016- Ivan Grokhotkov
732826

733827
- Copyright (c) 2022- Khoi Hoang
734828

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@
1616

1717
* [Changelog](#changelog)
1818
* [Releases v1.0.0](#releases-v100)
19+
* [Releases v1.0.1](#releases-v101)
1920

2021
---
2122
---
2223

2324
## Changelog
2425

26+
#### Releases v1.0.1
27+
28+
1. Using `SPI_DMA_CH_AUTO` instead of manually selected
29+
2. Add example [multiFileProject]](https://github.com/khoih-prog/WebServer_ESP32_SC_W5500/tree/main/examples/multiFileProject)
30+
2531
#### Releases v1.0.0
2632

2733
1. Initial coding to support ESP32_S3-based boards using `LwIP W5500 Ethernet`.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/****************************************************************************************************************************
2+
multiFileProject.cpp
3+
For Ethernet shields using ESP32_SC_W5500 (ESP32_S2/3, ESP32_C3 + LwIP W5500)
4+
5+
WebServer_ESP32_SC_W5500 is a library for the ESP32_S2/3, ESP32_C3 with LwIP Ethernet W5500
6+
7+
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
8+
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_SC_W5500
9+
Licensed under GPLv3 license
10+
11+
*****************************************************************************************************************************/
12+
13+
// To demo how to include files in multi-file Projects
14+
15+
#include "multiFileProject.h"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/****************************************************************************************************************************
2+
multiFileProject.h
3+
For Ethernet shields using ESP32_SC_W5500 (ESP32_S2/3, ESP32_C3 + LwIP W5500)
4+
5+
WebServer_ESP32_SC_W5500 is a library for the ESP32_S2/3, ESP32_C3 with LwIP Ethernet W5500
6+
7+
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
8+
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_SC_W5500
9+
Licensed under GPLv3 license
10+
11+
*****************************************************************************************************************************/
12+
13+
// To demo how to include files in multi-file Projects
14+
15+
#pragma once
16+
17+
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 1
18+
19+
//////////////////////////////////////////////////////////
20+
21+
// Optional values to override default settings
22+
// Don't change unless you know what you're doing
23+
//#define ETH_SPI_HOST SPI3_HOST
24+
//#define SPI_CLOCK_MHZ 25
25+
26+
// Must connect INT to GPIOxx or not working
27+
//#define INT_GPIO 4
28+
29+
//#define MISO_GPIO 19
30+
//#define MOSI_GPIO 23
31+
//#define SCK_GPIO 18
32+
//#define CS_GPIO 5
33+
34+
//////////////////////////////////////////////////////////
35+
36+
// Can be included as many times as necessary, without `Multiple Definitions` Linker Error
37+
#include "WebServer_ESP32_SC_W5500.hpp"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/****************************************************************************************************************************
2+
multiFileProject.ino
3+
For Ethernet shields using ESP32_SC_W5500 (ESP32_S2/3, ESP32_C3 + LwIP W5500)
4+
5+
WebServer_ESP32_SC_W5500 is a library for the ESP32_S2/3, ESP32_C3 with LwIP Ethernet W5500
6+
7+
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
8+
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_SC_W5500
9+
Licensed under GPLv3 license
10+
11+
*****************************************************************************************************************************/
12+
13+
// To demo how to include files in multi-file Projects
14+
15+
#include "multiFileProject.h"
16+
17+
// Can be included as many times as necessary, without `Multiple Definitions` Linker Error
18+
#include "WebServer_ESP32_SC_W5500.h"
19+
20+
void setup()
21+
{
22+
Serial.begin(115200);
23+
24+
while (!Serial);
25+
26+
delay(500);
27+
28+
Serial.println("\nStart multiFileProject");
29+
Serial.println(WEBSERVER_ESP32_SC_W5500_VERSION);
30+
31+
32+
Serial.print("You're OK now");
33+
}
34+
35+
void loop()
36+
{
37+
// put your main code here, to run repeatedly:
38+
}

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "WebServer_ESP32_SC_W5500",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"keywords": "WebServer, Ethernet, MQTT, MQTTS, HTTP, HTTPS, SSL, Arduino, ESP32, ESP32-S3, ESP32-S2, ESP32-C3, W5500, HTTP-Client, WebSocket-Client, MQTT-Client, server, client, websocket, LittleFS, SPIFFS, ThingStream",
55
"description": "Simple Ethernet WebServer, HTTP/HTTPS Client wrapper library for ESP32_S2, S3 and C3 boards using W5500 with LwIP Ethernet library. The WebServer supports HTTP(S) GET and POST requests, provides argument parsing, handles one client at a time. It provides HTTP(S), MQTT(S) Client and supports WebServer serving from LittleFS/SPIFFS",
66
"authors":

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=WebServer_ESP32_SC_W5500
2-
version=1.0.0
2+
version=1.0.1
33
author=Khoi Hoang
44
license=GPLv3
55
maintainer=Khoi Hoang <[email protected]>

pics/ESP32S3_DEV.png

294 KB
Loading

pics/W5500.png

209 KB
Loading

pics/W5500_small.png

96 KB
Loading

0 commit comments

Comments
 (0)