i2s_channel_write() function
I2S write data
Arguments
handle
I2S channel handler
src
The pointer of sent data buffer
size
Max data buffer length
bytes_written
Byte number that actually be sent, can be NULL if not needed
Return value
- 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
Notes
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.
i2s_channel_write() calls 5 functions:
![]()
i2s_channel_write()
i2s_channel_write() reads 16 variables and writes 1 variable:
![]()
i2s_channel_write()