mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
PHY status API for ethernet drivers (#8784)
* PHY status API for W5500 & ENC28J60 drivers * move linkStatus() from ArduinoEthernet:: to LwipIntfDev:: * LwipIntfDev: include PHY status into ::connected()
This commit is contained in:
@ -79,6 +79,24 @@ public:
|
||||
*/
|
||||
uint16_t readFrame(uint8_t* buffer, uint16_t bufsize);
|
||||
|
||||
/**
|
||||
Check physical link
|
||||
@return true when physical link is up
|
||||
*/
|
||||
bool isLinked()
|
||||
{
|
||||
return wizphy_getphylink() == PHY_LINK_ON;
|
||||
}
|
||||
|
||||
/**
|
||||
Report whether ::isLinked() API is implemented
|
||||
@return true when ::isLinked() API is implemented
|
||||
*/
|
||||
constexpr bool isLinkDetectable() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
static constexpr bool interruptIsPossible()
|
||||
{
|
||||
|
Reference in New Issue
Block a user