?? tp.h
字號(hào):
/*""FILE COMMENT""*************************************************************
* System Name : RENESAS T-Engine, micro T-Engine series
* File Name : tp.h
* Version : 1.00.00
* Contents : Touch Panel
* Model : T-Engine/SH7727
* CPU : SH7727
* Compiler : GNU
* OS : T-Kernel
* note : The Software is being delivered to you "AS IS"
* : and Renesas,whether explicitly or implicitly makes
* : no warranty as to its Use or performance.
* : RENESAS AND ITS SUPPLIER DO NOT AND CANNOT WARRANT
* : THE PERFORMANCE OR RESULTS YOU MAY OBTAIN BY USING
* : THE SOFTWARE. AS TO ANY MATTER INCLUDING WITHOUT
* : LIMITATION NONINFRINGEMENT OF THIRD PARTY RIGHTS,
* : MERCHANTABILITY, INTEGRATION, SATISFACTORY QUALITY,
* : OR FITNESS FOR ANY PARTICULAR PURPOSE.
*
* Copyright (c) 2006 RENESAS TECHNOLOGY CORP. All Rights Reserved.
* AND RENESAS SOLUTIONS CORP. All Rights Reserved.
* history : 2006.07.28 ver1.00.00
*""FILE COMMENT END""*********************************************************/
#ifndef _TP_H_
#define _TP_H_
#include <tk/tkernel.h>
/* TP Register */
#define TPLCR 0x20
#define TPLSR 0x21
#define TPLSCR 0x22
#define XPAR 0x24
#define YPAR 0x26
#define XPDR 0x28
#define YPDR 0x2A
#define XAPDR 0x2C
#define YAPDR 0x2E
#define XBPDR 0x30
#define YBPDR 0x32
#define XCPDR 0x34
#define YCPDR 0x36
#define XAPAR 0x38
#define YAPAR 0x3A
#define XBPAR 0x3C
#define YBPAR 0x3E
#define XCPAR 0x40
#define YCPAR 0x42
#define DXDR 0x44
#define DYDR 0x46
#define XPARDOT 0x48
#define XPARDOT1 0x4A
#define XPARDOT2 0x4C
#define XPARDOT3 0x4E
#define XPARDOT4 0x50
#define YPARDOT 0x52
#define YPARDOT1 0x54
#define YPARDOT2 0x56
#define YPARDOT3 0x58
#define YPARDOT4 0x5A
/* sampling period */
#define TP_20MS 0x0001
#define TP_40MS 0x0002
#define TP_60MS 0x0004
#define TP_80MS 0x0008
#define TP_100MS 0x0010
#define TP_120MS 0x0020
#define TP_140MS 0x0040
#define TP_160MS 0x0080
/* TPLCR REG bit*/
#define TP_CR_STR 0x01
#define TP_CR_ONI 0x02
#define TP_CR_OFFI 0x04
#define TP_CR_ONRE 0x08
/* TPLSR REG bit*/
#define TP_sr_ONIF 0x02
#define TP_sr_OFFIF 0x04
typedef struct position {
H x; /* Horizontal coordinates value */
H y; /* Vertical coordinates value */
} POS;
typedef struct {
T_DEVEVT h;
UH stat;
POS pos;
} PdEvt;
#define TPON 1
#define TPOFF 0
/* Message Buffer size */
#define PD_BUFSZ sizeof(PdEvt)*10
/* Max Message Buffer size */
#define PD_MAXMSZ sizeof(PdEvt)
/* inner functions */
IMPORT ID tp_init(void);
IMPORT ER tp_calibration(void);
IMPORT ER tp_tch_pen(UH *onoff,POS *pos,TMO tmout);
IMPORT void tp_ena_int(void);
IMPORT void tp_dis_int(void);
IMPORT ER tp_set_cyctime(UB time);
IMPORT void tp_inthdr(UINT dintno);
IMPORT void h8_inthdr(UINT dintno);
#endif /* _TP_H_ */
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -