panel.h
上传用户:zbk8730
上传日期:2017-08-10
资源大小:12168k
文件大小:2k
- #ifndef _PANEL_H_
- #define _PANEL_H_
- #include "paneldrv.h"
- #include <cyg/infra/cyg_type.h>
- #include <cyg/kernel/kapi.h>
- #include <cyg/io/devm.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #ifndef L_PLATFORM
- enum _TOUCHACTION
- {
- _PE_MOVE = 0,
- _PE_LDOWN = 1,
- _PE_LUP = 2,
- _PE_DBCLICK = 3
- };
- #else
- enum _TOUCHACTION
- {
- _PE_MOVE = 0x10,
- _PE_LDOWN = 0x04,
- _PE_LUP = 0x00
- };
- #endif
- typedef struct _ts_event {
- short button_state; /* button state */
- short xPos, yPos; /* X-position and Y-position */
- short _unused; /* dummy */
- int ticks; /* ticks for current event generate */
- }ts_event;
- typedef struct tagTsInfo{
- CYG_WORD int_num;
- cyg_handle_t interrupt_handle;
- cyg_interrupt interrupt;
- void * hdev;
- DEV_CALLBACK callback;
- }ts_info;
- typedef struct TAG_TCHSCR_RECTIF
- {
- unsigned short cent_val_x;
- unsigned short cent_val_y;
- unsigned short lftp_val_x;
- unsigned short lftp_val_y;
- unsigned short rghtp_val_x;
- unsigned short rghtp_val_y;
- unsigned short lfbm_vla_x;
- unsigned short lfbm_val_y;
- unsigned short rghbm_val_x;
- unsigned short rghbm_val_y;
- unsigned short cent_crd_x;
- unsigned short cent_crd_y;
- unsigned short lftp_crd_x;
- unsigned short lftp_crd_y;
- unsigned short rghtp_crd_x;
- unsigned short rghtp_crd_y;
- unsigned short lfbm_crd_x;
- unsigned short lfbm_crd_y;
- unsigned short rghbm_crd_x;
- unsigned short rghbm_crd_y;
- } TCHSCR_RECTIF, *PTCHSCR_RECTIF;
- typedef enum
- {
- TCHSCR_AREA_A = 0,
- TCHSCR_AREA_B = 1,
- TCHSCR_AREA_C = 2,
- TCHSCR_AREA_D = 3
- } enum_TCHSCR_AREA;
- extern unsigned char PutPanelInf(PANEL_STRUC *panelvar);
- extern unsigned char GetPanelInf(PANEL_STRUC *panelvar);
- extern void InitPanelQueue(void);
- extern unsigned char _PeekPanel(PANEL_STRUC *p);
- extern void tchscr_calcu_pencoord( void );
- #ifdef __cplusplus
- }
- #endif
- #endif