Function esp_idf_sys::esp_base_mac_addr_set
source · pub unsafe extern "C" fn esp_base_mac_addr_set(
mac: *const u8,
) -> esp_err_t
Expand description
@brief Set base MAC address with the MAC address which is stored in BLK3 of EFUSE or external storage e.g. flash and EEPROM.
Base MAC address is used to generate the MAC addresses used by network interfaces.
If using a custom base MAC address, call this API before initializing any network interfaces. Refer to the ESP-IDF Programming Guide for details about how the Base MAC is used.
@note Base MAC must be a unicast MAC (least significant bit of first byte must be zero).
@note If not using a valid OUI, set the “locally administered” bit (bit value 0x02 in the first byte) to avoid collisions.
@param mac base MAC address, length: 6 bytes. length: 6 bytes for MAC-48
@return ESP_OK on success ESP_ERR_INVALID_ARG If mac is NULL or is not a unicast MAC