adc.h File Reference

Low-level ADC peripheral driver interface definitions. More...

Detailed Description

Low-level ADC peripheral driver interface definitions.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file adc.h.

#include <limits.h>
#include <stdint.h>
#include "periph_cpu.h"
#include "periph_conf.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.

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...