Device Driver And Application Interface Routines - ZiLOG Z183 EMAC User Manual

10 base-t ethernet media access controller add-on board for the z183 evaluation platform
Table of Contents

Advertisement

Z183 EMAC Board
User Manual
8

Device Driver and Application Interface Routines

Note: All code in this function would run at interrupt time. Pay attention to stack usage, shared variables,
event posting, etc.
Note: All code in this function would run at interrupt time. Pay attention to stack usage, shared variables,
event posting, etc.
UM008301-0401
extern int Init8900(char *ieeeaddr, void (*rxnotify)(), void (*txnotify)(), uint
*intrvec);
The Ethernet driver is initialized by a calling the Init8900() function.
ieeeaddr is a 6-byte (or 3-word) array that contains the unique 48-bit MAC
address assigned to the Ethernet add-on adapter.
void rxnotify (uint i) is a user function that is called at interrupt time to
indicate the arrival of a frame that meets the receive filter criteria you have
set (see SetRxFilter()). The pointer to this function is passed at initialization.
You must code the logic that involves receiving the frame contents into a
buffer using the ReceivePkt function, as well as doing any inbound buffer
chain management that may be required. The argument "i" available to your
code is a bit mask indicating the receive error/conditions applicable to the
frame that you can now retrieve using a ReceivePkt( ) call. The BIT_RXOK
condition bit is set for a good frame with no errors.
void txnotify (uint i) is a user function that is invoked at interrupt time to
indicate the completion of a previously issued transmit frame operation (see
TransmitPkt( )). The pointer to this user function is passed at initialization.
You can examine the argument "i" as a bitfield that indicates the event bits
pertaining to the transmit done.
This user function may also call TransmitPkt( ) to issue another frame for
transmission.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Z183 EMAC and is the answer not in the manual?

Table of Contents