Function esp_idf_hal::sys::rmt_write_items
source ยท pub unsafe extern "C" fn rmt_write_items(
channel: u32,
rmt_item: *const rmt_item32_t,
item_num: i32,
wait_tx_done: bool,
) -> i32
Expand description
@brief RMT send waveform from rmt_item array.
This API allows user to send waveform with any length.
@param channel RMT channel @param rmt_item head point of RMT items array. If ESP_INTR_FLAG_IRAM is used, please do not use the memory allocated from psram when calling rmt_write_items. @param item_num RMT data item number. @param wait_tx_done - If set 1, it will block the task and wait for sending done. - If set 0, it will not wait and return immediately.
@note
This function will not copy data, instead, it will point to the original items,
and send the waveform items.
If wait_tx_done is set to true, this function will block and will not return until
all items have been sent out.
If wait_tx_done is set to false, this function will return immediately, and the driver
interrupt will continue sending the items. We must make sure the item data will not be
damaged when the driver is still sending items in driver interrupt.
@return - ESP_ERR_INVALID_ARG Parameter error - ESP_OK Success