EasyManua.ls Logo

Espressif ESP32-S2 - Page 213

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 2. API Reference
Note This API can be directly used as event handler
Parameters
[in] esp_netif: Handle to esp-netif instance
base:
event_id:
data:
esp_err_t esp_netif_set_mac(esp_netif_t *esp_netif, uint8_t mac[])
Set the mac address for the interface instance.
Return
ESP_OK - success
ESP_ERR_ESP_NETIF_IF_NOT_READY - interface status error
ESP_ERR_NOT_SUPPORTED - mac not supported on this interface
Parameters
[in] esp_netif: Handle to esp-netif instance
[in] mac: Desired mac address for the related network interface
esp_err_t esp_netif_get_mac(esp_netif_t *esp_netif, uint8_t mac[])
Get the mac address for the interface instance.
Return
ESP_OK - success
ESP_ERR_ESP_NETIF_IF_NOT_READY - interface status error
ESP_ERR_NOT_SUPPORTED - mac not supported on this interface
Parameters
[in] esp_netif: Handle to esp-netif instance
[out] mac: Resultant mac address for the related network interface
esp_err_t esp_netif_set_hostname(esp_netif_t *esp_netif, const char *hostname)
Set the hostname of an interface.
The configured hostname overrides the default configuration value CONFIG_LWIP_LOCAL_HOSTNAME.
Please note that when the hostname is altered after interface started/connected the changes would only be
reflected once the interface restarts/reconnects
Return
ESP_OK - success
ESP_ERR_ESP_NETIF_IF_NOT_READY - interface status error
ESP_ERR_ESP_NETIF_INVALID_PARAMS - parameter error
Parameters
[in] esp_netif: Handle to esp-netif instance
[in] hostname: New hostname for the interface. Maximum length 32 bytes.
esp_err_t esp_netif_get_hostname(esp_netif_t *esp_netif, const char **hostname)
Get interface hostname.
Return
ESP_OK - success
ESP_ERR_ESP_NETIF_IF_NOT_READY - interface status error
ESP_ERR_ESP_NETIF_INVALID_PARAMS - parameter error
Parameters
[in] esp_netif: Handle to esp-netif instance
[out] hostname: Returns a pointer to the hostname. May be NULL if no hostname is set. If
set non-NULL, pointer remains valid (and string may change if the hostname changes).
bool esp_netif_is_netif_up(esp_netif_t *esp_netif)
Test if supplied interface is up or down.
Return
true - Interface is up
false - Interface is down
Parameters
[in] esp_netif: Handle to esp-netif instance
Espressif Systems 202
Submit Document Feedback
Release v4.4

Table of Contents