forked from espressif/esp-idf
Merge branch 'feature/fix_esp32h2_read_mac' into 'master'
efuse: fix esp_read_mac on esp32h2 See merge request espressif/esp-idf!22553
This commit is contained in:
@@ -332,10 +332,10 @@ static esp_err_t generate_mac(uint8_t *mac, uint8_t *base_mac_addr, esp_mac_type
|
|||||||
case ESP_MAC_BT:
|
case ESP_MAC_BT:
|
||||||
#if CONFIG_ESP_MAC_ADDR_UNIVERSE_BT
|
#if CONFIG_ESP_MAC_ADDR_UNIVERSE_BT
|
||||||
memcpy(mac, base_mac_addr, 6);
|
memcpy(mac, base_mac_addr, 6);
|
||||||
#if !CONFIG_IDF_TARGET_ESP32H4
|
#if SOC_WIFI_SUPPORTED
|
||||||
// esp32h4 chips do not have wifi module, so the mac address do not need to add the BT offset
|
// If the chips do not have wifi module, the mac address do not need to add the BT offset
|
||||||
mac[5] += MAC_ADDR_UNIVERSE_BT_OFFSET;
|
mac[5] += MAC_ADDR_UNIVERSE_BT_OFFSET;
|
||||||
#endif //!CONFIG_IDF_TARGET_ESP32H4
|
#endif //SOC_WIFI_SUPPORTED
|
||||||
#else
|
#else
|
||||||
return ESP_ERR_NOT_SUPPORTED;
|
return ESP_ERR_NOT_SUPPORTED;
|
||||||
#endif // CONFIG_ESP_MAC_ADDR_UNIVERSE_BT
|
#endif // CONFIG_ESP_MAC_ADDR_UNIVERSE_BT
|
||||||
|
@@ -1,5 +1,18 @@
|
|||||||
# ESP32H2-TODO: MAC support
|
|
||||||
|
|
||||||
choice ESP32H2_UNIVERSAL_MAC_ADDRESSES
|
choice ESP32H2_UNIVERSAL_MAC_ADDRESSES
|
||||||
bool "Number of universally administered (by IEEE) MAC address"
|
bool "Number of universally administered (by IEEE) MAC address"
|
||||||
|
default ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||||
|
help
|
||||||
|
Configure the number of universally administered (by IEEE) MAC addresses.
|
||||||
|
During initialization, MAC addresses for each network interface are generated or derived from a
|
||||||
|
single base MAC address.
|
||||||
|
|
||||||
|
config ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||||
|
bool "Two"
|
||||||
|
select ESP_MAC_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||||
|
select ESP_MAC_ADDR_UNIVERSE_IEEE802154
|
||||||
|
select ESP_MAC_ADDR_UNIVERSE_BT
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
config ESP32H2_UNIVERSAL_MAC_ADDRESSES
|
||||||
|
int
|
||||||
|
default 2 if ESP32H2_UNIVERSAL_MAC_ADDRESSES_TWO
|
||||||
|
Reference in New Issue
Block a user