float hw_adc_read_temperature(hw_adc_t *adc)
Read the current value from an ADC channel as a temperature.
hw_gpio_t gpio
ADC GPIO pin number.
uint8_t channel
ADC channel number (0, 1, etc.)
GPIO (General Purpose Input/Output) interface.
uint16_t hw_adc_read(hw_adc_t *adc)
Read the current value from an ADC channel.
struct hw_adc_t hw_adc_t
ADC channel.
void hw_adc_finalize(hw_adc_t *adc)
Finalize and release an ADC interface.
float hw_adc_read_voltage(hw_adc_t *adc)
Read the current value from an ADC channel as a voltage.
static bool hw_adc_valid(hw_adc_t *adc)
Check if an ADC handle is valid and usable.
hw_adc_t hw_adc_init_pin(uint8_t pin)
Initialize an ADC interface for a specific pin.
hw_adc_t hw_adc_init_temperature()
Initialize an ADC interface on which the temperature sensor is connected.
uint8_t hw_adc_count(void)
Get the total number of available ADC channels.
GPIO logical pin structure.
uint8_t hw_adc_gpio_channel(uint8_t gpio)
Get the ADC channel number for a specific GPIO pin.