Minor cast fix to put on work with Raspberry Pi Pico (and all rp2040 boards)

This commit is contained in:
Renzo Mischianti 2022-09-26 21:51:15 +02:00
parent 8e741a2071
commit 644bc297f2

View file

@ -378,6 +378,7 @@ uint8_t* WiFiDrv::getMacAddress()
return _mac;
}
#ifdef ARDUINO_ARCH_RP2040
void WiFiDrv::getIpAddress(IPAddress& ip)
{
getNetworkData(_localIp, _subnetMask, _gatewayIp);
@ -395,6 +396,26 @@ void WiFiDrv::getIpAddress(IPAddress& ip)
getNetworkData(_localIp, _subnetMask, _gatewayIp);
ip = IPAddress(_gatewayIp);
}
#else
void WiFiDrv::getIpAddress(IPAddress& ip)
{
getNetworkData(_localIp, _subnetMask, _gatewayIp);
ip = _localIp;
}
void WiFiDrv::getSubnetMask(IPAddress& mask)
{
getNetworkData(_localIp, _subnetMask, _gatewayIp);
mask = _subnetMask;
}
void WiFiDrv::getGatewayIP(IPAddress& ip)
{
getNetworkData(_localIp, _subnetMask, _gatewayIp);
ip = _gatewayIp;
}
#endif
const char* WiFiDrv::getCurrentSSID()
{