adc.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  *   adc.h:  Header file for Philips LPC214x Family Microprocessors
00003  *
00004  *   Copyright(C) 2006, Philips Semiconductor
00005  *   All rights reserved.
00006  *
00007  *   History
00008  *   2005.10.01  ver 1.00    Prelimnary version, first Release
00009  *
00010 ******************************************************************************/
00011 #ifndef __ADC_H
00012 #define __ADC_H
00013 
00014 #define ADC_INTERRUPT_FLAG      0       /* 1 is interrupt driven, 0 is polling */
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_1       3
00026 #define CURRENT_2       1
00027 
00028 #define ADC_NUM         8               /* for LPC2146/8 */
00029 #define ADC_CLK         1000000         /* set to 1Mhz */
00030 
00031 extern void ADC0Handler( void ) __irq;
00032 extern void ADC1Handler( void ) __irq;
00033 extern unsigned int ADCInit( unsigned int ADC_Clk );
00034 extern unsigned int ADC0Read( unsigned char channelNum );
00035 extern unsigned int ADC1Read( unsigned char channelNum );
00036 extern void ADC0triggerSampling(unsigned char selectChannels); //activate continuous sampling on selected ADC channels
00037 extern void ADC0getSamplingResults(unsigned char selectChannels, unsigned int * channelValues);
00038 
00039 
00040 extern volatile unsigned int ADC0Value[ADC_NUM], ADC1Value[ADC_NUM];
00041 extern volatile unsigned int ADC0IntDone, ADC1IntDone;
00042 extern unsigned int adcChannelValues[8];
00043 
00044 #endif /* end __ADC_H */
00045 /*****************************************************************************
00046 **                            End Of File
00047 ******************************************************************************/


asctec_hl_firmware
Author(s): Markus Achtelik, Michael Achtelik, Stephan Weiss, Laurent Kneip
autogenerated on Tue Dec 17 2013 11:39:27