添加了触屏驱动,加入了触屏校准功能

This commit is contained in:
2021-08-07 17:05:35 +08:00
parent 11e983ef98
commit 4e864ed558
18 changed files with 12649 additions and 9122 deletions
+42
View File
@@ -0,0 +1,42 @@
/*
* touch.h
*
* Created on: 2021Äê8ÔÂ7ÈÕ
* Author: wuwenfeng
*/
#ifndef TOUCH_H_
#define TOUCH_H_
#include "main.h"
#define TCLK(x) HAL_GPIO_WritePin(TCLK_GPIO_Port,TCLK_Pin,x)
#define TCS(x) HAL_GPIO_WritePin(TCS_GPIO_Port,TCS_Pin,x)
#define TDIN(x) HAL_GPIO_WritePin(TDIN_GPIO_Port,TDIN_Pin,x)
#define TDOUT HAL_GPIO_ReadPin(TDOUT_GPIO_Port,TDOUT_Pin)
#define TPEN HAL_GPIO_ReadPin(TPEN_GPIO_Port,TPEN_Pin)
typedef struct
{
char begin;
float x_acc;
float y_acc;
int x_offset;
int y_offset;
char end;
}touch_config;
typedef struct
{
uint16_t adc_x;
uint16_t adc_y;
int pix_x;
int pix_y;
char move_flag;
}touch_device;
void TP_Server();
void TP_adjustment();
#endif /* TOUCH_H_ */