163 DAC_CR(dac) &= ~DAC_CR_EN1;
166 DAC_CR(dac) &= ~DAC_CR_EN2;
213 DAC_CR(dac) &= ~DAC_CR_DMAEN1;
216 DAC_CR(dac) &= ~DAC_CR_DMAEN2;
264 DAC_CR(dac) &= ~DAC_CR_TEN1;
267 DAC_CR(dac) &= ~DAC_CR_TEN2;
304 uint32_t reg =
DAC_CR(dac);
358 uint32_t reg =
DAC_CR(dac);
442 uint16_t data1, uint16_t data2,
447 DAC_DHR8RD(dac) = ((data1 & 0xFF) | ((data2 & 0xFF) << 8));
451 ((data2 & 0xFFF) << 16));
455 ((data2 & 0xFFF) << 16));
#define DAC_CR_WAVEx_MASK
Wave generation mode mask size.
#define DAC_CR_WAVE1_SHIFT
WAVE1[1:0]: DAC channel1 wave generation mode.
#define DAC_CR_MAMP2_SHIFT
MAMP2[3:0]: DAC channel2 mask/amplitude selector field position.
#define DAC_CR_MAMP1_SHIFT
MAMP1[3:0]: DAC channel1 mask/amplitude selector field position.
#define DAC_CR_DMAEN2
DMAEN2: DAC channel2 DMA enable.
#define DAC_CR_WAVE2_SHIFT
WAVE2[1:0]: DAC channel2 wave generation mode.
#define DAC_CR_MAMPx_MASK
MAMP Mask/Amplitude selector field size.
#define DAC_CR_DMAEN1
DMAEN1: DAC channel1 DMA enable.
#define DAC_CR_EN2
EN2: DAC channel2 enable.
#define DAC_CR_EN1
EN1: DAC channel1 enable.
dac_align
DAC data size (8/12 bits), alignment (right/left)
dac_wave
DAC waveform generation options.
void dac_disable_waveform_generation(uint32_t dac, int channel)
Disable DAC Channel Waveform Generation.
void dac_set_waveform_characteristics(uint32_t dac, int channel, int mamp)
Set DAC Channel LFSR Mask or Triangle Wave Amplitude.
void dac_set_trigger_source(uint32_t dac, uint32_t source)
Set DAC Channel Trigger Source.
void dac_set_waveform_generation(uint32_t dac, int channel, enum dac_wave wave)
Set DAC Channel Waveform Generation mode for one or both channels.
void dac_trigger_enable(uint32_t dac, int channel)
DAC Channel Trigger Enable.
void dac_load_data_buffer_single(uint32_t dac, uint16_t data, enum dac_align align, int channel)
Load DAC Data Register.
void dac_software_trigger(uint32_t dac, int channel)
Trigger the DAC by a Software Trigger.
void dac_disable(uint32_t dac, int channel)
DAC Channel Disable.
void dac_dma_enable(uint32_t dac, int channel)
DAC Channel DMA Enable.
void dac_load_data_buffer_dual(uint32_t dac, uint16_t data1, uint16_t data2, enum dac_align align)
Load DAC Dual Data Register.
void dac_enable(uint32_t dac, int channel)
DAC Channel Enable.
void dac_trigger_disable(uint32_t dac, int channel)
DAC Channel Trigger Disable.
void dac_dma_disable(uint32_t dac, int channel)
DAC Channel DMA Disable.
#define DAC_CR(dac)
DAC control register (DAC_CR)
#define DAC_DHR12R1(dac)
DAC channel1 12-bit right-aligned data holding register (DAC_DHR12R1)
#define DAC_DHR12RD(dac)
Dual DAC 12-bit right-aligned data holding register (DAC_DHR12RD)
#define DAC_DHR12R2(dac)
DAC channel2 12-bit right aligned data holding register (DAC_DHR12R2)
#define DAC_DHR12L2(dac)
DAC channel2 12-bit left aligned data holding register (DAC_DHR12L2)
#define DAC_DHR8RD(dac)
DUAL DAC 8-bit right aligned data holding register (DAC_DHR8RD)
#define DAC_SWTRIGR(dac)
DAC software trigger register (DAC_SWTRIGR)
#define DAC_DHR8R2(dac)
DAC channel2 8-bit right-aligned data holding register (DAC_DHR8R2)
#define DAC_DHR12L1(dac)
DAC channel1 12-bit left aligned data holding register (DAC_DHR12L1)
#define DAC_DHR8R1(dac)
DAC channel1 8-bit right aligned data holding register (DAC_DHR8R1)
#define DAC_DHR12LD(dac)
DUAL DAC 12-bit left aligned data holding register (DAC_DHR12LD)
#define DAC_SWTRIGR_SWTRIG1
SWTRIG1: DAC channel1 software trigger.
#define DAC_SWTRIGR_SWTRIG2
SWTRIG2: DAC channel2 software trigger.