mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
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:
@@ -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
|
||||
|
@@ -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])
|
||||
|
Reference in New Issue
Block a user