82 #define DAC_FLAG_8BIT   (0x0) 
   88 #ifndef DAC_FLAG_16BIT 
   89 #define DAC_FLAG_16BIT  (0x1) 
DAC peripheral driver interface definition.
 
Low-level timer peripheral driver interface definitions.
 
void dac_dds_init(dac_dds_t dac, uint16_t sample_rate, uint8_t flags, dac_dds_cb_t cb, void *cb_arg)
Initialize a DAC for playing audio samples A user defined callback can be provided that will be calle...
 
void dac_dds_stop(dac_dds_t dac)
Stop playback of the current sample buffer.
 
void(* dac_dds_cb_t)(void *arg)
The callback that will be called when the end of the current sample buffer has been reached.
 
bool dac_dds_play(dac_dds_t dac, const void *buf, size_t len)
Play a buffer of (audio) samples on a DAC.
 
uint8_t dac_dds_t
Index of the DAC DDS channel.
 
void dac_dds_set_cb(dac_dds_t dac, dac_dds_cb_t cb, void *cb_arg)
Change the 'buffer done' callback.
 
uint_fast8_t dac_t
Define default DAC type identifier.
 
uint_fast8_t tim_t
Default timer type.
 
Configuration struct for a DAC DDS channel.
 
dac_t dac
The DAC used for playing the sample
 
uint32_t timer_hz
Timer frequency, must be at least 2x sample rate.
 
tim_t timer
Timer used for periodic DAC events