BeRTOS
adc_avr.h
Go to the documentation of this file.
00001 
00037 #ifndef DRV_ADC_AVR_H
00038 #define DRV_ADC_AVR_H
00039 
00040 #include <cfg/compiler.h>
00041 
00042 #if CPU_AVR_ATMEGA1280 || CPU_AVR_ATMEGA2560
00043     /* 16 channels aivailable */
00044     #define ADC_MUX_MAXCH 15
00045 #else
00046     /* only 8 channels aivailable */
00047     #define ADC_MUX_MAXCH 7
00048 #endif
00049 #define ADC_BITS      10
00050 
00051 void adc_hw_select_ch(uint8_t ch);
00052 uint16_t adc_hw_read(void);
00053 void adc_hw_init(void);
00054 
00055 #endif /* DRV_ADC_AVR_H */