www.pudn.com > cs8900a.rar > testIP.c
#include "DSP28_Device.h"
Uint16 AicRegs;
Uint16 FrameLenth;
Uint16 RxSuccessFlag;
//-------------------
Uint16 TxEthnetFrameBuffer[1518/2];
Uint16 RxEthnetFrameBuffer[1518/2];
//-------------------
extern struct ipaddr server_ipaddr;
void main(void)
{
Uint16 Temp;
Temp=1;
RxSuccessFlag=0;
/*初始化系统*/
InitSysCtrl();
/*关中断*/
DINT;
IER = 0x0000;
IFR = 0x0000;
/*初始化PIE*/
InitPieCtrl();
/*初始化PIE矢量表*/
InitPieVectTable();
InitPeripherals();
AicRegs = 0xBF;
Led8Reg = AicRegs;
RST8019();
Init8019();
// TCP_Init();
// Enable global Interrupts and higher priority real-time debug events:
EINT; // Enable Global interrupt INTM
ERTM; // Enable Global realtime interrupt DBGM
// StartCpuTimer0();
while(1)
{
// ArpRequest();
// RTL8019ActiveOpen();
do{
Temp=RecFrame();
}while(Temp);
if(RxSuccessFlag)
{
RxSuccessFlag=0;
DoNetworkStuff();
}
}
}
//===============================end ======================