User manual

RC200/203 Manual
www.celoxica.com Page 78
Parameters:
DataPtr: Pointer to data of type unsigned 8. Returns a
byte of data from the received packet.
ResultPtr: Pointer to data of type unsigned 1. Returns 1
(failure) or 0 (success).
Timing:
2 or 7 clock cycles alternately, and up to 12 clock cycles for
the final read.
The macro reads a byte at a time, but Ethernet accesses
are 16-bit. When a byte of data is already buffered on the
chip the read only takes 2 clock cycles.
Timing may differ if other accesses to the chip precede a
read operation.
Description:
Reads a single data byte from the packet currently being
read.
Returns
ResultPtr = 1 to indicate an error if there is no
data remaining in the packet or if there is no read in
progress.
Data is read a byte at a time, but communications with the
Ethernet chip are 16-bit, so a byte is buffered in the
Ethernet data structure, until there are 16 bits to read.
You must call
RC200EthernetReadBegin() before this
macro.
Completing the read process
extern macro proc RC200EthernetReadEnd (ResultPtr);
Parameters:
ResultPtr: Pointer to data of type unsigned 1. Returns 1
(failure) or 0 (success).
Timing:
7 clock cycles to 5ms, depending on the speed of response of
the Ethernet device.
Description:
Completes the process of reading a packet from the Ethernet
device. You must call this macro after all the data has been
read from a packet.