dac_continuous_write_asynchronously() function
Write DAC data asynchronously
Arguments
handle
The DAC continuous channel handle that obtained from 'dac_continuous_new_channels'
dma_buf
The DMA buffer address, it can be acquired from 'dac_event_data_t' in the 'on_convert_done' callback
dma_buf_len
The DMA buffer length, it can be acquired from 'dac_event_data_t' in the 'on_convert_done' callback
data
The data that need to be written
data_len
The data length the need to be written
bytes_loaded
The bytes number that has been loaded/written into the DMA buffer
Return value
- ESP_OK Write the data into DMA buffer successfully - ESP_ERR_INVALID_ARG NULL pointer - ESP_ERR_INVALID_STATE The channels haven't start the asynchronous writing - ESP_ERR_NOT_FOUND The param 'dam_buf' not match any existed DMA buffer
Notes
This function can be called when the asynchronous writing started, and it can be called in the callback directly but recommend to writing data in a task, referring to :example:`peripherals/dac/dac_continuous/dac_audio`