main.c

来自「单片机串行口实验」· C语言 代码 · 共 17 行

C
17
字号
#include"uhal.h"
#include"myuart.h"
#pragma import(__use_no_semihosting_swi)  // ensure no functions that use semihosting 
int main(void)
{
	char c1[1];
	char err;
	ARMTargetInit();	//开发版初始化
	while(1)
	{
       	Uart_SendByte(0,0xa);//换行
		Uart_SendByte(0,0xd);//回车
        	err=Uart_Getch(c1,0,0);	//从串口采集数据
        	Uart_SendByte(0,c1[0]);	//显示采集的数据
	}
	return 0;
}

⌨️ 快捷键说明

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