⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 博创2410的实验代码
💻 C
字号:
#include "../inc/lib.h"
#include <stdio.h>
#include "inc/tchScr.h"
#include "uhal/uhal.h"
#pragma import(__use_no_semihosting_swi)  // ensure no functions that use semihosting 

void TchScr_Test()
{
	int *x,*y;
	Uart_Printf(0,"\nplease touch the screen\n");
	for(;;){
	     if(!(rADCDAT0&(1<<15))){
		 TchScr_GetScrXY(x, y);
		 Uart_Printf(0,"x=%d,\ty=%d\n",*x,*y);
		 }
		 else
		 continue;
		hudelay(1000);
	}

}


///*****************事件定义*****************///


/////////////////////////////////////////////////////
//                  Main function.                //
////////////////////////////////////////////////////
int main(void)
{

	ARMTargetInit();        // do target (uHAL based ARM system) initialisation //
	TchScr_init();          //触摸屏初始化  
    TchScr_Test();          //触摸屏测试
}    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -