mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-06-30 12:30:59 +02:00
Update IDF libraries
This commit is contained in:
@ -24,6 +24,17 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
ESP_MAC_WIFI_STA,
|
||||
ESP_MAC_WIFI_SOFTAP,
|
||||
ESP_MAC_BT,
|
||||
ESP_MAC_ETH,
|
||||
} esp_mac_type_t;
|
||||
|
||||
#define TWO_MAC_ADDRESS_FROM_EFUSE 2
|
||||
#define FOUR_MAC_ADDRESS_FROM_EFUSE 4
|
||||
#define NUM_MAC_ADDRESS_FROM_EFUSE CONFIG_NUMBER_OF_MAC_ADDRESS_GENERATED_FROM_EFUSE
|
||||
|
||||
/**
|
||||
* @attention application don't need to call this function anymore. It do nothing and will
|
||||
* be removed in future version.
|
||||
@ -115,6 +126,47 @@ esp_err_t esp_efuse_read_mac(uint8_t* mac);
|
||||
*/
|
||||
esp_err_t system_efuse_read_mac(uint8_t mac[6]) __attribute__ ((deprecated));
|
||||
|
||||
/**
|
||||
* @brief Read hardware MAC address and set MAC address of the interface.
|
||||
*
|
||||
* This function first reads hardware MAC address from efuse. Then set the MAC address of the interface
|
||||
* including wifi station, wifi softap, bluetooth and ethernet.
|
||||
*
|
||||
* @param mac MAC address of the interface, length: 6 bytes.
|
||||
* @param type type of MAC address, 0:wifi station, 1:wifi softap, 2:bluetooth, 3:ethernet.
|
||||
*
|
||||
* @return ESP_OK on success
|
||||
*/
|
||||
esp_err_t esp_read_mac(uint8_t* mac, esp_mac_type_t type);
|
||||
|
||||
/**
|
||||
* @brief Derive MAC address.
|
||||
*
|
||||
* This function derives a local MAC address from an universal MAC address.
|
||||
* Addresses can either be universally administered addresses or locally administered addresses.
|
||||
* A universally administered address is uniquely assigned to a device by its manufacturer.
|
||||
* The first three octets (in transmission order) identify the organization that issued the identifier
|
||||
* and are known as the Organizationally Unique Identifier (OUI).[4] The remainder of the address
|
||||
* (three octets for MAC-48 and EUI-48 or five for EUI-64) are assigned by that organization in nearly
|
||||
* any manner they please, subject to the constraint of uniqueness. A locally administered address is
|
||||
* assigned to a device by a network administrator, overriding the burned-in address.
|
||||
* Universally administered and locally administered addresses are distinguished by setting
|
||||
* the second-least-significant bit of the first octet of the address. This bit is also referred to
|
||||
* as the U/L bit, short for Universal/Local, which identifies how the address is administered.
|
||||
* If the bit is 0, the address is universally administered. If it is 1, the address is locally administered.
|
||||
* In the example address 06-00-00-00-00-00 the first octet is 06 (hex), the binary form of which is 00000110,
|
||||
* where the second-least-significant bit is 1. Therefore, it is a locally administered address.[7] Consequently,
|
||||
* this bit is 0 in all OUIs.
|
||||
* In ESP32, universal MAC address is generated from the hardware MAC address in efuse.
|
||||
* Local MAC address is derived from the universal MAC address.
|
||||
*
|
||||
* @param dst_mac Derived local MAC address, length: 6 bytes.
|
||||
* @param src_mac Source universal MAC address, length: 6 bytes.
|
||||
*
|
||||
* @return ESP_OK on success
|
||||
*/
|
||||
esp_err_t esp_derive_mac(uint8_t* dst_mac, const uint8_t* src_mac);
|
||||
|
||||
/**
|
||||
* Get SDK version
|
||||
*
|
||||
|
Reference in New Issue
Block a user