HRI board firmware  v2.1
Microcontroller firmware of the board used during the HRI labs.
Macros | Functions
dac.h File Reference
#include "../main.h"

Go to the source code of this file.

Macros

#define DAC1_Pin   GPIO_Pin_4
 
#define DAC2_Pin   GPIO_Pin_5
 
#define DAC_Port   GPIOA
 
#define DAC_FINAL_RANGE   9.0f
 
#define DAC_MAX   4095
 

Functions

void dac_Init (void)
 Setup a DAC with 2 channels. More...
 
void dac_SetVoltage1 (float32_t voltage)
 Set the voltage of the channel 1 of the DAC. More...
 
void dac_SetVoltage2 (float32_t voltage)
 Set the voltage of the channel 2 of the DAC. More...
 
float32_t dac_GetVoltage1 (void)
 Get the current output voltage of the channel 1 of the DAC. More...
 
float32_t dac_GetVoltage2 (void)
 Get the current output voltage of the channel 2 of the DAC. More...
 

Macro Definition Documentation

◆ DAC1_Pin

#define DAC1_Pin   GPIO_Pin_4

◆ DAC2_Pin

#define DAC2_Pin   GPIO_Pin_5

◆ DAC_FINAL_RANGE

#define DAC_FINAL_RANGE   9.0f

◆ DAC_MAX

#define DAC_MAX   4095

◆ DAC_Port

#define DAC_Port   GPIOA