EasyManua.ls Logo

Espressif ESP32-S2 - Page 609

Espressif ESP32-S2
1695 pages
Print Icon
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
esp_err_t esp_ping_delete_session(esp_ping_handle_t hdl)
Delete a ping session.
Return
• ESP_ERR_INVALID_ARG: invalid parameters (e.g. ping handle is null, etc)
• ESP_OK: delete ping session successfully
Parameters
• hdl: handle of ping session
esp_err_t esp_ping_start(esp_ping_handle_t hdl)
Start the ping session.
Return
• ESP_ERR_INVALID_ARG: invalid parameters (e.g. ping handle is null, etc)
• ESP_OK: start ping session successfully
Parameters
• hdl: handle of ping session
esp_err_t esp_ping_stop(esp_ping_handle_t hdl)
Stop the ping session.
Return
• ESP_ERR_INVALID_ARG: invalid parameters (e.g. ping handle is null, etc)
• ESP_OK: stop ping session successfully
Parameters
• hdl: handle of ping session
esp_err_t esp_ping_get_profile(esp_ping_handle_t hdl, esp_ping_profile_t profile, void *data,
uint32_t size)
Get runtime profile of ping session.
Return
• ESP_ERR_INVALID_ARG: invalid parameters (e.g. ping handle is null, etc)
• ESP_ERR_INVALID_SIZE: the actual profile data size doesn’t match the “size”parameter
• ESP_OK: get profile successfully
Parameters
• hdl: handle of ping session
• profile: type of profile
• data: profile data
• size: profile data size
Structures
struct esp_ping_callbacks_t
Type of “ping”callback functions.
Public Members
void *cb_args
arguments for callback functions
void (*on_ping_success)(esp_ping_handle_t hdl, void *args)
Invoked by internal ping thread when received ICMP echo reply packet.
void (*on_ping_timeout)(esp_ping_handle_t hdl, void *args)
Invoked by internal ping thread when receive ICMP echo reply packet timeout.
void (*on_ping_end)(esp_ping_handle_t hdl, void *args)
Invoked by internal ping thread when a ping session is finished.
struct esp_ping_config_t
Type of “ping”configuration.
Espressif Systems 598
Submit Document Feedback
Release v4.4

Table of Contents