Introduction - If you have any usage issues, please Google them yourself
int main (void)
{
PINSEL0 = (0x00000005)|(0x03<<18) //P0.0 P0.1用作UART
PINSEL1 = 0x00000000 //其余为GPIO
ReadModuleP() // 读参数
SetNetPort()
InitializeInterrupt()
InitNic(0) //RTL8019芯片初始化,在global.c中定义
//WDTC =27662592 //2s
//WDMOD =0X03
printf("Start OK!\n")
while(1)
{
if(WorkMode==CLIENTHOST) //TCP客户端
ClientHostProcess()
if(WorkMode==SERVERHOST) //tcp 服务器
ServerHostProcess()
if(WorkMode==UDPHOST) //UDP 模式
UDPHostProcess()
}
return 0
}