Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

Realtek 8019AS device driver

Ethernet device driver. More...

Modules

Device eth0

Data Structures

struct  nic_pkt_header

Functions

 NicRx (void *arg)
 NIC receiver thread. More...

int NicOutput (NUTDEVICE *dev, NETBUF *nb, u_char flags)
 Send Ethernet packet. More...

 NicTx (void *arg)
 NIC transmitter thread. More...

int NicInit (NUTDEVICE *dev)
 Initialize Ethernet hardware. More...


Detailed Description

Ethernet device driver.


Function Documentation

int NicInit ( NUTDEVICE * dev )
 

Initialize Ethernet hardware.

Resets RTL8019AS Ethernet controller, initializes all required hardware registers and starts two additional threads, one for incoming and another for outgoing Ethernet traffic.

This function takes more than 2 seconds to execute and should be called only once during system initialization.

Applications typically do not use this function, but call NutNetIfConfig().

Parameters:
dev   Identifies the device to initialize. The structure must be properly set.

int NicOutput ( NUTDEVICE * dev,
NETBUF * nb,
u_char flags )
 

Send Ethernet packet.

Parameters:
dev   Identifies the device to use.
nb   Network buffer structure containing the packet to be sent. The structure must have been allocated by a previous call NutNetBufAlloc(). This buffer will be automatically released in case of an error.
flags   Set to 1 for asynchronous output, 0 otherwise.

Returns:
0 on success, -1 in case of any errors. Errors will automatically release the network buffer structure.

NicRx ( void * arg )
 

NIC receiver thread.

It runs with high priority.

NicTx ( void * arg )
 

NIC transmitter thread.

This thread asynchronously transmits packets in the drivers netbuf queue.


© 2000-2001 by egnite Software GmbH - visit http://www.ethernut.de/