Skip to content

Commit bf6def2

Browse files
2 parents 935809e + a6ccad4 commit bf6def2

File tree

167 files changed

+49
-50614
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+49
-50614
lines changed

boards.txt

-238
Large diffs are not rendered by default.

cores/esp8266/AddrList.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ struct netifWrapper
128128
const char* ifmac () const { return (const char*)_netif->hwaddr; }
129129
int ifnumber () const { return _netif->num; }
130130
bool ifUp () const { return !!(_netif->flags & NETIF_FLAG_UP); }
131-
CONST netif* interface () const { return _netif; }
131+
const netif* interface () const { return _netif; }
132132

133133
const ip_addr_t* ipFromNetifNum () const
134134
{

cores/esp8266/Arduino.h

-7
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,6 @@ void optimistic_yield(uint32_t interval_us);
219219
#endif
220220

221221

222-
//for compatibility, below 4 lines to be removed in release 3.0.0
223-
#ifdef __cplusplus
224-
extern "C"
225-
#endif
226-
const int TIM_DIV265 __attribute__((deprecated, weak)) = TIM_DIV256;
227-
228-
229222

230223
#ifdef __cplusplus
231224

cores/esp8266/Client.h

-2
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ class Client: public Stream {
4242
uint8_t* rawIPAddress(IPAddress& addr) {
4343
return addr.raw_address();
4444
}
45-
#if LWIP_VERSION_MAJOR != 1
4645
const uint8_t* rawIPAddress(const IPAddress& addr) {
4746
return addr.raw_address();
4847
}
49-
#endif
5048
};
5149

5250
#endif

cores/esp8266/Esp-version.cpp

-19
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,18 @@
2121
#include <Arduino.h>
2222
#include <user_interface.h>
2323
#include <core_version.h>
24-
#include <lwip/init.h> // LWIP_VERSION_*
2524
#include <lwipopts.h> // LWIP_HASH_STR (lwip2)
2625
#include <bearssl/bearssl_git.h> // BEARSSL_GIT short hash
2726

2827
#define STRHELPER(x) #x
2928
#define STR(x) STRHELPER(x) // stringifier
3029

3130
static const char arduino_esp8266_git_ver [] PROGMEM = "/Core:" STR(ARDUINO_ESP8266_GIT_DESC) "=";
32-
#if LWIP_VERSION_MAJOR > 1
3331
#if LWIP_IPV6
3432
static const char lwip_version [] PROGMEM = "/lwIP:IPv6+" LWIP_HASH_STR;
3533
#else
3634
static const char lwip_version [] PROGMEM = "/lwIP:" LWIP_HASH_STR;
3735
#endif
38-
#endif
3936
static const char bearssl_version [] PROGMEM = "/BearSSL:" STR(BEARSSL_GIT);
4037

4138
String EspClass::getFullVersion() {
@@ -45,23 +42,7 @@ String EspClass::getFullVersion() {
4542
s += system_get_sdk_version();
4643
s += FPSTR(arduino_esp8266_git_ver);
4744
s += String(esp8266::coreVersionNumeric());
48-
#if LWIP_VERSION_MAJOR == 1
49-
s += F("/lwIP:");
50-
s += LWIP_VERSION_MAJOR;
51-
s += '.';
52-
s += LWIP_VERSION_MINOR;
53-
s += '.';
54-
s += LWIP_VERSION_REVISION;
55-
#if LWIP_VERSION_IS_DEVELOPMENT
56-
s += F("-dev");
57-
#endif
58-
#if LWIP_VERSION_IS_RC
59-
s += F("rc");
60-
s += String(LWIP_VERSION_RC);
61-
#endif
62-
#else // LWIP_VERSION_MAJOR != 1
6345
s += FPSTR(lwip_version);
64-
#endif // LWIP_VERSION_MAJOR != 1
6546
s += FPSTR(bearssl_version);
6647

6748
return s;

cores/esp8266/IPAddress.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ bool IPAddress::isValid(const char* arg) {
180180
return IPAddress().fromString(arg);
181181
}
182182

183-
CONST IPAddress INADDR_ANY; // generic "0.0.0.0" for IPv4 & IPv6
183+
const IPAddress INADDR_ANY; // generic "0.0.0.0" for IPv4 & IPv6
184184
const IPAddress INADDR_NONE(255,255,255,255);
185185

186186
/**************************************/

cores/esp8266/IPAddress.h

+2-19
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,11 @@
2626

2727
#include <lwip/init.h>
2828
#include <lwip/ip_addr.h>
29+
#include <lwip/ip4_addr.h>
2930

30-
#if LWIP_VERSION_MAJOR == 1
31-
// compatibility macros to make lwIP-v1 compiling lwIP-v2 API
32-
#define LWIP_IPV6_NUM_ADDRESSES 0
33-
#define ip_2_ip4(x) (x)
34-
#define ipv4_addr ip_addr
35-
#define ipv4_addr_t ip_addr_t
36-
#define IP_IS_V4_VAL(x) (1)
37-
#define IP_SET_TYPE_VAL(x,y) do { (void)0; } while (0)
38-
#define IP_ANY_TYPE (&ip_addr_any)
39-
#define IP4_ADDR_ANY IPADDR_ANY
40-
#define IP4_ADDR_ANY4 IP_ADDR_ANY
41-
#define IPADDR4_INIT(x) { x }
42-
#define CONST /* nothing: lwIP-v1 does not use const */
43-
#define ip4_addr_netcmp ip_addr_netcmp
44-
#define netif_dhcp_data(netif) ((netif)->dhcp)
45-
#else // lwIP-v2+
46-
#define CONST const
4731
#if !LWIP_IPV6
4832
struct ip_addr: ipv4_addr { };
4933
#endif // !LWIP_IPV6
50-
#endif // lwIP-v2+
5134

5235
// A class to make it easier to handle and pass around IP addresses
5336
// IPv6 update:
@@ -220,7 +203,7 @@ class IPAddress: public Printable {
220203

221204
};
222205

223-
extern CONST IPAddress INADDR_ANY;
206+
extern const IPAddress INADDR_ANY;
224207
extern const IPAddress INADDR_NONE;
225208

226209
#endif

cores/esp8266/Udp.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ class UDP: public Stream {
8383
// Return the port of the host who sent the current incoming packet
8484
virtual uint16_t remotePort() =0;
8585
protected:
86+
8687
uint8_t* rawIPAddress(IPAddress& addr) {
8788
return addr.raw_address();
8889
}
89-
#if LWIP_VERSION_MAJOR != 1
90+
9091
const uint8_t* rawIPAddress(const IPAddress& addr) {
9192
return addr.raw_address();
9293
}
93-
#endif
9494
};
9595

9696
#endif

cores/esp8266/sntp-lwip2.cpp

-40
Original file line numberDiff line numberDiff line change
@@ -60,44 +60,6 @@ void settimeofday_cb (const TrivialCB& cb)
6060

6161
extern "C" {
6262

63-
#if LWIP_VERSION_MAJOR == 1
64-
65-
#include <pgmspace.h>
66-
67-
static const char stod14[] PROGMEM = "settimeofday() can't set time!\n";
68-
bool sntp_set_timezone(sint8 timezone);
69-
bool sntp_set_timezone_in_seconds(int32_t timezone)
70-
{
71-
return sntp_set_timezone((sint8)(timezone/(60*60))); //TODO: move this to the same file as sntp_set_timezone() in lwip1.4, and implement correctly over there.
72-
}
73-
74-
void sntp_set_daylight(int daylight);
75-
76-
int settimeofday(const struct timeval* tv, const struct timezone* tz)
77-
{
78-
if (tz) /*before*/
79-
{
80-
sntp_set_timezone_in_seconds(tz->tz_minuteswest * 60);
81-
// apparently tz->tz_dsttime is a bitfield and should not be further used (cf man)
82-
sntp_set_daylight(0);
83-
}
84-
if (tv) /* after*/
85-
{
86-
// can't call lwip1.4's static sntp_set_system_time()
87-
os_printf(stod14);
88-
89-
// reset time subsystem
90-
timeshift64_is_set = false;
91-
92-
return -1;
93-
}
94-
return 0;
95-
}
96-
97-
#endif // lwip 1.4 only
98-
99-
#if LWIP_VERSION_MAJOR == 2
100-
10163
#include <lwip/apps/sntp.h>
10264

10365
uint32_t sntp_real_timestamp = 0;
@@ -128,6 +90,4 @@ int settimeofday(const struct timeval* tv, const struct timezone* tz)
12890
return 0;
12991
}
13092

131-
#endif // lwip2 only
132-
13393
};

cores/esp8266/time.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@ int clock_gettime(clockid_t unused, struct timespec *tp)
7373
return 0;
7474
}
7575

76-
#if LWIP_VERSION_MAJOR == 1
77-
// hack for espressif time management included in patched lwIP-1.4
78-
#define sntp_real_timestamp sntp_get_current_timestamp()
79-
#endif
80-
81-
#if LWIP_VERSION_MAJOR != 1
82-
8376
// backport Espressif api
8477

8578
bool sntp_set_timezone_in_seconds (int32_t timezone_sec)
@@ -103,8 +96,6 @@ uint32 sntp_get_current_timestamp()
10396
return sntp_real_timestamp;
10497
}
10598

106-
#endif
107-
10899
time_t time(time_t * t)
109100
{
110101
if (t)

doc/esp8266wifi/client-class.rst

+1-4
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,4 @@ Other Function Calls
107107
IPAddress localIP ()
108108
uint16_t localPort ()
109109
110-
Documentation for the above functions is not yet prepared.
111-
112-
For code samples please refer to separate section with `examples
113-
:arrow\_right: <client-examples.rst>`__ dedicated specifically to the Client Class.
110+
Documentation for the above functions is not yet available.

0 commit comments

Comments
 (0)