emac:add set_eth_mac api

This commit is contained in:
shangke
2017-11-27 15:58:35 +08:00
parent 46673bb6f1
commit 710e69feca
2 changed files with 33 additions and 15 deletions

View File

@@ -250,6 +250,27 @@ static inline esp_err_t esp_eth_smi_wait_set(uint32_t reg_num, uint16_t value_ma
*/
void esp_eth_free_rx_buf(void *buf);
/**
* @brief Get mac of ethernet interface.
*
* @param[out] mac: store mac of the interface.
*
*/
void esp_eth_get_mac(uint8_t mac[6]);
/**
* @brief Set mac of ethernet interface.
*
* @note user can call this function after emac_init,and the new mac address will be enabled after emac_enable.
*
* @param[in] mac: the Mac address.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_INVALID_MAC: invalid mac address
*/
esp_err_t esp_eth_set_mac(const uint8_t mac[6]);
#ifdef __cplusplus
}
#endif