VxWorks Reference Manual : Libraries

if_esmc

NAME

if_esmc - Ampro Ethernet2 SMC-91c9x Ethernet network interface driver

ROUTINES

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

DESCRIPTION

This module implements the Ampro Ethernet2 SMC-91c9x Ethernet network interface driver.

CONFIGURATION

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.

BOARD LAYOUT

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

EXTERNAL INTERFACE

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.

SEE ALSO

if_esmc


Libraries : Routines

esmcattach( )

NAME

esmcattach( ) - publish the esmc network interface and initialize the driver.

SYNOPSIS

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) */
    )

DESCRIPTION

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.

RETURNS

OK or ERROR.

SEE ALSO

if_esmc, ifLib, netShow


Libraries : Routines

esmcPut( )

NAME

esmcPut( ) - copy a packet to the interface.

SYNOPSIS

#ifdef BSD43_DRIVER LOCAL void esmcPut
    (
    int unit
    )

DESCRIPTION

Copy from mbuf chain to transmitter buffer in shared memory.

RETURNS

N/A

SEE ALSO

if_esmc


Libraries : Routines

esmcShow( )

NAME

esmcShow( ) - display statistics for the esmc network interface

SYNOPSIS

void esmcShow
    (
    int  unit, /* interface unit */
    BOOL zap   /* zero totals */
    )

DESCRIPTION

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.

RETURNS

N/A

SEE ALSO

if_esmc