Download Wireless Ethernet LAN Adaptor

Transcript
/* It is an ARP message, which has been replied
when ARP_Init() function was called*/
call eth_setRxBufferEmpty();
FoundARP = FALSE;
RxPtrFound = FALSE;
}
}
}
/* Check to see if a Serial Packet is waiting for assemble*/
if ((Serial_Rx_Ptr = ser_recv(&Serial_Rx_Length)) != NULL)
{
/*Function twoByteToHex is used to convert ASCII into
HEX*/
call twoByteToHex(tempbuff, Serial_Rx_Ptr) function;
Serial_Rx_Ptr = tempbuff;
if (Eth_Tx_Ptr != NULL)
{
call Assemble() function;
ser_setRxBufferEmpty();
SerRxPtrFound = FALSE;
}
}
}
return 0;
}
3.2.1.1
DISASSEMBLE BLOCK
Function Disassemble()
{
CopyToSer(Serial_Tx_Ptr, Eth_Rx_Ptr, Eth_Rx_Len);
//+4 for the four end of sequence bytes
ser_send(Eth_Rx_Len+4);
eth_setRxBufferEmpty();
}//End Disassemble
3.2.1.2
ASSEMBLE BLOCK
Table 5: Description of Local Variables used in Assemble Function
Variable Name
int End
int Start
int Length
Description
Indicate end position of the packet
Indicate start position of the packet
Indicate length of the packet
Function Assemble
29