touch.h

来自「ucosii和ucgui移植到LPC1788上」· C头文件 代码 · 共 32 行

H
32
字号
/****************************************************************************
*****************************************************************************
								By JJ
*****************************************************************************
****************************************************************************/
#ifndef __TOUCH_H
#define __TOUCH_H

#define NUM_samples 4

/*Type A I/O Control registers */
#define IO_Pull_up 	  0x0|(0x2<<3)|(0x5<<5)		//Gpio pull-up
#define ADC_In 	     (0x1)|(0x1<<3)				//ADC Input
#define IO_No_UD     (0x0)|(0x0<<3)|(0x5<<5)	//Gpio no pull-up	and pull-down

#define XR 12
#define XL 23
#define YU 25
#define YD 24

extern unsigned short x_vaule, y_vaule;
extern void touch_init(void);
extern void config_pins_x(void);
extern void config_pins_y(void);
extern unsigned short read_ch_x(void);
extern unsigned short read_ch_y(void);
extern unsigned char tmp;


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?