23 #define ETHERNET_EVENT_MAP(XX) \ 24 XX(Start, "Ethernet driver Started") \ 25 XX(Stop, "Ethernet driver stopped") \ 26 XX(Connected, "Ethernet link established") \ 27 XX(Disconnected, "Ethernet link lost") 35 #define XX(tag, desc) tag, 133 virtual void end() = 0;
143 virtual bool setMacAddress(
const MacAddress& addr) = 0;
148 virtual bool setSpeed(
Speed speed) = 0;
153 virtual bool setFullDuplex(
bool enable) = 0;
158 virtual bool setLinkState(
bool up) = 0;
163 virtual bool setPromiscuous(
bool enable) = 0;
168 virtual void setHostname(
const String& hostname) = 0;
173 virtual String getHostname()
const = 0;
188 virtual bool isEnabledDHCP()
const = 0;
193 virtual bool enableDHCP(
bool enable) = 0;
200 eventCallback = callback;
208 gotIpCallback = callback;
A class to make it easier to handle and pass around IP addresses.
Definition: IpAddress.h:44
Ethernet::PhyInstance PhyInstance
Definition: Ethernet.h:100
constexpr int8_t PIN_UNUSED
Do not configure this pin.
Definition: Ethernet.h:61
constexpr int8_t PHY_ADDR_AUTO
Automatically detect PHY address during initialization.
Definition: Ethernet.h:79
The String class.
Definition: WString.h:136
EventDelegate eventCallback
Definition: Ethernet.h:212
A network hardware (MAC) address.
Definition: MacAddress.h:38
Abstract Service class.
Definition: Ethernet.h:127
Speed
Link speed.
Definition: Ethernet.h:66
void onEvent(EventDelegate callback)
Set callback for ethernet events.
Definition: Ethernet.h:198
constexpr int8_t PIN_DEFAULT
Use default pin for platform.
Definition: Ethernet.h:54
String toString(Ethernet::Event event)
void onGotIp(GotIpDelegate callback)
Set callback for 'station connected with IP address' event.
Definition: Ethernet.h:206
GotIpDelegate gotIpCallback
Definition: Ethernet.h:213
Virtual class used to construct a specific PHY instance.
Definition: Ethernet.h:97
Event
Ethernet event codes.
Definition: Ethernet.h:34
String toLongString(Ethernet::Event event)
#define ETHERNET_EVENT_MAP(XX)
Ethernet event code map.
Definition: Ethernet.h:23
PHY configuration.
Definition: Ethernet.h:84