EasyManuals Logo

Espressif ESP32-S2 User Manual

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
Page #211 background imageLoading...
Page #211 background image
Chapter 2. API Reference
esp_err_t esp_netif_set_driver_config(esp_netif_t *esp_netif, const
esp_netif_driver_ifconfig_t *driver_config)
Configures driver related options of esp_netif object.
Return
ESP_OK on success
ESP_ERR_ESP_NETIF_INVALID_PARAMS if invalid parameters provided
Parameters
[inout] esp_netif: pointer to the object to be configured
[in] driver_config: pointer esp-netif io driver related configuration
esp_err_t esp_netif_attach(esp_netif_t *esp_netif, esp_netif_iodriver_handle driver_handle)
Attaches esp_netif instance to the io driver handle.
Calling this function enables connecting specific esp_netif object with already initialized io driver to update
esp_netif object with driver specific configuration (i.e. calls post_attach callback, which typically sets io driver
callbacks to esp_netif instance and starts the driver)
Return
ESP_OK on success
ESP_ERR_ESP_NETIF_DRIVER_ATTACH_FAILED if drivers pot_attach callback failed
Parameters
[inout] esp_netif: pointer to esp_netif object to be attached
[in] driver_handle: pointer to the driver handle
esp_err_t esp_netif_receive(esp_netif_t *esp_netif, void *buer, size_t len, void *eb)
Passes the raw packets from communication media to the appropriate TCP/IP stack.
This function is called from the configured (peripheral) driver layer. The data are then forwarded as frames to
the TCP/IP stack.
Return
ESP_OK
Parameters
[in] esp_netif: Handle to esp-netif instance
[in] buffer: Received data
[in] len: Length of the data frame
[in] eb: Pointer to internal buffer (used in Wi-Fi driver)
void esp_netif_action_start(void *esp_netif, esp_event_base_t base, int32_t event_id, void *data)
Default building block for network interface action upon IO driver start event Creates network interface, if
AUTOUP enabled turns the interface on, if DHCPS enabled starts dhcp server.
Note This API can be directly used as event handler
Parameters
[in] esp_netif: Handle to esp-netif instance
base:
event_id:
data:
void esp_netif_action_stop(void *esp_netif, esp_event_base_t base, int32_t event_id, void *data)
Default building block for network interface action upon IO driver stop event.
Note This API can be directly used as event handler
Parameters
[in] esp_netif: Handle to esp-netif instance
base:
event_id:
data:
void esp_netif_action_connected(void *esp_netif, esp_event_base_t base, int32_t event_id, void
*data)
Default building block for network interface action upon IO driver connected event.
Note This API can be directly used as event handler
Espressif Systems 200
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish