Skip to content
Prev Previous commit
Next Next commit
Add helpers begin methods
  • Loading branch information
manchoz committed Jul 6, 2021
commit 454804a2e031c666b1622dba3a2312db37cce58c
7 changes: 6 additions & 1 deletion libraries/Ethernet/src/Ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class EthernetClass {

EthernetClass(voidPrtFuncPtr _cb) : _initializerCallback(_cb) {};

int begin(uint8_t *mac, unsigned long timeout = 60000, unsigned long responseTimeout = 4000);
int begin(uint8_t *mac = nullptr , unsigned long timeout = 60000, unsigned long responseTimeout = 4000);
// int begin(unsigned long timeout = 60000, unsigned long responseTimeout = 4000) { return begin(nullptr, timeout, responseTimeout); };
int maintain();
EthernetLinkStatus linkStatus();
EthernetHardwareStatus hardwareStatus();
Expand All @@ -67,6 +68,10 @@ class EthernetClass {
void begin(uint8_t *mac, IPAddress ip, IPAddress dns) {}
void begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway) {}
void begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) {}
void begin(IPAddress ip) {}
void begin(IPAddress ip, IPAddress dns) {}
void begin(IPAddress ip, IPAddress dns, IPAddress gateway) {}
void begin(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) {}
void init(uint8_t sspin = 10);

void MACAddress(uint8_t *mac_address);
Expand Down