main.c
来自「博创2410的实验代码」· C语言 代码 · 共 38 行
C
38 行
#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 + =
减小字号Ctrl + -
显示快捷键?