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

📄 main.c

📁 一个基于BIOS的串口数据和网口数据通信的程序
💻 C
字号:

#include "../inc/config.h"
#include "../inc/board.h"
#include "../inc/utils.h"
#include "../inc/ETHER.h"
#include "../inc/def.h"
#include "../inc/IP.h"
#include "../inc/NET.h"
#include "../inc/NETUTIL.h"
#include "../inc/s3c4510b.h"
#include "../inc/UDP.h"
#include "../inc/utils.h"

void LedDisp(void)
{	
	U16 m ;
	for( m = 0 ; m < 8 ; m++ ) 
	{
		LedSet( 1<<(m) );		
		Delay(80);
	}

	for( m = 0 ; m < 8 ; m++ ) 
	{
		LedSet( 0x80>>(m) );		
		Delay(80);
	}

}


/****************************************************************************
【功能说明】系统主函数
****************************************************************************/
void Main(void)
{    int getchar;//what i get from the uart
    int i;
	DisableInt();	
	PortInit();
	Uart_Init(0,115200);
	Uart_Select(0); //选择串口一进行通信
	LedDisp();		//LED来回闪烁显示	
	printf("\n  please send to data to me .i will send them out by another way \n");
	while(1)
	{
		getchar=Uart_Getch();
		//调用我上面加进去的TCP/IP函数将他从网口抛出去
			
	
	
	
	}
		
 }	
}
//***************************************************************************

⌨️ 快捷键说明

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