4 #include <twr_common.h>
twr_dac_format_t
Raw value format.
void twr_dac_deinit(twr_dac_channel_t channel)
Deitialize DAC channel.
twr_dac_channel_t
DAC channel.
void twr_dac_async_stop(twr_dac_channel_t channel)
Stop asynchronous DAC channel operation.
void twr_dac_init(twr_dac_channel_t channel)
Initialize DAC channel.
twr_dac_event_t
DAC channel event.
twr_dac_data_size_t
Data size.
bool twr_dac_async_config(twr_dac_channel_t channel, twr_dac_config_t *config)
Configure image of DAC DMA channel.
void twr_dac_set_output(twr_dac_channel_t channel, const void *raw, twr_dac_format_t format)
Set DAC channel output as raw value.
bool twr_dac_async_run(twr_dac_channel_t channel)
Start asynchronous DAC channel operation.
void twr_dac_set_event_handler(twr_dac_channel_t channel, void(*event_handler)(twr_dac_channel_t, twr_dac_event_t, void *), void *event_param)
Set callback function.
twr_dac_sample_rate_t
Sample rate.
@ TWR_DAC_FORMAT_16_BIT
Raw value format is 16-bit.
@ TWR_DAC_FORMAT_VOLTAGE
Raw value format is float.
@ TWR_DAC_FORMAT_8_BIT
Raw value format is 8-bit.
@ TWR_DAC_DAC0
DAC channel DAC0.
@ TWR_DAC_DAC1
DAC channel DAC1.
@ TWR_DAC_EVENT_DONE
Event is done.
@ TWR_DAC_EVENT_HALF_DONE
Event is done.
@ TWR_DAC_DATA_SIZE_8
Data size is 8b.
@ TWR_DAC_DATA_SIZE_16
Data size is 16b.
@ TWR_DAC_MODE_SINGLE
Mode single.
@ TWR_DAC_MODE_CIRCULAR
Mode circular (repeate playing buffer)
@ TWR_DAC_SAMPLE_RATE_16K
Data sample-rate is 16kHz.
@ TWR_DAC_SAMPLE_RATE_8K
Data sample-rate is 8kHz.