VxWorks Reference Manual : Libraries

ultraEnd

NAME

ultraEnd - SMC Ultra Elite END network interface driver

ROUTINES

ultraLoad( ) - initialize the driver and device
ultraParse( ) - parse the init string
ultraMemInit( ) - initialize memory for the chip
ultraAddrFilterSet( ) - set the address filter for multicast addresses

DESCRIPTION

This module implements the SMC Elite Ultra Ethernt network interface driver.

This driver supports single transmission and multiple reception. The Current register is a write pointer to the ring. The Bound register is a read pointer from the ring. This driver gets the Current register at the interrupt level and sets the Bound register at the task level. The interrupt is only masked during configuration or in polled mode.

CONFIGURATION

The W1 jumper should be set in the position of "Software Configuration". The defined I/O address in config.h must match the one stored in EEROM. The RAM address, the RAM size, and the IRQ level are defined in config.h. IRQ levels 2,3,5,7,10,11,15 are supported.

EXTERNAL SUPPORT REQUIREMENTS

This driver requires several external support functions, defined as macros:

    SYS_INT_CONNECT(pDrvCtrl, routine, arg)
    SYS_INT_DISCONNECT (pDrvCtrl, routine, arg)
    SYS_INT_ENABLE(pDrvCtrl)
    SYS_INT_DISABLE(pDrvCtrl)
    SYS_IN_BYTE(pDrvCtrl, reg, pData)
    SYS_OUT_BYTE(pDrvCtrl, reg, pData)
These macros allow the driver to be customized for BSPs that use special versions of these routines.

The macro SYS_INT_CONNECT is used to connect the interrupt handler to the appropriate vector. By default it is the routine intConnect( ).

The macro SYS_INT_DISCONNECT is used to disconnect the interrupt handler prior to unloading the module. By default this is a dummy routine that returns OK.

The macro SYS_INT_ENABLE is used to enable the interrupt level for the end device. It is called once during initialization. It calls an external board level routine sysUltraIntEnable( ).

The macro SYS_INT_DISABLE is used to disable the interrupt level for the end device. It is called once during shutdown. It calls an external board level routine sysUltraIntDisable( ).

The macros SYS_IN_BYTE and SYS_OUT_BYTE are used for accessing the ultra device. The default macros map these operations onto sysInByte( ) and sysOutByte( ).

INCLUDES

end.h endLib.h etherMultiLib.h

SEE ALSO

ultraEnd, muxLib, endLib Writing an Enhanced Network Driver


Libraries : Routines

ultraLoad( )

NAME

ultraLoad( ) - initialize the driver and device

SYNOPSIS

END_OBJ* ultraLoad
    (
    char * initString /* String to be parsed by the driver. */
    )

DESCRIPTION

This routine initializes the driver and the device to the operational state. All of the device-specific parameters are passed in initString, which expects a string of the following format:

unit:ioAddr:memAddr:vecNum:intLvl:config:offset"

This routine can be called in two modes. If it is called with an empty but allocated string, it places the name of this device (that is, "ultra") into the initString and returns 0.

If the string is allocated and not empty, the routine attempts to load the driver using the values specified in the string.

RETURNS

An END object pointer, or NULL on error, or 0 and the name of the device if the initString was NULL.

SEE ALSO

ultraEnd


Libraries : Routines

ultraParse( )

NAME

ultraParse( ) - parse the init string

SYNOPSIS

STATUS ultraParse
    (
    ULTRA_DEVICE * pDrvCtrl,  /* device pointer */
    char *         initString /* information string */
    )

DESCRIPTION

Parse the input string. Fill in values in the driver control structure. The initialization string format is: unit:ioAddr:memAddr:vecNum:intLvl:config:offset"

unit
Device unit number, a small integer.

ioAddr
I/O address

memAddr
Memory address, assumed to be 16k bytes in length.

vecNum
Interrupt vector number (used with sysIntConnect( )).

intLvl
Interrupt level.

config
Ultra config (0: RJ45 + AUI(Thick) 1: RJ45 + BNC(Thin)).

offset
Memory offset for alignment.

RETURNS

 OK, or ERROR if any arguments are invalid.

SEE ALSO

ultraEnd


Libraries : Routines

ultraMemInit( )

NAME

ultraMemInit( ) - initialize memory for the chip

SYNOPSIS

STATUS ultraMemInit
    (
    ULTRA_DEVICE * pDrvCtrl, /* device to be initialized */
    int            clNum     /* number of clusters to allocate */
    )

DESCRIPTION

Using data in the control structure, setup and initialize the memory areas needed. If the memory address is not already specified, then allocate cache safe memory.

RETURNS

OK or ERROR.

SEE ALSO

ultraEnd


Libraries : Routines

ultraAddrFilterSet( )

NAME

ultraAddrFilterSet( ) - set the address filter for multicast addresses

SYNOPSIS

void ultraAddrFilterSet
    (
    ULTRA_DEVICE * pDrvCtrl /* device pointer */
    )

DESCRIPTION

This routine goes through all of the multicast addresses on the list of addresses (added with the ultraMCastAdd( ) routine) and sets the device's filter correctly.

RETURNS

N/A.

SEE ALSO

ultraEnd