Low-level ADC peripheral driver interface definitions. More...
Low-level ADC peripheral driver interface definitions.
Definition in file adc.h.
#include <limits.h>
#include <stdint.h>
#include "periph_cpu.h"
#include "periph_conf.h"
Go to the source code of this file.
Macros | |
#define | ADC_UNDEF (UINT_MAX) |
Default ADC undefined value. | |
#define | ADC_LINE(x) (x) |
Default ADC line access macro. | |
Typedefs | |
typedef unsigned int | adc_t |
Define default ADC type identifier. | |
Enumerations | |
enum | adc_res_t { ADC_RES_6BIT = 0, ADC_RES_8BIT, ADC_RES_10BIT, ADC_RES_12BIT, ADC_RES_14BIT, ADC_RES_16BIT } |
Possible ADC resolution settings. More... | |
Functions | |
int | adc_init (adc_t line) |
Initialize the given ADC line. More... | |
int32_t | adc_sample (adc_t line, adc_res_t res) |
Sample a value from the given ADC line. More... | |