The DAC convert digital data to analog output.
int32_t dac_os_write( struct dac_os_descriptor *const descr, const uint8_t ch, uint16_t * buffer, uint32_t length )
It blocks the task/thread until the conversation is done. The buffer sample should be 16-bit wide. 8-bit data will not be supported. You must convert to 16-bit if there are 8-bit samples.
Type: struct dac_os_descriptor Struct *const
Pointer to the HAL DAC descriptor
Type: const uint8_t
The channel selected to output
Type: uint16_t *
Pointer to digital data or buffer
Type: uint32_t
The number of elements in buffer
Type: int32_t
Operation status.
Error code
Convert success