VxWorks Reference Manual : Libraries

ns83902End

NAME

ns83902End - National Semiconductor DP83902A ST-NIC

ROUTINES

ns83902EndLoad( ) - initialize the driver and device
ns83902InitParse( ) - parse the initialization string
ns83902RegShow( ) - prints the current value of the NIC registers

DESCRIPTION

This module implements the National Semiconductor dp83902A ST-NIC Ethernet network interface driver.

This driver is moderately generic. The driver must be given several target-specific parameters. These parameters, and the mechanisms used to communicate them to the driver, are detailed below.

The driver supports big-endian or little-endian architectures.

EXTERNAL INTERFACE

The only external interface is the ns83902EndLoad( ) routine, which expects the initString parameter as input. This parameter passes in a colon-delimited string of the format:

 "baseAdrs:intVec:intLvl:dmaPort:bufSize:options"

The ns83902EndLoad( ) function uses strtok( ) to parse the string.

TARGET-SPECIFIC PARAMETERS

unit

A convenient holdover from the former model. This parameter is used only in the string name for the driver.

baseAdrs

Base address at which the NIC hardware device registers are located.

vecNum

This is the interrupt vector number of the hardware interrupt generated by this Ethernet device.

intLvl

This parameter defines the level of the hardware interrupt.

dmaPort

Address of the DMA port used to transfer data to the host CPU.

bufSize

Size of the NIC buffer memory in bytes.

options

Target specific options:
    bit0 - wide (0: byte, 1: word)
    bit1 - register interval (0: 1byte, 1: 2 bytes)

EXTERNAL SUPPORT REQUIREMENTS

This driver requires four external support functions, and provides a hook function:

void sysLanIntEnable (int level)

This routine provides a target-specific interface for enabling Ethernet device interrupts at a specified interrupt level.

void sysLanIntDisable (void)

This routine provides a target-specific interface for disabling Ethernet device interrupts.

STATUS sysEnetAddrGet (int unit, char *enetAdrs)

This routine provides a target-specific interface for accessing a device Ethernet address.

sysNs83902DelayCount

This variable is used to introduce at least a 4 bus cycle (BSCK) delay between successive NIC chip selects.

SYSTEM RESOURCE USAGE

This driver requires the following system resources:

    - one mutual exclusion semaphore
    - one interrupt vector

SEE ALSO

ns83902End, muxLib, DP83902A ST-NIC Serial Interface Controller for Twisted Pair


Libraries : Routines

ns83902EndLoad( )

NAME

ns83902EndLoad( ) - initialize the driver and device

SYNOPSIS

END_OBJ* ns83902EndLoad
    (
    char* initString /* string to be parsed */
    )

DESCRIPTION

This routine initializes the driver and the device to the operational state. All of the device-specific parameters are passed in initString. 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, "ln") 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

ns83902End


Libraries : Routines

ns83902InitParse( )

NAME

ns83902InitParse( ) - parse the initialization string

SYNOPSIS

STATUS ns83902InitParse
    (
    NS83902_END_DEVICE * pDrvCtrl,
    char *               initString
    )

DESCRIPTION

Parse the input string and fill in values in the driver control structure.

RETURNS

OK, or ERROR if any arguments are invalid.

SEE ALSO

ns83902End


Libraries : Routines

ns83902RegShow( )

NAME

ns83902RegShow( ) - prints the current value of the NIC registers

SYNOPSIS

void ns83902RegShow
    (
    NS83902_END_DEVICE* pDrvCtrl
    )

DESCRIPTION

This routine reads and displays the register values of the NIC registers

RETURNS

N/A.

SEE ALSO

ns83902End