projekty/Source/example1/src/ad.h

Go to the documentation of this file.
00001 /*
00002  * $Id: ad.h,v 1 2004/11/25 9:22:00 BorisK Exp $
00003  *
00004  * Copyright (C) 2004 ONTRACK s.r.o.
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA    
00019  * 02111-1307, USA.
00020  *
00021  * [1] ARM-based Microcontroller LPC2119/2129/2194/2292/9994, "Preliminary User Manual", February 03, 2004
00022  *
00023  * Written by Boris Kralik <kralikbo@yahoo.com>, 2004
00024  *
00025  */
00026 #ifndef AD_H
00027 #define AD_H
00028 
00029 #include "./include/lpc2119.h"
00030 #include "./include/types.h"
00031 #include "./include/lpcVIC.h"
00032 
00033 #define AI0     100
00034 #define AI1     101
00035 #define AI2     102
00036 #define AI3     103
00037 #define AI4     104
00038 #define AI5     105
00039 #define AI6     106
00040 #define AI7     107
00041 #define AD_OFFSET       0x64    // Vce(sat)
00042 #define FALSE   0
00043 #define TRUE    1
00044 void __attribute__ ((interrupt("IRQ"))) ADC_interrupt(void);
00045 
00046 void            AD_Set_Reg(unsigned char);
00047 uint16_t        AD_read(unsigned char);
00048 void            AD_Start(void);
00049 void            AD_PowerDown(void);
00050 void            AD_PowerUp(void);
00051 unsigned char   isSet;
00052 
00053 #endif

Generated on Fri Sep 21 13:41:54 2007 for example1 by  doxygen 1.4.7