00001 #ifndef touchh
00002 #define touchh
00003
00004 #include <type.h>
00005 #include <lpc2xxx.h>
00006
00007 #define DCLK_PIN 1<<31
00008 #define CS_PIN 1<<28
00009 #define DIN_PIN 1<<3
00010 #define BUSY_PIN 1<<2
00011 #define DOUT_PIN 1<<5
00012 #define PENIRQ_PIN 1<<27
00013
00014 #define TP_DCLK_H() FIOSET=DCLK_PIN;
00015 #define TP_DCLK_L() FIOCLR=DCLK_PIN;
00016 #define TP_CS_H() FIOSET=CS_PIN;
00017 #define TP_CS_L() FIOCLR=CS_PIN;
00018 #define TP_DIN_H() FIOSET=DIN_PIN;
00019 #define TP_DIN_L() FIOCLR=DIN_PIN;
00020 #define TP_DOUT (FIOPIN & DOUT_PIN)
00021
00022 void TP_Init();
00023 void TP_Done();
00024
00025 UINT8 TP_GetAdXY(UINT16 *x, UINT16 *y);
00026
00027 #endif