Function esp_idf_svc::sys::rmt_receive
source ยท pub unsafe extern "C" fn rmt_receive(
rx_channel: *mut rmt_drv_channel_t,
buffer: *mut c_void,
buffer_size: usize,
config: *const rmt_receive_config_t,
) -> i32
Expand description
@brief Initiate a receive job for RMT RX channel
@note This function is non-blocking, it initiates a new receive job and then returns.
User should check the received data from the on_recv_done
callback that registered by rmt_rx_register_event_callbacks()
.
@note This function can also be called in ISR context.
@note If you want this function to work even when the flash cache is disabled, please enable the CONFIG_RMT_RECV_FUNC_IN_IRAM
option.
@param[in] rx_channel RMT RX channel that created by rmt_new_rx_channel()
@param[in] buffer The buffer to store the received RMT symbols
@param[in] buffer_size size of the buffer
, in bytes
@param[in] config Receive specific configurations
@return
- ESP_OK: Initiate receive job successfully
- ESP_ERR_INVALID_ARG: Initiate receive job failed because of invalid argument
- ESP_ERR_INVALID_STATE: Initiate receive job failed because channel is not enabled
- ESP_FAIL: Initiate receive job failed because of other error