Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __ADC_H
00012 #define __ADC_H
00013
00014 #define ADC_INTERRUPT_FLAG 0
00015
00016 #define ADC_OFFSET 0x10
00017 #define ADC_INDEX 4
00018
00019 #define ADC_DONE 0x80000000
00020 #define ADC_OVERRUN 0x40000000
00021 #define ADC_ADINT 0x00010000
00022
00023 #define VOLTAGE_1 2
00024 #define VOLTAGE_2 4
00025 #define CURRENT_2 1
00026
00027 #define ADC_NUM 8
00028 #define ADC_CLK 1000000
00029
00030 extern void ADC0Handler( void ) __irq;
00031 extern void ADC1Handler( void ) __irq;
00032 extern unsigned int ADCInit( unsigned int ADC_Clk );
00033 extern unsigned int ADC0Read( unsigned char channelNum );
00034 extern unsigned int ADC1Read( unsigned char channelNum );
00035
00036 extern volatile unsigned int ADC0Value[ADC_NUM], ADC1Value[ADC_NUM];
00037 extern volatile unsigned int ADC0IntDone, ADC1IntDone;
00038
00039 #endif
00040
00041
00042