Skip to content

Commit 9890d87

Browse files
authored
Merge pull request #518 from d-a-v/EthernetMaintain
implement arduino API: Ethernet.maintain()
2 parents b158675 + e7d88ad commit 9890d87

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: libraries/Ethernet/src/Ethernet.h

+10
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ enum EthernetHardwareStatus {
4242

4343
namespace arduino {
4444

45+
enum { // compatibility with Arduino ::maintain()
46+
DHCP_CHECK_NONE = 0,
47+
DHCP_CHECK_RENEW_FAIL = 1,
48+
DHCP_CHECK_RENEW_OK = 2,
49+
DHCP_CHECK_REBIND_FAIL = 3,
50+
DHCP_CHECK_REBIND_OK = 4
51+
};
52+
4553
typedef void *(*voidPrtFuncPtr)(void);
4654

4755
class EthernetClass : public MbedSocketClass {
@@ -107,6 +115,8 @@ class EthernetClass : public MbedSocketClass {
107115

108116
NetworkInterface *getNetwork();
109117

118+
constexpr static int maintain () { return DHCP_CHECK_NONE; }
119+
110120
private:
111121
volatile EthernetLinkStatus _currentNetworkStatus = Unknown;
112122
EthernetInterface net;

0 commit comments

Comments
 (0)