1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

remove lwip-v1.4 specific code (#7436)

* remove lwip-v1.4 specific code

* ditto

* ditto

* fix ip4_addr definition

* CI: change debug builds to use IPv6, remove regular IPv6 builds

* ditto

* split pio CI in four (because they last twice the time of the other builds)

* remove option from pio

* remove lwIP-1.4 from doc

* restore pio CI splitting

* fix CI debug6 script

* ditto
This commit is contained in:
david gauchard
2020-07-09 18:59:49 +02:00
committed by GitHub
parent 70e4457041
commit af1bc71a9e
135 changed files with 49 additions and 47073 deletions

View File

@ -39,10 +39,6 @@ extern "C" {
#include "lwip/err.h"
#include "lwip/dns.h"
#include "lwip/dhcp.h"
#include "lwip/init.h" // LWIP_VERSION_
#if LWIP_IPV6
#include "lwip/netif.h" // struct netif
#endif
}
#include "debug.h"
@ -249,7 +245,6 @@ wl_status_t ESP8266WiFiSTAClass::begin() {
* @param dns2 Static DNS server 2
*/
#if LWIP_VERSION_MAJOR != 1
/*
About the following call in the end of ESP8266WiFiSTAClass::config():
netif_set_addr(eagle_lwip_getif(STATION_IF), &info.ip, &info.netmask, &info.gw);
@ -267,7 +262,6 @@ wl_status_t ESP8266WiFiSTAClass::begin() {
#undef netif_set_addr // need to call lwIP-v1.4 netif_set_addr()
extern "C" struct netif* eagle_lwip_getif (int netif_index);
extern "C" void netif_set_addr (struct netif* netif, ip4_addr_t* ip, ip4_addr_t* netmask, ip4_addr_t* gw);
#endif
bool ESP8266WiFiSTAClass::config(IPAddress local_ip, IPAddress arg1, IPAddress arg2, IPAddress arg3, IPAddress dns2) {
@ -310,7 +304,7 @@ bool ESP8266WiFiSTAClass::config(IPAddress local_ip, IPAddress arg1, IPAddress a
return false;
}
#if LWIP_VERSION_MAJOR != 1 && !CORE_MOCK
#if !CORE_MOCK
// get current->previous IP address
// (check below)
struct ip_info previp;
@ -339,7 +333,7 @@ bool ESP8266WiFiSTAClass::config(IPAddress local_ip, IPAddress arg1, IPAddress a
dns_setserver(1, dns2);
}
#if LWIP_VERSION_MAJOR != 1 && !CORE_MOCK
#if !CORE_MOCK
// trigger address change by calling lwIP-v1.4 api
// (see explanation above)
// only when ip is already set by other mean (generally dhcp)
@ -525,12 +519,7 @@ IPAddress ESP8266WiFiSTAClass::gatewayIP() {
* @return IPAddress DNS Server IP
*/
IPAddress ESP8266WiFiSTAClass::dnsIP(uint8_t dns_no) {
#if LWIP_VERSION_MAJOR == 1
ip_addr_t dns_ip = dns_getserver(dns_no);
return IPAddress(dns_ip.addr);
#else
return IPAddress(dns_getserver(dns_no));
#endif
}
@ -605,11 +594,7 @@ bool ESP8266WiFiSTAClass::hostname(const char* aHostname) {
for (netif* intf = netif_list; intf; intf = intf->next) {
// unconditionally update all known interfaces
#if LWIP_VERSION_MAJOR == 1
intf->hostname = (char*)wifi_station_get_hostname();
#else
intf->hostname = wifi_station_get_hostname();
#endif
if (netif_dhcp_data(intf) != nullptr) {
// renew already started DHCP leases