以下是一个基于C语言编写的STM32F103开发板和GT9147触摸屏模块实现的简单画图程序,可以在PC9引脚接收到高电平后,在4.3寸触摸屏显示收到高电平的次数:
```c
#include "stm32f10x.h"
#include "gt9147.h"
#include "lcd.h"
int main(void)
{
uint16_t count = 0;
uint8_t touch_flag = 0;
RCC_Configuration();
GPIO_Configuration();
NVIC_Configuration();
USART_Configuration();
LCD_Init();
GT9147_Init();
while (1)
{
if (GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_9) == Bit_SET