From 3dfc812a0c1cf6ccbbafe908f789e19fc31fbe02 Mon Sep 17 00:00:00 2001
From: Khoi Hoang <57012152+khoih-prog@users.noreply.github.com>
Date: Wed, 11 Jan 2023 15:09:18 -0500
Subject: [PATCH] v1.5.3 using `SPI_DMA_CH_AUTO`
#### Releases v1.5.3
1. Using `SPI_DMA_CH_AUTO`
---
README.md | 34 ++++++++++++++++-----------
changelog.md | 5 ++++
library.json | 4 ++--
library.properties | 2 +-
platformio/platformio.ini | 12 +++++++---
src/WebServer_ESP32_W6100.h | 13 +++++-----
src/WebServer_ESP32_W6100.hpp | 5 +++-
src/WebServer_ESP32_W6100_Debug.h | 3 ++-
src/WebServer_ESP32_W6100_Impl.h | 5 +++-
src/w6100/esp32_w6100.cpp | 5 ++--
src/w6100/esp32_w6100.h | 5 ++--
src/w6100/esp_eth/esp_eth_mac_w6100.c | 5 ++--
src/w6100/esp_eth/esp_eth_phy_w6100.c | 5 ++--
src/w6100/esp_eth/esp_eth_spi_w6100.c | 7 +++---
src/w6100/esp_eth/esp_eth_w6100.h | 5 ++--
src/w6100/esp_eth/w6100.h | 5 ++--
16 files changed, 76 insertions(+), 44 deletions(-)
diff --git a/README.md b/README.md
index 6f8d258..951cc68 100644
--- a/README.md
+++ b/README.md
@@ -105,10 +105,12 @@ This [**WebServer_ESP32_W6100** library](https://github.com/khoih-prog/WebServer
1. **ESP32_DEV with W6100 boards** using `LwIP W6100 Ethernet`
-
+---
#### W6100
+`FULL_DUPLEX, 100Mbps`
+
@@ -399,6 +401,8 @@ You can change the `INT` pin to another one. Default is `GPIO4`
#### W6100
+`FULL_DUPLEX, 100Mbps`
+
@@ -471,7 +475,7 @@ The following are debug terminal output and screen shot when running example [Ad
```cpp
Start AdvancedWebServer on ESP32_DEV with ESP32_W6100
-WebServer_ESP32_W6100 v1.5.2 for core v2.0.0+
+WebServer_ESP32_W6100 v1.5.3 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 2
[EWS] MOSI: 23
@@ -499,7 +503,7 @@ The terminal output of **ESP32_DEV with W6100** running [MQTT_ThingStream exampl
```cpp
Start MQTT_ThingStream on ESP32_DEV with ESP32_W6100
-WebServer_ESP32_W6100 v1.5.2 for core v2.0.0+
+WebServer_ESP32_W6100 v1.5.3 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 2
[EWS] MOSI: 23
@@ -532,7 +536,7 @@ The terminal output of **ESP32_DEV with W6100** running [MQTTClient_Auth example
```cpp
Start MQTTClient_Auth on ESP32_DEV with ESP32_W6100
-WebServer_ESP32_W6100 v1.5.2 for core v2.0.0+
+WebServer_ESP32_W6100 v1.5.3 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 2
[EWS] MOSI: 23
@@ -562,7 +566,7 @@ The terminal output of **ESP32_DEV with W6100** running [MQTTClient_Basic exampl
```cpp
Start MQTTClient_Basic on ESP32_DEV with ESP32_W6100
-WebServer_ESP32_W6100 v1.5.2 for core v2.0.0+
+WebServer_ESP32_W6100 v1.5.3 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 2
[EWS] MOSI: 23
@@ -593,7 +597,7 @@ The terminal output of **ESP32_DEV with W6100** running [WebClient example](exam
```cpp
Start WebClient on ESP32_DEV with ESP32_W6100
-WebServer_ESP32_W6100 v1.5.2 for core v2.0.0+
+WebServer_ESP32_W6100 v1.5.3 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 2
[EWS] MOSI: 23
@@ -612,7 +616,7 @@ FULL_DUPLEX, 100Mbps
Starting connection to server...
Connected to server
HTTP/1.1 200 OK
-Date: Sun, 08 Jan 2023 21:34:02 GMT
+Date: Wed, 11 Jan 2023 19:29:39 GMT
Content-Type: text/plain
Content-Length: 2263
Connection: close
@@ -679,7 +683,7 @@ The terminal output of **ESP32_DEV with W6100** running [UdpNTPClient example](e
```cpp
Start UdpNTPClient on ESP32_DEV with ESP32_W6100
-WebServer_ESP32_W6100 v1.5.2 for core v2.0.0+
+WebServer_ESP32_W6100 v1.5.3 for core v2.0.0+
[EWS] Default SPI pinout:
[EWS] SPI_HOST: 2
[EWS] MOSI: 23
@@ -695,10 +699,10 @@ ETH Connected
ETH MAC: 0C:B8:15:D8:01:D7, IPv4: 192.168.2.87
FULL_DUPLEX, 100Mbps
UDP Packet received, size 48
-From 132.163.96.6, port 123
-Seconds since Jan 1 1900 = 3882196591
-Unix time = 1673207791
-The UTC time is 19:56:31
+From 132.163.97.3, port 123
+Seconds since Jan 1 1900 = 3882452857
+Unix time = 1673464057
+The UTC time is 19:07:37
```
---
@@ -739,7 +743,9 @@ Submit issues to: [WebServer_ESP32_W6100 issues](https://github.com/khoih-prog/W
### DONE
1. Add support to ESP32-based **ESP32_DEV with W6100** using `LwIP W6100 Ethernet`
-
+ 2. Using `SPI_DMA_CH_AUTO`
+
+
---
---
@@ -780,6 +786,6 @@ If you want to contribute to this project:
- Copyright (c) 2016- Hristo Gochkov
-- Copyright (c) 2022- Khoi Hoang
+- Copyright (c) 2023- Khoi Hoang
diff --git a/changelog.md b/changelog.md
index d823c4f..e8a6e0e 100644
--- a/changelog.md
+++ b/changelog.md
@@ -16,6 +16,7 @@
* [Changelog](#changelog)
+ * [Releases v1.5.3](#releases-v153)
* [Releases v1.5.2](#releases-v152)
---
@@ -23,6 +24,10 @@
## Changelog
+#### Releases v1.5.3
+
+1. Using `SPI_DMA_CH_AUTO`
+
#### Releases v1.5.2
1. Initial coding to support ESP32 boards using `W6100 LwIP Ethernet`. Sync with [WebServer_ESP32_W6100 v1.5.2](https://github.com/khoih-prog/WebServer_ESP32_W6100)
diff --git a/library.json b/library.json
index 8d58940..2296803 100644
--- a/library.json
+++ b/library.json
@@ -1,7 +1,7 @@
{
"name": "WebServer_ESP32_W6100",
- "version": "1.5.2",
- "keywords": "WebServer, Ethernet, MQTT, MQTTS, HTTP, HTTPS, SSL, Arduino, ESP32, W6100, HTTP-Client, WebSocket-Client, MQTT-Client, server, client, websocket, LittleFS, SPIFFS, ThingStream",
+ "version": "1.5.3",
+ "keywords": "WebServer, Ethernet, MQTT, MQTTS, HTTP, HTTPS, SSL, Arduino, ESP32, w6100, lwip-w6100, lwip-ethernet, HTTP-Client, WebSocket-Client, MQTT-Client, server, client, websocket, LittleFS, SPIFFS, ThingStream",
"description": "Simple Ethernet WebServer, HTTP/HTTPS Client wrapper library for ESP32 boards using W6100 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",
"authors":
{
diff --git a/library.properties b/library.properties
index 58d9cf6..055814e 100644
--- a/library.properties
+++ b/library.properties
@@ -1,5 +1,5 @@
name=WebServer_ESP32_W6100
-version=1.5.2
+version=1.5.3
author=Khoi Hoang
license=GPLv3
maintainer=Khoi Hoang
diff --git a/platformio/platformio.ini b/platformio/platformio.ini
index 6e30ad4..8fee90b 100644
--- a/platformio/platformio.ini
+++ b/platformio/platformio.ini
@@ -29,19 +29,24 @@ upload_speed = 921600
;monitor_speed = 9600
;monitor_port = COM11
+; ============================================================
; Checks for the compatibility with frameworks and dev/platforms
lib_compat_mode = strict
lib_ldf_mode = chain+
;lib_ldf_mode = deep+
+; ============================================================
lib_deps =
+; ============================================================
build_flags =
; set your debug output (default=Serial)
-D DEBUG_ESP_PORT=Serial
; comment the following line to enable WiFi debugging
-D NDEBUG
+; ============================================================
+; ============================================================
[env:ESP32]
platform = espressif32
framework = arduino
@@ -85,7 +90,7 @@ board = esp32doit-devkit-v1
;board = nina_w10
; ============================================================
-
+; ============================================================
[env:esp32s2]
platform = espressif32
framework = arduino
@@ -115,7 +120,7 @@ build_flags =
-DARDUINO_VARIANT="esp32s2"
; ============================================================
-
+; ============================================================
[env:esp32s3]
platform = espressif32
framework = arduino
@@ -135,7 +140,7 @@ build_flags =
-DARDUINO_VARIANT="esp32s3"
; ============================================================
-
+; ============================================================
[env:esp32sc3]
platform = espressif32
framework = arduino
@@ -155,3 +160,4 @@ build_flags =
-DARDUINO_VARIANT="esp32c3"
; ============================================================
+; ============================================================
diff --git a/src/WebServer_ESP32_W6100.h b/src/WebServer_ESP32_W6100.h
index af1a2cd..d0a2681 100644
--- a/src/WebServer_ESP32_W6100.h
+++ b/src/WebServer_ESP32_W6100.h
@@ -9,11 +9,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_W6100
Licensed under GPLv3 license
- Version: 1.5.2
+ Version: 1.5.3
Version Modified By Date Comments
------- ----------- ---------- -----------
1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W5500 v1.5.2
+ 1.5.3 K Hoang 11/01/2023 Using `SPI_DMA_CH_AUTO`
*****************************************************************************************************************************/
#pragma once
@@ -31,20 +32,20 @@
#warning Using code for ESP32 core v2.0.0+ in WebServer_ESP32_W6100.h
#endif
- #define WEBSERVER_ESP32_W6100_VERSION "WebServer_ESP32_W6100 v1.5.2 for core v2.0.0+"
+ #define WEBSERVER_ESP32_W6100_VERSION "WebServer_ESP32_W6100 v1.5.3 for core v2.0.0+"
#else
#if (_ETHERNET_WEBSERVER_LOGLEVEL_ > 3)
#warning Using code for ESP32 core v1.0.6- in WebServer_ESP32_W6100.h
#endif
- #define WEBSERVER_ESP32_W6100_VERSION "WebServer_ESP32_W6100 v1.5.2 for core v1.0.6-"
+ #define WEBSERVER_ESP32_W6100_VERSION "WebServer_ESP32_W6100 v1.5.3 for core v1.0.6-"
#endif
#define WEBSERVER_ESP32_W6100_VERSION_MAJOR 1
#define WEBSERVER_ESP32_W6100_VERSION_MINOR 5
-#define WEBSERVER_ESP32_W6100_VERSION_PATCH 2
+#define WEBSERVER_ESP32_W6100_VERSION_PATCH 3
-#define WEBSERVER_ESP32_W6100_VERSION_INT 1005002
+#define WEBSERVER_ESP32_W6100_VERSION_INT 1005003
//////////////////////////////////////////////////////////////
@@ -54,7 +55,7 @@
#error ESP32_S2 not supported. Use WebServer_ESP32_SC_W6100 library
-#elif ( ARDUINO_ESP32C3_DEV )
+#elif ( defined(ARDUINO_ESP32C3_DEV) )
#error ESP32_C3 not supported. Use WebServer_ESP32_SC_W6100 library
diff --git a/src/WebServer_ESP32_W6100.hpp b/src/WebServer_ESP32_W6100.hpp
index 8e467fc..f24d683 100644
--- a/src/WebServer_ESP32_W6100.hpp
+++ b/src/WebServer_ESP32_W6100.hpp
@@ -9,11 +9,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_W6100
Licensed under GPLv3 license
- Version: 1.5.2
+ Version: 1.5.3
Version Modified By Date Comments
------- ----------- ---------- -----------
1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W5500 v1.5.2
+ 1.5.3 K Hoang 11/01/2023 Using `SPI_DMA_CH_AUTO`
*****************************************************************************************************************************/
#pragma once
@@ -69,6 +70,8 @@
#define SHIELD_TYPE "ESP32_W6100"
#endif
+//////////////////////////////////////////////////////////////
+
extern bool ESP32_W6100_eth_connected;
extern void ESP32_W6100_onEvent();
diff --git a/src/WebServer_ESP32_W6100_Debug.h b/src/WebServer_ESP32_W6100_Debug.h
index fd4c922..a656c4b 100644
--- a/src/WebServer_ESP32_W6100_Debug.h
+++ b/src/WebServer_ESP32_W6100_Debug.h
@@ -9,11 +9,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_W6100
Licensed under GPLv3 license
- Version: 1.5.2
+ Version: 1.5.3
Version Modified By Date Comments
------- ----------- ---------- -----------
1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W5500 v1.5.2
+ 1.5.3 K Hoang 11/01/2023 Using `SPI_DMA_CH_AUTO`
*****************************************************************************************************************************/
#pragma once
diff --git a/src/WebServer_ESP32_W6100_Impl.h b/src/WebServer_ESP32_W6100_Impl.h
index b7624de..e49e40b 100644
--- a/src/WebServer_ESP32_W6100_Impl.h
+++ b/src/WebServer_ESP32_W6100_Impl.h
@@ -9,11 +9,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_W6100
Licensed under GPLv3 license
- Version: 1.5.2
+ Version: 1.5.3
Version Modified By Date Comments
------- ----------- ---------- -----------
1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W5500 v1.5.2
+ 1.5.3 K Hoang 11/01/2023 Using `SPI_DMA_CH_AUTO`
*****************************************************************************************************************************/
#pragma once
@@ -154,4 +155,6 @@ void ESP32_W6100_event(WiFiEvent_t event)
}
}
+//////////////////////////////////////////////////////////////
+
#endif // WEBSERVER_ESP32_W6100_IMPL_H
diff --git a/src/w6100/esp32_w6100.cpp b/src/w6100/esp32_w6100.cpp
index d7d6fba..860ca66 100644
--- a/src/w6100/esp32_w6100.cpp
+++ b/src/w6100/esp32_w6100.cpp
@@ -9,11 +9,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_W6100
Licensed under GPLv3 license
- Version: 1.5.2
+ Version: 1.5.3
Version Modified By Date Comments
------- ----------- ---------- -----------
- 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W6100 v1.5.2
+ 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W5500 v1.5.2
+ 1.5.3 K Hoang 11/01/2023 Using `SPI_DMA_CH_AUTO`
*****************************************************************************************************************************/
#define _ETHERNET_WEBSERVER_LOGLEVEL_ 1
diff --git a/src/w6100/esp32_w6100.h b/src/w6100/esp32_w6100.h
index d1e0d9b..e47ee36 100644
--- a/src/w6100/esp32_w6100.h
+++ b/src/w6100/esp32_w6100.h
@@ -9,11 +9,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_W6100
Licensed under GPLv3 license
- Version: 1.5.2
+ Version: 1.5.3
Version Modified By Date Comments
------- ----------- ---------- -----------
- 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W6100 v1.5.2
+ 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W5500 v1.5.2
+ 1.5.3 K Hoang 11/01/2023 Using `SPI_DMA_CH_AUTO`
*****************************************************************************************************************************/
#pragma once
diff --git a/src/w6100/esp_eth/esp_eth_mac_w6100.c b/src/w6100/esp_eth/esp_eth_mac_w6100.c
index 0ed7777..9514635 100644
--- a/src/w6100/esp_eth/esp_eth_mac_w6100.c
+++ b/src/w6100/esp_eth/esp_eth_mac_w6100.c
@@ -9,11 +9,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_W6100
Licensed under GPLv3 license
- Version: 1.5.2
+ Version: 1.5.3
Version Modified By Date Comments
------- ----------- ---------- -----------
- 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W6100 v1.5.2
+ 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W5500 v1.5.2
+ 1.5.3 K Hoang 11/01/2023 Using `SPI_DMA_CH_AUTO`
*****************************************************************************************************************************/
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD
diff --git a/src/w6100/esp_eth/esp_eth_phy_w6100.c b/src/w6100/esp_eth/esp_eth_phy_w6100.c
index 0ff4e3c..820a17f 100644
--- a/src/w6100/esp_eth/esp_eth_phy_w6100.c
+++ b/src/w6100/esp_eth/esp_eth_phy_w6100.c
@@ -9,11 +9,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_W6100
Licensed under GPLv3 license
- Version: 1.5.2
+ Version: 1.5.3
Version Modified By Date Comments
------- ----------- ---------- -----------
- 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W6100 v1.5.2
+ 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W5500 v1.5.2
+ 1.5.3 K Hoang 11/01/2023 Using `SPI_DMA_CH_AUTO`
*****************************************************************************************************************************/
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD
//
diff --git a/src/w6100/esp_eth/esp_eth_spi_w6100.c b/src/w6100/esp_eth/esp_eth_spi_w6100.c
index 2ec53f9..46b118e 100644
--- a/src/w6100/esp_eth/esp_eth_spi_w6100.c
+++ b/src/w6100/esp_eth/esp_eth_spi_w6100.c
@@ -9,11 +9,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_W6100
Licensed under GPLv3 license
- Version: 1.5.2
+ Version: 1.5.3
Version Modified By Date Comments
------- ----------- ---------- -----------
- 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W6100 v1.5.2
+ 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W5500 v1.5.2
+ 1.5.3 K Hoang 11/01/2023 Using `SPI_DMA_CH_AUTO`
*****************************************************************************************************************************/
#include
@@ -101,7 +102,7 @@ esp_eth_mac_t* w6100_begin(int MISO_GPIO, int MOSI_GPIO, int SCLK_GPIO, int CS_G
.quadhd_io_num = -1,
};
- if ( ESP_OK != spi_bus_initialize( SPIHOST, &buscfg, 1 ))
+ if ( ESP_OK != spi_bus_initialize( SPIHOST, &buscfg, SPI_DMA_CH_AUTO ))
{
ESP_LOGE(TAG, "%s(%d): Error spi_bus_initialize", __FUNCTION__, __LINE__);
diff --git a/src/w6100/esp_eth/esp_eth_w6100.h b/src/w6100/esp_eth/esp_eth_w6100.h
index 40fa77f..5b06479 100644
--- a/src/w6100/esp_eth/esp_eth_w6100.h
+++ b/src/w6100/esp_eth/esp_eth_w6100.h
@@ -9,11 +9,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_W6100
Licensed under GPLv3 license
- Version: 1.5.2
+ Version: 1.5.3
Version Modified By Date Comments
------- ----------- ---------- -----------
- 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W6100 v1.5.2
+ 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W5500 v1.5.2
+ 1.5.3 K Hoang 11/01/2023 Using `SPI_DMA_CH_AUTO`
*****************************************************************************************************************************/
// Copyright 2021 Espressif Systems (Shanghai) PTE LTD
diff --git a/src/w6100/esp_eth/w6100.h b/src/w6100/esp_eth/w6100.h
index 97382cd..2d0c24b 100644
--- a/src/w6100/esp_eth/w6100.h
+++ b/src/w6100/esp_eth/w6100.h
@@ -9,11 +9,12 @@
Built by Khoi Hoang https://github.com/khoih-prog/WebServer_ESP32_W6100
Licensed under GPLv3 license
- Version: 1.5.2
+ Version: 1.5.3
Version Modified By Date Comments
------- ----------- ---------- -----------
- 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W6100 v1.5.2
+ 1.5.2 K Hoang 06/01/2022 Initial coding for ESP32_W6100 (ESP32 + W6100). Sync with WebServer_ESP32_W5500 v1.5.2
+ 1.5.3 K Hoang 11/01/2023 Using `SPI_DMA_CH_AUTO`
*****************************************************************************************************************************/
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD