Function esp_idf_sys::esp_read_mac

source ·
pub unsafe extern "C" fn esp_read_mac(
    mac: *mut u8,
    type_: esp_mac_type_t
) -> esp_err_t
Expand description

@brief Read base MAC address and set MAC address of the interface.

This function first get base MAC address using esp_base_mac_addr_get(). Then calculates the MAC address of the specific interface requested, refer to ESP-IDF Programming Guide for the algorithm.

The MAC address set by the esp_iface_mac_addr_set() function will not depend on the base MAC address.

@param mac base MAC address, length: 6 bytes/8 bytes. length: 6 bytes for MAC-48 8 bytes for EUI-64(used for IEEE 802.15.4, if CONFIG_SOC_IEEE802154_SUPPORTED=y) @param type Type of MAC address to return

@return ESP_OK on success