Function esp_idf_sys::rmt_transmit
source · pub unsafe extern "C" fn rmt_transmit(
tx_channel: rmt_channel_handle_t,
encoder: rmt_encoder_handle_t,
payload: *const c_void,
payload_bytes: usize,
config: *const rmt_transmit_config_t,
) -> esp_err_t
Expand description
@brief Transmit data by RMT TX channel
@note This function will construct a transaction descriptor and push to a queue. The transaction will not start immediately until it’s dispatched in the ISR.
If there’re too many transactions pending in the queue, this function will block until the queue has free space.
@note The data to be transmitted will be encoded into RMT symbols by the specific encoder
.
@param[in] tx_channel RMT TX channel that created by rmt_new_tx_channel()
@param[in] encoder RMT encoder that created by various factory APIs like rmt_new_bytes_encoder()
@param[in] payload The raw data to be encoded into RMT symbols
@param[in] payload_bytes Size of the payload
in bytes
@param[in] config Transmission specific configuration
@return
- ESP_OK: Transmit data successfully
- ESP_ERR_INVALID_ARG: Transmit data failed because of invalid argument
- ESP_ERR_INVALID_STATE: Transmit data failed because channel is not enabled
- ESP_ERR_NOT_SUPPORTED: Transmit data failed because some feature is not supported by hardware, e.g. unsupported loop count
- ESP_FAIL: Transmit data failed because of other error