SMSC LAN91C111
[Ethernet]

Collaboration diagram for SMSC LAN91C111:

Detailed Description

10/100 MBit Ethernet controller.

The LAN91C111 chip is used on the Ethernut 2 board.


Modules

 LAN91C111 registers
 SMSC LAN91C111 register definitions.

Functions

void NicRxLanc (void *arg)
 NIC receiver thread.
int LancOutput (NUTDEVICE *dev, NETBUF *nb)
 Send Ethernet packet.
int LancInit (NUTDEVICE *dev)
 Initialize Ethernet hardware.

Variables

NUTDEVICE devSmsc111
 Device information structure.


Function Documentation

NicRxLanc ( void *  arg  ) 

NIC receiver thread.

Definition at line 1168 of file lanc111.c.

References _NUTDEVICE::dev_dcb, _NUTDEVICE::dev_icb, ifnet::if_mac, ifnet::if_recv, LANC111_SIGNAL_IRQ, LANC111_SIGNAL_MODE, NICINFO::ni_rx_packets, NICINFO::ni_rx_rdy, nic_inlb, NIC_MSK, nic_outlb, NutEventPost(), NutEventWait(), NutSleep(), NutThreadSetPriority(), and sbi.

Referenced by DmInit(), and LancInit().

int LancOutput ( NUTDEVICE dev,
NETBUF nb 
)

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().
Returns:
0 on success, -1 in case of any errors.

Definition at line 1244 of file lanc111.c.

References _NUTDEVICE::dev_dcb, NICINFO::ni_tx_packets, NutEventPost(), and NutEventWait().

int LancInit ( NUTDEVICE dev  ) 

Initialize Ethernet hardware.

Resets the LAN91C111 Ethernet controller, initializes all required hardware registers and starts a background thread for incoming Ethernet traffic.

Applications should do not directly call this function. It is automatically executed during during device registration by NutRegisterDevice().

If the network configuration hasn't been set by the application before registering the specified device, this function will call NutNetLoadConfig() to get the MAC address.

Parameters:
dev Identifies the device to initialize.

Definition at line 1293 of file lanc111.c.

References cbi, _NUTDEVICE::dev_dcb, LANC111_SIGNAL, LANC111_SIGNAL_IRQ, memset(), NicRxLanc(), NutRegisterIrqHandler(), and NutThreadCreate().


Variable Documentation

NUTDEVICE devSmsc111

Initial value:

 {
    0,                          
    {'e', 't', 'h', '0', 0, 0, 0, 0, 0},        
    IFTYP_NET,                  
    0,                          
    0,                          
    &ifn_eth0,                  
    &dcb_eth0,                  
    LancInit,                   
    0,                          
    0,                          
    0,                          
    0,                          
    0,                          
    0,                          
    0                           
}
Device information structure.

A pointer to this structure must be passed to NutRegisterDevice() to bind this Ethernet device driver to the Nut/OS kernel. An application may then call NutNetIfConfig() with the name eth0 of this driver to initialize the network interface.

Definition at line 1344 of file lanc111.c.


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