adc.h

Go to the documentation of this file.
00001 
00010 #ifndef ADC_H_
00011 #define ADC_H_
00012 
00013 // \cond
00014 #include <halAdc.h>
00015 
00016 #define HAL_NUMBER_ADC_CHANNELS 4
00017 
00018 #define HAL_ADC_CHANNEL0 0
00019 #define HAL_ADC_CHANNEL1 1
00020 #define HAL_ADC_CHANNEL2 2
00021 #define HAL_ADC_CHANNEL3 3
00022 
00023 typedef enum
00024 {
00025   ADC_DIVISION_FACTOR_2 =   ((0 << ADPS2) | (0 << ADPS1) | (1 << ADPS0)),
00026   ADC_DIVISION_FACTOR_4 =   ((0 << ADPS2) | (1 << ADPS1) | (0 << ADPS0)),
00027   ADC_DIVISION_FACTOR_8 =   ((0 << ADPS2) | (1 << ADPS1) | (1 << ADPS0)),
00028   ADC_DIVISION_FACTOR_16 =  ((1 << ADPS2) | (0 << ADPS1) | (0 << ADPS0)),
00029   ADC_DIVISION_FACTOR_32 =  ((1 << ADPS2) | (0 << ADPS1) | (1 << ADPS0)),
00030   ADC_DIVISION_FACTOR_64 =  ((1 << ADPS2) | (1 << ADPS1) | (0 << ADPS0)),
00031   ADC_DIVISION_FACTOR_128 = ((1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0))
00032 }HAL_AdcDivisionFactor_t;
00033 // \endcond
00034 
00035 /**************************************************************************/
00052 int HAL_OpenAdc(HAL_AdcDivisionFactor_t factor , void (*callback)(uint16_t data));
00053 
00054 
00055 /**************************************************************************/
00068 int HAL_ReadAdc(uint8_t channel);
00069 
00070 /**************************************************************************/
00077 int HAL_CloseAdc();
00078 
00079 #endif
00080 // eof adc.h

Generated on Wed Apr 2 19:06:15 2008 for ZigBeeNet Stack Documentation by  doxygen 1.5.1-p1