mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
core: read ESP32 MAC address from eFuse if IEEE802.15.4 is supported (#5176)
This commit is contained in:
parent
e4cf7b86fa
commit
f4ac176d77
1 changed files with 4 additions and 2 deletions
|
@ -38,7 +38,7 @@
|
|||
#include "esp32/rom/crc.h"
|
||||
#endif
|
||||
|
||||
#ifdef USE_ESP32_IGNORE_EFUSE_MAC_CRC
|
||||
#if defined(CONFIG_SOC_IEEE802154_SUPPORTED) || defined(USE_ESP32_IGNORE_EFUSE_MAC_CRC)
|
||||
#include "esp_efuse.h"
|
||||
#include "esp_efuse_table.h"
|
||||
#endif
|
||||
|
@ -540,7 +540,9 @@ bool HighFrequencyLoopRequester::is_high_frequency() { return num_requests > 0;
|
|||
|
||||
void get_mac_address_raw(uint8_t *mac) { // NOLINT(readability-non-const-parameter)
|
||||
#if defined(USE_ESP32)
|
||||
#if defined(USE_ESP32_IGNORE_EFUSE_MAC_CRC)
|
||||
#if defined(CONFIG_SOC_IEEE802154_SUPPORTED) || defined(USE_ESP32_IGNORE_EFUSE_MAC_CRC)
|
||||
// When CONFIG_SOC_IEEE802154_SUPPORTED is defined, esp_efuse_mac_get_default
|
||||
// returns the 802.15.4 EUI-64 address. Read directly from eFuse instead.
|
||||
// On some devices, the MAC address that is burnt into EFuse does not
|
||||
// match the CRC that goes along with it. For those devices, this
|
||||
// work-around reads and uses the MAC address as-is from EFuse,
|
||||
|
|
Loading…
Reference in a new issue