fix getting MAC-Address from ipstack in rp2040 and ESP plattform

This commit is contained in:
Ing-Dom 2025-01-28 10:04:51 +01:00
parent 8257add51e
commit 3e337e0f9b
2 changed files with 2 additions and 7 deletions

View File

@ -67,7 +67,7 @@ uint32_t Esp32Platform::currentDefaultGateway()
void Esp32Platform::macAddress(uint8_t * addr)
{
esp_wifi_get_mac(WIFI_IF_STA, addr);
KNX_NETIF.macAddress(addr);
}
uint32_t Esp32Platform::uniqueSerialNumber()

View File

@ -461,12 +461,7 @@ uint32_t RP2040ArduinoPlatform::currentDefaultGateway()
}
void RP2040ArduinoPlatform::macAddress(uint8_t* addr)
{
#if defined(KNX_IP_LAN)
addr = KNX_NETIF.getNetIf()->hwaddr;
#else
uint8_t macaddr[6] = {0, 0, 0, 0, 0, 0};
addr = KNX_NETIF.macAddress(macaddr);
#endif
KNX_NETIF.macAddress(addr);
}
// multicast