We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cb6f55 commit 99ca0faCopy full SHA for 99ca0fa
libraries/lwIpWrapper/src/CNetIf.h
@@ -79,6 +79,12 @@ typedef enum {
79
NI_ETHERNET
80
} NetIfType_t;
81
82
+enum EthernetLinkStatus {
83
+ Unknown,
84
+ LinkON,
85
+ LinkOFF
86
+};
87
+
88
#define MAX_CLIENT MEMP_NUM_TCP_PCB
89
#define MAX_DHCP_TRIES 4
90
#define TIMEOUT_DNS_REQUEST 10000U
@@ -140,6 +146,10 @@ class CNetIf: public NetworkInterface {
140
146
virtual void up();
141
147
virtual void down();
142
148
149
+ inline int disconnect() { this->down(); return 0; }
150
151
+ inline EthernetLinkStatus linkStatus() { return netif_is_link_up(&ni) ? LinkON : LinkOFF; }
152
143
153
bool isLinkUp() { return (bool)netif_is_link_up(&ni); }
144
154
145
155
struct netif* getNi() { return ∋ }
0 commit comments