49 size_t count,
void *userdata);
bool hw_adc_read_dma(hw_adc_t *adc, uint16_t *buf, size_t count, size_t partitions, hw_adc_dma_callback_t callback, void *userdata)
Start an asynchronous, DMA-driven read of raw samples.
uint16_t hw_adc_read_12(hw_adc_t *adc, uint16_t num_samples)
Read the current value from an ADC channel as a 12-bit value.
struct hw_gpio_t hw_gpio_t
GPIO logical pin structure.
float hw_adc_read_temperature(hw_adc_t *adc, uint16_t num_samples)
Read the current value from an ADC channel as a temperature.
hw_adc_t * hw_adc_init_pin(hw_gpio_t *gpio)
Initialize an ADC handle for a specific GPIO pin.
void hw_adc_deinit(hw_adc_t *adc)
Finalize and release an ADC handle.
GPIO (General Purpose Input/Output) interface.
uint8_t hw_adc_gpio_pin(uint8_t channel)
Get the GPIO pin number for an ADC channel.
bool(* hw_adc_dma_callback_t)(hw_adc_t *adc, uint16_t *buf, size_t count, void *userdata)
DMA read completion callback.
float hw_adc_read_voltage(hw_adc_t *adc, uint16_t num_samples)
Read the current value from an ADC channel as a voltage.
uint8_t hw_adc_gpio_channel(uint8_t pin)
Get the ADC channel number for a GPIO pin on bank 0.
struct hw_adc_t hw_adc_t
Opaque ADC handle.
uint8_t hw_adc_count(void)
Get the total number of available ADC channels.
uint16_t hw_adc_read_16(hw_adc_t *adc, uint16_t num_samples)
Read the current value from an ADC channel as a 16-bit value.
hw_adc_t * hw_adc_init_temperature(void)
Initialize an ADC handle for the internal temperature sensor channel.