mac address: add user set mac address

add menuconfig for user to set mac address of wifi, bt and ethernet.
This commit is contained in:
XiaXiaotian
2017-03-01 20:42:46 +08:00
parent c025dfbfa7
commit 23f933a78d
7 changed files with 101 additions and 3 deletions

View File

@@ -4,6 +4,15 @@ menuconfig ETHERNET
help
Select this option to enable ethernet driver and show the submenu with ethernet features.
config ESP_MAC_OFFSET_ETH
int "MAC address offset value of ethernet"
depends on ETHERNET
range 0 255
default 3
help
The offset value of ethernet MAC address from the MAC address which is read from efuse.
This offset value must be different from that of WiFi softap, bluetooth and WiFi station.
config DMA_RX_BUF_NUM
int "Number of DMA RX buffers"
range 3 20

View File

@@ -75,8 +75,7 @@ esp_err_t emac_post(emac_sig_t sig, emac_par_t par);
static void emac_macaddr_init(void)
{
esp_efuse_read_mac(&(emac_config.macaddr[0]));
emac_config.macaddr[5] = emac_config.macaddr[5] + 3;
esp_read_mac(&(emac_config.macaddr[0]), ESP_MAC_ETH);
}
void esp_eth_get_mac(uint8_t mac[6])