#ifndef __GT7385_H_
#define __GT7385_H_

#include "stm32f7xx_hal.h"

#define GT7385_MAX_WIDTH		          1024    // Touchscreen pad max width
#define GT7385_MAX_HEIGHT		          600			// Touchscreen pad max height

#define CT_CMD_WR			                0X28		// Write data command
#define CT_CMD_RD   	                0X29		// Read data command

#define CT_MAX_TOUCH                  10			// Capacitive touch screen supports maximum points

#define GT7385_COMMAND_REG   				  0x8040	// Real-time command
#define GT7385_PRODUCT_ID_REG 				0x8240 	// Product ID
#define GT7385_FIRMWARE_VERSION_REG   0x8244  // Firmware Version Number
#define GT7385_READ_XY_REG 					  0x824E	// Coordinate register

#define GT7385_RST_CLK()			        __GPIOD_CLK_ENABLE()
#define GT7385_RST_PORT			          GPIOD
#define GT7385_RST_PIN				        GPIO_PIN_11

#define GT7385_INT_CLK()			        __GPIOD_CLK_ENABLE()
#define GT7385_INT_PORT			          GPIOD
#define GT7385_INT_PIN				        GPIO_PIN_7

typedef struct
{
	uint8_t Touch;
	uint8_t TouchpointFlag;
	uint8_t TouchCount;
 
	uint8_t Touchkeytrackid[CT_MAX_TOUCH];
	uint16_t X[CT_MAX_TOUCH];
	uint16_t Y[CT_MAX_TOUCH];
	uint16_t S[CT_MAX_TOUCH];
}GT7385_Dev;

void GT7385_TEST(void);
	

#endif /*__GT7385_H_*/
