Chapter 2. API Reference
API Reference
Header File
•
components/esp_serial_slave_link/include/esp_serial_slave_link/essl.h
Functions
esp_err_t essl_init(essl_handle_t
Initialize the slave.
Return
• ESP_OK: If success
• ESP_ERR_NOT_SUPPORTED: Current device does not support this function.
• Other value returned from lower layer init.
Parameters
• handle: Handle of an ESSL device.
• wait_ms: Millisecond to wait before timeout, will not wait at all if set to 0-9.
esp_err_t essl_wait_for_ready(essl_handle_t
Wait for interrupt of an ESSL slave device.
Return
• ESP_OK: If success
• ESP_ERR_NOT_SUPPORTED: Current device does not support this function.
• One of the error codes from SDMMC host controller
Parameters
• handle: Handle of an ESSL device.
• wait_ms: Millisecond to wait before timeout, will not wait at all if set to 0-9.
esp_err_t essl_get_tx_buffer_num(essl_handle_t
Get buffer num for the host to send data to the slave. The buffers are size of buffer_size.
Return
• ESP_OK: Success
• ESP_ERR_NOT_SUPPORTED: This API is not supported in this mode
• One of the error codes from SDMMC/SPI host controller
Parameters
• handle: Handle of a ESSL device.
• out_tx_num: Output of buffer num that host can send data to ESSL slave.
• wait_ms: Millisecond to wait before timeout, will not wait at all if set to 0-9.
esp_err_t essl_get_rx_data_size(essl_handle_t
Get the size, in bytes, of the data that the ESSL slave is ready to send
Return
• ESP_OK: Success
• ESP_ERR_NOT_SUPPORTED: This API is not supported in this mode
• One of the error codes from SDMMC/SPI host controller
Parameters
• handle: Handle of an ESSL device.
• out_rx_size: Output of data size to read from slave, in bytes
• wait_ms: Millisecond to wait before timeout, will not wait at all if set to 0-9.
esp_err_t essl_reset_cnt(essl_handle_t
Reset the counters of this component. Usually you don't need to do this unless you know the slave is reset.
Return
• ESP_OK: Success
• ESP_ERR_NOT_SUPPORTED: This API is not supported in this mode
• ESP_ERR_INVALID_ARG: Invalid argument, handle is not init.
Parameters
• handle: Handle of an ESSL device.
Espressif Systems
handle, uint32_t wait_ms)
handle, uint32_t wait_ms)
handle, uint32_t *out_tx_num, uint32_t wait_ms)
handle, uint32_t *out_rx_size, uint32_t wait_ms)
handle)
654
Submit Document Feedback
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?