print ip address for W5500 devices
This commit is contained in:
@@ -164,7 +164,17 @@ bool W5500Device::supportsEncryption()
|
||||
|
||||
bool W5500Device::isConnected()
|
||||
{
|
||||
return Ethernet.linkStatus() == EthernetLinkStatus::LinkON && _maintainResult == 0 && _hasDHCPAddress;
|
||||
bool connected = (Ethernet.linkStatus() == EthernetLinkStatus::LinkON && _maintainResult == 0 && _hasDHCPAddress);
|
||||
|
||||
if(_lastConnected == false && connected == true)
|
||||
{
|
||||
Serial.print(F("Ethernet connected. IP address: "));
|
||||
Serial.println(Ethernet.localIP().toString());
|
||||
}
|
||||
|
||||
_lastConnected = connected;
|
||||
|
||||
return connected;
|
||||
}
|
||||
|
||||
void W5500Device::initializeMacAddress(byte *mac)
|
||||
|
||||
Reference in New Issue
Block a user