diff --git a/libraries/Ethernet/src/Ethernet.h b/libraries/Ethernet/src/Ethernet.h index 3b86e7601..2a6ca902f 100644 --- a/libraries/Ethernet/src/Ethernet.h +++ b/libraries/Ethernet/src/Ethernet.h @@ -42,6 +42,14 @@ enum EthernetHardwareStatus { namespace arduino { +enum { // compatibility with Arduino ::maintain() + DHCP_CHECK_NONE = 0, + DHCP_CHECK_RENEW_FAIL = 1, + DHCP_CHECK_RENEW_OK = 2, + DHCP_CHECK_REBIND_FAIL = 3, + DHCP_CHECK_REBIND_OK = 4 +}; + typedef void *(*voidPrtFuncPtr)(void); class EthernetClass : public MbedSocketClass { @@ -107,6 +115,8 @@ class EthernetClass : public MbedSocketClass { NetworkInterface *getNetwork(); + constexpr static int maintain () { return DHCP_CHECK_NONE; } + private: volatile EthernetLinkStatus _currentNetworkStatus = Unknown; EthernetInterface net;