VxWorks Reference Manual : Libraries
if_esmc - Ampro Ethernet2 SMC-91c9x Ethernet network interface driver
esmcattach( ) - publish the esmc network interface and initialize the driver.
esmcPut( ) - copy a packet to the interface.
esmcShow( ) - display statistics for the esmc network interface
This module implements the Ampro Ethernet2 SMC-91c9x Ethernet network interface driver.
The W3 and W4 jumper should be set for IO address and IRQ. The defined I/O address and IRQ in config.h must match the one stored in EEROM and the jumper setting.
The diagram below shows the relevant jumpers for VxWorks configuration.
___________________________________ | * * * * | | ______ | | | | | | | U1 | W1 W3 | | |PROM| X " | | | | . - | | | | - | | | | - | | |____| | | | | W4 | | " | | " | | - | | - | |_________________________________| W1: Boot PROM Size W3: IO-address, IRQ, Media W4: IRQ Group Selection
The only user-callable routines are esmcattach( ):
- esmcattach( )
- publishes the esmc interface and initializes the driver and device.
The last parameter of esmcattach( ), mode, is a receive mode. If it is 0, a packet is received in the interrupt level. If it is 1, a packet is received in the task level. Receiving packets in the interrupt level requires about 10K bytes of memory, but minimize a risk of dropping packets. Receiving packets in the task level doesn't require extra memory, but might have a risk of dropping packets.
esmcattach( ) - publish the esmc network interface and initialize the driver.
STATUS esmcattach ( int unit, /* unit number */ int ioAddr, /* address of esmc's shared memory */ int intVec, /* interrupt vector to connect to */ int intLevel, /* interrupt level */ int config, /* 0: Autodetect 1: AUI 2: BNC 3: RJ45 */ int mode /* 0: rx in interrupt 1: rx in task(netTask) */ )
This routine attaches an esmc Ethernet interface to the network if the device exists. It makes the interface available by filling in the network interface record. The system will initialize the interface when it is ready to accept packets.
OK or ERROR.
esmcPut( ) - copy a packet to the interface.
#ifdef BSD43_DRIVER LOCAL void esmcPut ( int unit )
Copy from mbuf chain to transmitter buffer in shared memory.
N/A
esmcShow( ) - display statistics for the esmc network interface
void esmcShow ( int unit, /* interface unit */ BOOL zap /* zero totals */ )
This routine displays statistics about the esmc Ethernet network interface. It has two parameters:
- unit
- interface unit; should be 0.
- zap
- if 1, all collected statistics are cleared to zero.
N/A