22 #define DAC1_Pin GPIO_Pin_4 23 #define DAC2_Pin GPIO_Pin_5 24 #define DAC_Port GPIOA 26 #define DAC_FINAL_RANGE 9.0f // -9 to 9V after the op-amp. 27 #define DAC_MAX 4095 // 12-bits. void dac_Init(void)
Setup a DAC with 2 channels.
Definition: dac.c:23
void dac_SetVoltage2(float32_t voltage)
Set the voltage of the channel 2 of the DAC.
Definition: dac.c:75
float32_t dac_GetVoltage1(void)
Get the current output voltage of the channel 1 of the DAC.
Definition: dac.c:89
float32_t dac_GetVoltage2(void)
Get the current output voltage of the channel 2 of the DAC.
Definition: dac.c:100
void dac_SetVoltage1(float32_t voltage)
Set the voltage of the channel 1 of the DAC.
Definition: dac.c:61