24#ifndef _WATCH_ADC_H_INCLUDED
25#define _WATCH_ADC_H_INCLUDED
98 ADC_REFERENCE_INTREF = 0,
99 ADC_REFERENCE_VCC_DIV1POINT6,
100 ADC_REFERENCE_VCC_DIV2,
102} watch_adc_reference_voltage;
uint16_t watch_get_analog_pin_level(const uint8_t pin)
Reads an analog value from one of the pins.
void watch_enable_analog_input(const uint8_t pin)
Configures the selected pin for analog input.
uint16_t watch_get_vcc_voltage(void)
Returns the voltage of the VCC supply in millivolts (i.e. 3000 mV == 3.0 V). If running on a coin cel...
void watch_enable_adc(void)
Enables the ADC peripheral. You must call this before attempting to read a value from an analog pin.
void watch_set_analog_num_samples(uint16_t samples)
Sets the number of samples to accumulate when measuring a pin level. Default is 16.
void watch_set_analog_reference_voltage(watch_adc_reference_voltage reference)
Selects the reference voltage to use for analog readings. Default is ADC_REFERENCE_VCC.
void watch_disable_analog_input(const uint8_t pin)
Disables the analog circuitry on the selected pin.
void watch_set_analog_sampling_length(uint8_t cycles)
Sets the length of time spent sampling, which allows measurement of higher impedance inputs....
void watch_disable_adc(void)
Disables the ADC peripheral.