main.c

来自「一个基于BIOS的串口数据和网口数据通信的程序」· C语言 代码 · 共 57 行

C
57
字号

#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 + =
减小字号Ctrl + -
显示快捷键?