A driver for the analog-digital converters available on the microcontroller.
AnalogDigitalConverter * adc_
A class to represent a single pin configured for analog input.
uint16_t read_raw() const
Get the most recent reading of the pin, directly from the ADC. See AnalogDigitalConverter.read for the details on interpreting this value.
double read() const
Get the last reading of the pin, in volts.
void init(AnalogDigitalConverter *adc, GPIO_TypeDef *basePort, uint16_t pin, uint8_t adc_channel)
Initializes a pin to read analog values.