forked from espressif/arduino-esp32
Add fixes
This commit is contained in:
@ -14,10 +14,9 @@
|
||||
#include "sd_diskio.h"
|
||||
#include "esp_system.h"
|
||||
extern "C" {
|
||||
#include "ffconf.h"
|
||||
#include "ff.h"
|
||||
#include "diskio.h"
|
||||
#ifdef ESP_IDF_VERSION_MAJOR
|
||||
#if ESP_IDF_VERSION_MAJOR > 3
|
||||
#include "diskio_impl.h"
|
||||
#endif
|
||||
//#include "esp_vfs.h"
|
||||
|
@ -125,9 +125,13 @@ static void _eth_phy_power_enable(bool enable)
|
||||
ETHClass::ETHClass()
|
||||
:initialized(false)
|
||||
,staticIP(false)
|
||||
,eth_handle(NULL)
|
||||
,started(false)
|
||||
,eth_link(ETH_LINK_DOWN)
|
||||
#if ESP_IDF_VERSION_MAJOR > 3
|
||||
,eth_handle(NULL)
|
||||
#endif
|
||||
,started(false)
|
||||
#if ESP_IDF_VERSION_MAJOR > 3
|
||||
,eth_link(ETH_LINK_DOWN)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
@ -348,7 +352,7 @@ IPAddress ETHClass::gatewayIP()
|
||||
|
||||
IPAddress ETHClass::dnsIP(uint8_t dns_no)
|
||||
{
|
||||
const ip_addr_t* dns_ip = dns_getserver(dns_no);
|
||||
const ip_addr_t * dns_ip = dns_getserver(dns_no);
|
||||
return IPAddress(dns_ip->u_addr.ip4.addr);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
#define ETH_PHY_MDIO 18
|
||||
#endif
|
||||
|
||||
#ifndef ESP_IDF_VERSION_MAJOR
|
||||
#if ESP_IDF_VERSION_MAJOR < 4
|
||||
#ifndef ETH_CLK_MODE
|
||||
#define ETH_CLK_MODE ETH_CLOCK_GPIO0_IN
|
||||
#endif
|
||||
@ -57,7 +57,7 @@ class ETHClass {
|
||||
private:
|
||||
bool initialized;
|
||||
bool staticIP;
|
||||
#ifdef ESP_IDF_VERSION_MAJOR
|
||||
#if ESP_IDF_VERSION_MAJOR > 3
|
||||
esp_eth_handle_t eth_handle;
|
||||
|
||||
protected:
|
||||
@ -72,7 +72,7 @@ class ETHClass {
|
||||
ETHClass();
|
||||
~ETHClass();
|
||||
|
||||
#ifdef ESP_IDF_VERSION_MAJOR
|
||||
#if ESP_IDF_VERSION_MAJOR > 3
|
||||
bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, eth_phy_type_t type=ETH_PHY_TYPE);
|
||||
#else
|
||||
bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO, eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE);
|
||||
|
@ -488,7 +488,7 @@ IPAddress WiFiSTAClass::dnsIP(uint8_t dns_no)
|
||||
if(WiFiGenericClass::getMode() == WIFI_MODE_NULL){
|
||||
return IPAddress();
|
||||
}
|
||||
const ip_addr_t* dns_ip = dns_getserver(dns_no);
|
||||
const ip_addr_t * dns_ip = dns_getserver(dns_no);
|
||||
return IPAddress(dns_ip->u_addr.ip4.addr);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user