1 #ifndef STM32F103CB_ADC_H_ 2 #define STM32F103CB_ADC_H_ 41 #include <libopencm3/stm32/adc.h> 47 #define ADC_VOLT_REF 3.3f gpio_port
GPIO ports available for the MCU.
uint16_t ADC_sample(gpio_port port, gpio_pin pin)
Get a sample from the ADC.
Header file for stm32f103cb DEBUG.
Header file for stm32f103 GPIO.
uint16_t ADC_addChannel(gpio_port port, gpio_pin pin)
Add an aditional channel to the ADC.
mcu_error ADC_setup(gpio_port port, gpio_pin pin)
Initialize ADC for a given port and pin.
float ADC_volts(gpio_port port, gpio_pin pin)
Get a sample from the ADC and convert it to volts.
gpio_pin
GPIO pins available for each port.
mcu_error
Error enumerators for the Debug peripheral.