Contiki 2.5
Macros | Functions
adc-drv.h File Reference

    ADC driver definitions
More...

#include <avr/io.h>

Go to the source code of this file.

Macros

#define ADC_SINGLE_CONVERSION   0xFF
 
#define ADC_FREE_RUNNING   0x00
 
#define ADC_ANALOG_COMPARATOR   (1 << ADTS0)
 
#define ADC_EXT_INTERRUPT   (1 << ADTS1)
 
#define ADC_TIMER0_COMP_FLAG   ((1 << ADTS1) | (1 << ADTS0))
 
#define ADC_TIMER0_OVERFLOW   (1 << ADTS2)
 
#define ADC_TIMER1_COMP_FLAG   ((1 << ADTS2) | (1 << ADTS0))
 
#define ADC_TIMER1_OVERFLOW   ((1 << ADTS2) | (1 << ADTS1))
 
#define ADC_TIMER1_CAPTURE   ((1 << ADTS2) | (1 << ADTS1) | (1 << ADTS0))
 
#define ADC_REF_AREF   0
 
#define ADC_REF_AVCC   (1 << REFS0)
 
#define ADC_REF_1100MV_INT   (1 << REFS1)
 
#define ADC_REF_2560MV_INT   ((1 << REFS1)| (1 << REFS0))
 

Functions

void adc_init (uint8_t mode, uint8_t ref)
 Initialize the ADC module. More...
 
uint16_t adc_get_value (void)
 This function returns the ADC data register value. More...
 
uint16_t adc_get_value_from (uint8_t chn)
 This function returns the ADC data register value of the given ADC channel. More...
 
void adc_set_mux (uint8_t mux)
 With this function you can set the ADX multiplexer. More...
 
void adc_deinit (void)
 This function stops all running ADC. More...
 

Detailed Description

    ADC driver definitions
Author
Ulf Kulau kulau.nosp@m.@ibr.nosp@m..cs.t.nosp@m.u-bs.nosp@m..de

Definition in file adc-drv.h.