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 #803 background imageLoading...
Page #803 background image
Chapter 2. API Reference
uint8_t *esp_apptrace_down_buffer_get(esp_apptrace_dest_t dest, uint32_t *size, uint32_t tmo)
Retrieves incoming data buffer if any. After data in buffer are processed esp_apptrace_down_buffer_put must
be called to indicate it.
Return non-NULL on success, otherwise NULL.
Parameters
dest: Indicates HW interface to receive data.
size: Address to store size of available data in down buffer. Must be initialized with requested
value.
tmo: Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
esp_err_t esp_apptrace_down_buffer_put(esp_apptrace_dest_t dest, uint8_t *ptr, uint32_t tmo)
Indicates that the data in down buffer are processed. This function is a counterpart of and must be preceeded
by esp_apptrace_down_buffer_get.
Return ESP_OK on success, otherwise see esp_err_t
Parameters
dest: Indicates HW interface to receive data. Should be identical to the same parameter in call to
esp_apptrace_down_buffer_get.
ptr: Address of trace buffer to release. Should be the value returned by call to
esp_apptrace_down_buffer_get.
tmo: Timeout for operation (in us). Use ESP_APPTRACE_TMO_INFINITE to wait indefinitely.
bool esp_apptrace_host_is_connected(esp_apptrace_dest_t dest)
Checks whether host is connected.
Return true if host is connected, otherwise false
Parameters
dest: Indicates HW interface to use.
void *esp_apptrace_fopen(esp_apptrace_dest_t dest, const char *path, const char *mode)
Opens file on host. This function has the same semantic as fopenexcept for the first argument.
Return non zero file handle on success, otherwise 0
Parameters
dest: Indicates HW interface to use.
path: Path to file.
mode: Mode string. See fopen for details.
int esp_apptrace_fclose(esp_apptrace_dest_t dest, void *stream)
Closes file on host. This function has the same semantic as fcloseexcept for the first argument.
Return Zero on success, otherwise non-zero. See fclose for details.
Parameters
dest: Indicates HW interface to use.
stream: File handle returned by esp_apptrace_fopen.
size_t esp_apptrace_fwrite(esp_apptrace_dest_t dest, const void *ptr, size_t size, size_t nmemb,
void *stream)
Writes to file on host. This function has the same semantic as fwriteexcept for the first argument.
Return Number of written items. See fwrite for details.
Parameters
dest: Indicates HW interface to use.
ptr: Address of data to write.
size: Size of an item.
nmemb: Number of items to write.
stream: File handle returned by esp_apptrace_fopen.
size_t esp_apptrace_fread(esp_apptrace_dest_t dest, void *ptr, size_t size, size_t nmemb, void
*stream)
Read file on host. This function has the same semantic as freadexcept for the first argument.
Return Number of read items. See fread for details.
Parameters
Espressif Systems 792
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