Hardware description
Parameters:
ResultPtr
: Pointer to register of type
unsigned 1
. Returns 0 for success, 1 for
failure.
Timing:
1 or more clock cycles. It will take more than one clock cycle if you call the macro
directly after the last call to
RC200SmartMediaRead()
or
RC200SmartMediaWrite()
.
Description:
You can only call this macro after a call to
RC200SmartMediaRead()
or
RC200SmartMediaWrite()
.
After a read or write is terminated, this macro ensures that all internal SmartMedia
driver operations are terminated before the next command can be called. Both of
the possible return values from this macro indicate that the SmartMedia driver is in
an idle state. You can then carry out other non-SmartMedia CPLD operations.
Checking for errors during reads and writes
extern macro expr RC200SmartMediaGetError();
You can use this macro to perform a real-time check for errors whilst a read or write operation is in
progress. You can use the macro at any time after the first call to
RC200SmartMediaRead()
or
RC200SmartMediaWrite()
and before you have called
RC200SmartMediaOperationEnd()
. It
will return 1 if there was an error in the previous operation, and return 0 otherwise.
5.16 Ethernet macros
Timing of the Ethernet macros is unpredictable, since the chip has its own CPU, and because of the
unpredictable nature of network communications (for example, a packet could be corrupt).
1. Call
RC200EthernetRun()
in parallel with the rest of the read/write code.
2. Call
RC200EthernetEnable()
.
3. Call
RC200EthernetReadBegin()
or
RC200EthernetWriteBegin()
.
4. Call
RC200EthernetRead()
or
RC200EthernetWrite()
. Data is read or written one
byte at a time.
5. Once the whole packet has been read or written, call
RC200EthernetReadEnd()
or
RC200EthernetWriteEnd()
.
Important considerations:
•
You must call
RC200EthernetReadEnd()
or
RC200EthernetWriteEnd()
at the end
of a read or write, and the driver will not reposnd correctly to further commands until this is
done.
•
If you call either
RC200EthernetReadBegin()
or
RC200EthernetWriteBegin()
and
they return an error, then a read or write operation has not been started, so there is no need
to call the "End" macros.
•
Once you start reading or writing a packet, you must finish it before accessing the network
driver in any other way. For example, it is not permissible to overlap reading and writing of
packets.
5.16.1 Ethernet management tasks
extern macro proc RC200EthernetRun (
ClockRate
,
MACAddress
);
www.celoxica.com
Page 64
Содержание RC200
Страница 1: ...Platform Developer s Kit RC200 203 Manual ...
Страница 72: ......
Страница 76: ...RC200 203 PSL reference TFT 28 writing data 50 www celoxica com Page 76 ...