?? touchstreen.h
字號:
#ifndef __TOUCHSTREEN_H
#define __TOUCHSTREEN_H
#include "stm32f10x.h"
#include "fsmc_sram.h"
#include "grlib/grlib.h"
#include "Calibrate.h"
typedef struct
{
unsigned int uiXs;
unsigned int uiYs;
float fXe;
float fYe;
} TOUCH_CorrectionTypeDef;
typedef struct
{
unsigned int uiX;
unsigned int uiY;
}PointTypeDef;
extern TOUCH_CorrectionTypeDef g_TouchCorrectionStruct;
extern MATRIX g_MATRIX;//觸摸屏矯正矩陣結構體
#define TP_CS() GPIO_ResetBits(GPIOB,GPIO_Pin_7) //觸摸SPI 片選允許
#define TP_DCS() GPIO_SetBits(GPIOB,GPIO_Pin_7) //觸摸SPI 片選禁止
#define PEN GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_6) //觸摸檢測
void XTP2046_Init(void);
unsigned char SPI_WriteByte(unsigned char ucData);
unsigned int XTP2046Read_X(void);
unsigned int XTP2046Read_Y(void);
void Get_Coordinat(PointTypeDef *psPOINT);
//unsigned char Get_Coordinat(POINT *psScreen);
void Get_TouchCorrection(TOUCH_CorrectionTypeDef *TouchCorrectionStruct);
void Get_Conv_Coordinate(TOUCH_CorrectionTypeDef TouchCorrectionStruct,PointTypeDef *pstrPoint);
void Set_TS_MATRIX(MATRIX *MATRIX);
void TS_GPIO_Configuration(void);
void TS_NVIC_Configuration(void);
extern void TouchScreenCallbackSet(long (*pfnCallback)(unsigned long ulMessage, long lX,long lY));
extern void TouchScreenFeedBack(void );
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -