Function esp_idf_svc::hal::sys::rmt_transmit
source · pub unsafe extern "C" fn rmt_transmit(
tx_channel: *mut rmt_drv_channel_t,
encoder: *mut rmt_encoder_t,
payload: *const c_void,
payload_bytes: usize,
config: *const rmt_transmit_config_t,
) -> i32
Expand description
@brief Transmit data by RMT TX channel
@note This function constructs a transaction descriptor then pushes to a queue.
The transaction will not start immediately if there’s another one under processing.
Based on the setting of rmt_transmit_config_t::queue_nonblocking
,
if there’re too many transactions pending in the queue, this function can block until it has free slot,
otherwise just return quickly.
@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