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

Commit ea0401f

Browse files
authored
v1.1.1
### Releases v1.1.1 1. Clean-up all compiler warnings possible. 2. Add Table of Contents 3. Add examples 4. Add Version String
1 parent a667e87 commit ea0401f

23 files changed

+570
-143
lines changed

README.md

Lines changed: 357 additions & 70 deletions
Large diffs are not rendered by default.

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "EthernetWebServer_STM32",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"keywords": "WebServer, built-in Ethernet, Arduino, STM32F, STM32L, STM32H, STM32G, STM32WB, STM32MP1, Ethernet shield, Nucleo-144, Nucleo-64, Nucleo-32, LAN8742A, ENC28J60, W5x00, W5500, W5100, Ethernet, Ethernet2, Ethernet3, EthernetLarge, EtnernetENC, UIPEthernet, HTTP-Client, WebSocket-Client, server, client, websocket",
55
"description": "Simple Ethernet WebServer, HTTP Client and WebSocket Client library for STM32F/L/H/G/WB/MP1 boards running built-in Ethernet LAN8742A or Ethernet W5x00, ENC28J60 shields",
66
"authors":

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=EthernetWebServer_STM32
2-
version=1.1.0
2+
version=1.1.1
33
author=Khoi Hoang
44
license=MIT
55
maintainer=Khoi Hoang <khoih.prog@gmail.com>

src/EthernetHttpClient_STM32.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
// Library to simplify HTTP fetching on Arduino

src/EthernetWebServer_STM32-impl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
#pragma once

src/EthernetWebServer_STM32.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
#pragma once
@@ -34,6 +35,8 @@
3435
#error This code is designed to run on STM32F/L/H/G/WB/MP1 platform! Please check your Tools->Board setting.
3536
#endif
3637

38+
#define ETHERNET_WEBSERVER_STM32_VERSION "EthernetWebServer_STM32 v1.1.1"
39+
3740
#define USE_NEW_WEBSERVER_VERSION true
3841

3942
#include <functional-vlpp.h>

src/Ethernet_HTTPClient/Ethernet_HttpClient.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
// Class to simplify HTTP fetching on Arduino
@@ -119,7 +120,7 @@ int EthernetHttpClient::startRequest(const char* aURLPath, const char* aHttpMeth
119120
{
120121
if (iServerName)
121122
{
122-
if (!iClient->connect(iServerName, iServerPort) > 0)
123+
if (! (iClient->connect(iServerName, iServerPort) > 0) )
123124
{
124125
ET_LOGDEBUG(F("EthernetHttpClient::startRequest: Connection failed"));
125126

@@ -128,7 +129,7 @@ int EthernetHttpClient::startRequest(const char* aURLPath, const char* aHttpMeth
128129
}
129130
else
130131
{
131-
if (!iClient->connect(iServerAddress, iServerPort) > 0)
132+
if (! (iClient->connect(iServerAddress, iServerPort) > 0) )
132133
{
133134
ET_LOGDEBUG(F("EthernetHttpClient::startRequest: Connection failed"));
134135

src/Ethernet_HTTPClient/Ethernet_HttpClient.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
// Class to simplify HTTP fetching on Arduino

src/Ethernet_HTTPClient/Ethernet_URLEncoder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
// Library to simplify HTTP fetching on Arduino

src/Ethernet_HTTPClient/Ethernet_URLEncoder.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
// Library to simplify HTTP fetching on Arduino

src/Ethernet_HTTPClient/Ethernet_WebSocketClient.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
// (c) Copyright Arduino. 2016

src/Ethernet_HTTPClient/Ethernet_WebSocketClient.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
// (c) Copyright Arduino. 2016

src/Parsing_STM32-impl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
#pragma once

src/detail/Debug_STM32.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
#pragma once

src/detail/RequestHandler_STM32.h

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,10 +24,16 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
#pragma once
3031

32+
#ifndef ETW_UNUSED
33+
#define ETW_UNUSED(x) (void)(x)
34+
#endif
35+
36+
3137
class RequestHandler
3238
{
3339
public:
@@ -36,20 +42,34 @@ class RequestHandler
3642

3743
virtual bool canHandle(HTTPMethod method, String uri)
3844
{
45+
ETW_UNUSED(method);
46+
ETW_UNUSED(uri);
47+
3948
return false;
4049
}
4150

4251
virtual bool canUpload(String uri)
4352
{
53+
ETW_UNUSED(uri);
54+
4455
return false;
4556
}
4657

4758
virtual bool handle(EthernetWebServer& server, HTTPMethod requestMethod, String requestUri)
4859
{
60+
ETW_UNUSED(server);
61+
ETW_UNUSED(requestMethod);
62+
ETW_UNUSED(requestUri);
63+
4964
return false;
5065
}
5166

52-
virtual void upload(EthernetWebServer& server, String requestUri, HTTPUpload& upload) {}
67+
virtual void upload(EthernetWebServer& server, String requestUri, HTTPUpload& upload)
68+
{
69+
ETW_UNUSED(server);
70+
ETW_UNUSED(requestUri);
71+
ETW_UNUSED(upload);
72+
}
5373

5474
RequestHandler* next()
5575
{

src/detail/RequestHandlersImpl_STM32.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
#pragma once
@@ -73,6 +74,8 @@ class FunctionRequestHandler : public RequestHandler
7374

7475
bool handle(EthernetWebServer& server, HTTPMethod requestMethod, String requestUri) override
7576
{
77+
ETW_UNUSED(server);
78+
7679
if (!canHandle(requestMethod, requestUri))
7780
return false;
7881

@@ -82,6 +85,9 @@ class FunctionRequestHandler : public RequestHandler
8285

8386
void upload(EthernetWebServer& server, String requestUri, HTTPUpload& upload) override
8487
{
88+
ETW_UNUSED(server);
89+
ETW_UNUSED(upload);
90+
8591
if (canUpload(requestUri))
8692
_ufn();
8793
}

src/detail/mimetable.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
88
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
99
Licensed under MIT license
10-
Version: 1.1.0
10+
Version: 1.1.1
1111
1212
Original author:
1313
@file Esp8266WebServer.h
@@ -24,6 +24,7 @@
2424
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2525
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2626
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
27+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2728
*****************************************************************************************************************************/
2829

2930
#pragma once

src/libb64/base64.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
99
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
1010
Licensed under MIT license
11-
Version: 1.1.0
11+
Version: 1.1.1
1212
1313
Original author:
1414
@file Esp8266WebServer.h
@@ -25,6 +25,7 @@
2525
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2626
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2727
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
28+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2829
*****************************************************************************************************************************/
2930

3031
#include "base64.h"

src/libb64/base64.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Based on and modified from ESP8266 https://github.com/esp8266/Arduino/releases
99
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_STM32
1010
Licensed under MIT license
11-
Version: 1.1.0
11+
Version: 1.1.1
1212
1313
Original author:
1414
@file Esp8266WebServer.h
@@ -25,6 +25,7 @@
2525
Add support to new EthernetENC library for ENC28J60. Add debug feature.
2626
1.0.6 K Hoang 24/09/2020 Add support to PROGMEM-related commands, such as sendContent_P() and send_P()
2727
1.1.0 K Hoang 17/11/2020 Add basic HTTP and WebSockets Client by merging ArduinoHttpClient
28+
1.1.1 K Hoang 26/12/2020 Suppress all possible compiler warnings. Add Version String
2829
*****************************************************************************************************************************/
2930

3031
#pragma once

0 commit comments

Comments
 (0)