Skip to content

Commit c39cfee

Browse files
committed
Add helpers begin methods
1 parent 357dba7 commit c39cfee

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libraries/Ethernet/src/Ethernet.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ class EthernetClass {
5757

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

60-
int begin(uint8_t *mac, unsigned long timeout = 60000, unsigned long responseTimeout = 4000);
60+
int begin(uint8_t *mac = nullptr , unsigned long timeout = 60000, unsigned long responseTimeout = 4000);
61+
// int begin(unsigned long timeout = 60000, unsigned long responseTimeout = 4000) { return begin(nullptr, timeout, responseTimeout); };
6162
int maintain();
6263
EthernetLinkStatus linkStatus();
6364
EthernetHardwareStatus hardwareStatus();
@@ -67,6 +68,10 @@ class EthernetClass {
6768
void begin(uint8_t *mac, IPAddress ip, IPAddress dns) {}
6869
void begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway) {}
6970
void begin(uint8_t *mac, IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) {}
71+
void begin(IPAddress ip) {}
72+
void begin(IPAddress ip, IPAddress dns) {}
73+
void begin(IPAddress ip, IPAddress dns, IPAddress gateway) {}
74+
void begin(IPAddress ip, IPAddress dns, IPAddress gateway, IPAddress subnet) {}
7075
void init(uint8_t sspin = 10);
7176

7277
void MACAddress(uint8_t *mac_address);

0 commit comments

Comments
 (0)