Function esp_idf_sys::dac_continuous_write_asynchronously
source · pub unsafe extern "C" fn dac_continuous_write_asynchronously(
handle: dac_continuous_handle_t,
dma_buf: *mut u8,
dma_buf_len: usize,
data: *const u8,
data_len: usize,
bytes_loaded: *mut usize,
) -> esp_err_t
Expand description
@brief Write DAC data asynchronously
@note 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
@param[in] handle The DAC continuous channel handle that obtained from ‘dac_continuous_new_channels’ @param[in] dma_buf The DMA buffer address, it can be acquired from ‘dac_event_data_t’ in the ‘on_convert_done’ callback @param[in] dma_buf_len The DMA buffer length, it can be acquired from ‘dac_event_data_t’ in the ‘on_convert_done’ callback @param[in] data The data that need to be written @param[in] data_len The data length the need to be written @param[out] bytes_loaded The bytes number that has been loaded/written into the DMA buffer @return - 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