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

📄 main.c

📁 嵌入式S3C44BOX平台通过串口线实现与PC超级端口之间的串行通信。
💻 C
字号:
#include"uhal.h"
#include"def.h"
#include"myuart.h"
#pragma import(__use_no_semihosting_swi)  // ensure no functions that use semihosting 
int main(void)
{
	char c1[1];
	char temp[1000];
	unsigned int i,j=0;
	char err;
	ARMTargetInit();	//开发版初始化

	Uart_Printf("input your word(end with #):\n");
    //Uart_SendByte(0,0xa);//换行
	//Uart_SendByte(0,0xd);//回车
	
	while(c1[0]!='#')
	{
       	//Uart_SendByte(0,0xa);//换行
		//Uart_SendByte(0,0xd);//回车
        	err=Uart_Getch(c1,0,0);	//从串口采集数据
        	//Uart_SendByte(0,c1[0]);	//显示采集的数据
        	temp[j++]=c1[0];
	}
	Uart_Printf("ok\n");
	for(i=0;i<j;i++)
	{
		Uart_SendByte(0,temp[i]);
	}
	return 0;
}

⌨️ 快捷键说明

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