The DAC continuous channel handle that obtained from 'dac_continuous_new_channels'
buf
uint8_t*
The digital data buffer to convert
buf_size
size_t
The buffer size of digital data buffer
bytes_loaded
size_t*
The bytes that has been loaded into DMA buffer, can be NULL if don't need it
timeout_ms
int
The timeout time in millisecond, set a minus value means will block forever
Return value
- ESP_ERR_INVALID_ARG The input parameter is invalid - ESP_ERR_INVALID_STATE The DAC continuous mode has not been enabled yet - ESP_ERR_TIMEOUT Waiting for semaphore or message queue timeout - ESP_OK Success to output the acyclic DAC data
Notes
The data in buffer will only be converted one time, This function will be blocked until all data loaded or timeout then the DAC output will keep outputting the voltage of the last data in the buffer Specially, on ESP32, the data bit width of DAC continuous data is fixed to 16 bits while only the high 8 bits are available, The driver will help to expand the inputted buffer automatically by default, you can also align the data to 16 bits manually by clearing `CONFIG_DAC_DMA_AUTO_16BIT_ALIGN` in menuconfig.