#include "stm32f10x.h"
#include "delay.h"
#include "usart.h"
#include "lcd.h"
#include "gt9147.h"
int main(void)
{
u16 times = 0;
u8 flag = 0;
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
delay_init();
uart_init(115200);
LCD_Init();
GT9147_Init();
while (1)
{
if (GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_9) == 1 && flag == 0)
{
times++;
flag = 1;
LCD_ShowNum(30, 50, times, 5, 16);
}
else if (GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_9) == 0)
{
flag = 0;
}
GT9147_Scan(0);
delay_ms(10);
}
}