Add user invisible kconfig for bt mac offset

Closes https://github.com/espressif/esp-idf/issues/5320
This commit is contained in:
Wei Tian Hua 2020-05-25 11:57:37 +08:00 committed by Jiang Jiang Jian
parent 9f801fd2f5
commit 6572959fd3
2 changed files with 7 additions and 4 deletions

View File

@ -224,6 +224,11 @@ menu "Common ESP-related"
config ESP_MAC_ADDR_UNIVERSE_BT
bool
config ESP_MAC_ADDR_UNIVERSE_BT_OFFSET
int
default 2 if ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR
default 1 if ESP32_UNIVERSAL_MAC_ADDRESSES_TWO
config ESP_MAC_ADDR_UNIVERSE_ETH
bool

View File

@ -185,11 +185,9 @@ esp_err_t esp_read_mac(uint8_t* mac, esp_mac_type_t type)
#endif
break;
case ESP_MAC_BT:
memcpy(mac, efuse_mac, 6);
#if CONFIG_ESP_MAC_ADDR_UNIVERSE_BT
mac[5] += 2;
#else
mac[5] += 1;
memcpy(mac, efuse_mac, 6);
mac[5] += CONFIG_ESP_MAC_ADDR_UNIVERSE_BT_OFFSET;
#endif
break;
case ESP_MAC_ETH: