1
0
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:
david gauchard
2023-01-05 09:23:57 +01:00
committed by GitHub
parent c9f90a3ed3
commit 7cfb551f90
7 changed files with 112 additions and 17 deletions

View File

@ -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()
{