@@ -19,14 +19,15 @@ extern "C" {
1919#endif
2020
2121typedef enum {
22- ESP_MAC_WIFI_STA ,
23- ESP_MAC_WIFI_SOFTAP ,
24- ESP_MAC_BT ,
25- ESP_MAC_ETH ,
26- ESP_MAC_IEEE802154 ,
27- ESP_MAC_BASE ,
28- ESP_MAC_EFUSE_FACTORY ,
29- ESP_MAC_EFUSE_CUSTOM ,
22+ ESP_MAC_WIFI_STA , /**< MAC for WiFi Station (6 bytes) */
23+ ESP_MAC_WIFI_SOFTAP , /**< MAC for WiFi Soft-AP (6 bytes) */
24+ ESP_MAC_BT , /**< MAC for Bluetooth (6 bytes) */
25+ ESP_MAC_ETH , /**< MAC for Ethernet (6 bytes) */
26+ ESP_MAC_IEEE802154 , /**< if CONFIG_SOC_IEEE802154_SUPPORTED=y, MAC for IEEE802154 (8 bytes) */
27+ ESP_MAC_BASE , /**< Base MAC for that used for other MAC types (6 bytes) */
28+ ESP_MAC_EFUSE_FACTORY , /**< MAC_FACTORY eFuse which was burned by Espressif in production (6 bytes) */
29+ ESP_MAC_EFUSE_CUSTOM , /**< MAC_CUSTOM eFuse which was can be burned by customer (6 bytes) */
30+ ESP_MAC_EFUSE_EXT , /**< if CONFIG_SOC_IEEE802154_SUPPORTED=y, MAC_EXT eFuse which is used as an extender for IEEE802154 MAC (2 bytes) */
3031} esp_mac_type_t ;
3132
3233/** @cond */
@@ -62,9 +63,8 @@ typedef enum {
6263 * @note If not using a valid OUI, set the "locally administered" bit
6364 * (bit value 0x02 in the first byte) to avoid collisions.
6465 *
65- * @param mac base MAC address, length: 6 bytes/8 bytes .
66+ * @param mac base MAC address, length: 6 bytes.
6667 * length: 6 bytes for MAC-48
67- * 8 bytes for EUI-64(used for IEEE 802.15.4)
6868 *
6969 * @return ESP_OK on success
7070 * ESP_ERR_INVALID_ARG If mac is NULL or is not a unicast MAC
@@ -76,9 +76,8 @@ esp_err_t esp_base_mac_addr_set(const uint8_t *mac);
7676 *
7777 * @note If no custom Base MAC has been set, this returns the pre-programmed Espressif base MAC address.
7878 *
79- * @param mac base MAC address, length: 6 bytes/8 bytes .
79+ * @param mac base MAC address, length: 6 bytes.
8080 * length: 6 bytes for MAC-48
81- * 8 bytes for EUI-64(used for IEEE 802.15.4)
8281 *
8382 * @return ESP_OK on success
8483 * ESP_ERR_INVALID_ARG mac is NULL
@@ -100,7 +99,7 @@ esp_err_t esp_base_mac_addr_get(uint8_t *mac);
10099 *
101100 * @param mac base MAC address, length: 6 bytes/8 bytes.
102101 * length: 6 bytes for MAC-48
103- * 8 bytes for EUI-64(used for IEEE 802.15.4)
102+ * 8 bytes for EUI-64(used for IEEE 802.15.4, if CONFIG_SOC_IEEE802154_SUPPORTED=y )
104103 *
105104 * @return ESP_OK on success
106105 * ESP_ERR_INVALID_ARG mac is NULL
@@ -115,7 +114,7 @@ esp_err_t esp_efuse_mac_get_custom(uint8_t *mac);
115114 *
116115 * @param mac base MAC address, length: 6 bytes/8 bytes.
117116 * length: 6 bytes for MAC-48
118- * 8 bytes for EUI-64(used for IEEE 802.15.4)
117+ * 8 bytes for EUI-64(used for IEEE 802.15.4, if CONFIG_SOC_IEEE802154_SUPPORTED=y )
119118 *
120119 * @return ESP_OK on success
121120 * ESP_ERR_INVALID_ARG mac is NULL
@@ -133,7 +132,7 @@ esp_err_t esp_efuse_mac_get_default(uint8_t *mac);
133132 *
134133 * @param mac base MAC address, length: 6 bytes/8 bytes.
135134 * length: 6 bytes for MAC-48
136- * 8 bytes for EUI-64(used for IEEE 802.15.4)
135+ * 8 bytes for EUI-64(used for IEEE 802.15.4, if CONFIG_SOC_IEEE802154_SUPPORTED=y )
137136 * @param type Type of MAC address to return
138137 *
139138 * @return ESP_OK on success
@@ -151,9 +150,8 @@ esp_err_t esp_read_mac(uint8_t *mac, esp_mac_type_t type);
151150 * address, then the first octet is XORed with 0x4 in order to create a different
152151 * locally administered MAC address.
153152 *
154- * @param local_mac base MAC address, length: 6 bytes/8 bytes .
153+ * @param local_mac base MAC address, length: 6 bytes.
155154 * length: 6 bytes for MAC-48
156- * 8 bytes for EUI-64(used for IEEE 802.15.4)
157155 * @param universal_mac Source universal MAC address, length: 6 bytes.
158156 *
159157 * @return ESP_OK on success
@@ -166,7 +164,7 @@ esp_err_t esp_derive_local_mac(uint8_t *local_mac, const uint8_t *universal_mac)
166164 *
167165 * @param mac MAC address, length: 6 bytes/8 bytes.
168166 * length: 6 bytes for MAC-48
169- * 8 bytes for EUI-64(used for ESP_MAC_IEEE802154 type)
167+ * 8 bytes for EUI-64(used for ESP_MAC_IEEE802154 type, if CONFIG_SOC_IEEE802154_SUPPORTED=y )
170168 * @param type Type of MAC address
171169 *
172170 * @return ESP_OK on success
@@ -176,9 +174,11 @@ esp_err_t esp_iface_mac_addr_set(const uint8_t *mac, esp_mac_type_t type);
176174/**
177175 * @brief Return the size of the MAC type in bytes.
178176 *
179- * If CONFIG_IEEE802154_ENABLED is set then for these types:
180- * ESP_MAC_IEEE802154, ESP_MAC_BASE, ESP_MAC_EFUSE_FACTORY and ESP_MAC_EFUSE_CUSTOM the MAC size is 8 bytes.
181- * If CONFIG_IEEE802154_ENABLED is not set then for all types it returns 6 bytes.
177+ * If CONFIG_SOC_IEEE802154_SUPPORTED is set then for these types:
178+ * - ESP_MAC_IEEE802154 is 8 bytes.
179+ * - ESP_MAC_BASE, ESP_MAC_EFUSE_FACTORY and ESP_MAC_EFUSE_CUSTOM the MAC size is 6 bytes.
180+ * - ESP_MAC_EFUSE_EXT is 2 bytes.
181+ * If CONFIG_SOC_IEEE802154_SUPPORTED is not set then for all types it returns 6 bytes.
182182 *
183183 * @param type Type of MAC address
184184 *
0 commit comments