Espressif ESP32-S2 Programming Manual page 803

Table of Contents

Advertisement

Chapter 2. API Reference
uint8_t
*esp_apptrace_down_buffer_get(esp_apptrace_dest_t
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
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.
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
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
Opens file on host. This function has the same semantic as 'fopen'except 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
Closes file on host. This function has the same semantic as 'fclose'except 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
Writes to file on host. This function has the same semantic as 'fwrite'except 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
Read file on host. This function has the same semantic as 'fread'except for the first argument.
Return Number of read items. See fread for details.
Parameters
Espressif Systems
dest, const char *path, const char *mode)
dest, void *stream)
dest, const void *ptr, size_t size, size_t nmemb,
void *stream)
dest, void *ptr, size_t size, size_t nmemb, void
*stream)
792
Submit Document Feedback
dest, uint32_t *size, uint32_t tmo)
dest, uint8_t *ptr, uint32_t tmo)
Should be the value returned by call to
dest)
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Table of Contents

Save PDF