Function esp_idf_sys::i2s_channel_read
source · pub unsafe extern "C" fn i2s_channel_read(
handle: i2s_chan_handle_t,
dest: *mut c_void,
size: usize,
bytes_read: *mut usize,
timeout_ms: u32,
) -> esp_err_t
Expand description
@brief I2S read data @note Only allowed to be called when the channel state is RUNNING 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] dest The pointer of receiving data buffer @param[in] size Max data buffer length @param[out] bytes_read Byte number that actually be read, can be NULL if not needed @param[in] timeout_ms Max block time @return - ESP_OK Read successfully - ESP_ERR_INVALID_ARG NULL pointer or this handle is not RX handle - ESP_ERR_TIMEOUT Reading timeout, no reading event received from ISR within ticks_to_wait - ESP_ERR_INVALID_STATE I2S is not ready to read