Skip to content

Commit

Permalink
Refactor getMacAddr function to retrieve MAC address as MAC-48 for IE…
Browse files Browse the repository at this point in the history
…EE 802.15.4 compatibility
  • Loading branch information
alexbegoon committed Oct 31, 2024
1 parent e12fd27 commit a48f078
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/platform/esp32/main-esp32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a48f078

Please sign in to comment.