Function esp_idf_hal::sys::i2s_channel_write
source · pub unsafe extern "C" fn i2s_channel_write(
handle: *mut i2s_channel_obj_t,
src: *const c_void,
size: usize,
bytes_written: *mut usize,
timeout_ms: u32,
) -> i32
Expand description
@brief I2S write data @note Only allowed to be called when the channel state is RUNNING, (i.e., tx channel has been started and is not writing now) but the RUNNING only stands for the software state, it doesn’t mean there is no the signal transporting on line.
@param[in] handle I2S channel handler @param[in] src The pointer of sent data buffer @param[in] size Max data buffer length @param[out] bytes_written Byte number that actually be sent, can be NULL if not needed @param[in] timeout_ms Max block time @return - ESP_OK Write successfully - ESP_ERR_INVALID_ARG NULL pointer or this handle is not tx handle - ESP_ERR_TIMEOUT Writing timeout, no writing event received from ISR within ticks_to_wait - ESP_ERR_INVALID_STATE I2S is not ready to write