objc

Data Structures | Typedefs | Functions
adc.h File Reference

ADC (Analog-to-Digital Converter) interface. More...

#include "gpio.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for adc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  hw_adc_t
 ADC channel. More...
 

Typedefs

typedef struct hw_adc_t hw_adc_t
 ADC channel.
 

Functions

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

Detailed Description

ADC (Analog-to-Digital Converter) interface.

Definition in file adc.h.