From a48f078c27fcaaabb37dc80522155599e7d3343e Mon Sep 17 00:00:00 2001 From: Alexander Begoon Date: Thu, 31 Oct 2024 17:05:41 +0100 Subject: [PATCH] Refactor getMacAddr function to retrieve MAC address as MAC-48 for IEEE 802.15.4 compatibility --- src/platform/esp32/main-esp32.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/platform/esp32/main-esp32.cpp b/src/platform/esp32/main-esp32.cpp index 7b3493f95b..b1185e2831 100644 --- a/src/platform/esp32/main-esp32.cpp +++ b/src/platform/esp32/main-esp32.cpp @@ -51,7 +51,11 @@ void updateBatteryLevel(uint8_t level) {} void getMacAddr(uint8_t *dmac) { +#if defined(CONFIG_IDF_TARGET_ESP32C6) && defined(CONFIG_SOC_IEEE802154_SUPPORTED) + assert(esp_base_mac_addr_get(dmac) == ESP_OK); +#else assert(esp_efuse_mac_get_default(dmac) == ESP_OK); +#endif } #ifdef HAS_32768HZ