Site Index
   Support Home
   OMAP Home
   OSK5912
   Related Products
   OMAP Tech Docs
   Linux Docs
   Development Flow
   Emulators
   Ordering Info.
Google

OMAP Site
Support Site
Main Site

OSK5912 ENET (Ethernet) Module

The ENET module controls the on-board Ethernet controller. The ENET module can get and set the registers on the external SMC91C96.

Function Description
OSK5912_ENET_rget Get the value of an ENET register.
OSK5912_ENET_rset Set the value of an ENET register.
OSK5912_ENET_readEEPROM Read from the ENET EEPROM.
OSK5912_ENET_writeEEPROM Write to the ENET EEPROM.

OSK5912_ENET_rget()

Description
Get the value of an ENET register

Required Headers
osk5912.h
osk5912_enet.h

Required Libraries
osk5912bsl.lib

Function Prototype
Uint16 OSK5912_ENET_rget( Uint16 regnum )

Parameters
regnum - Register index (Defined in osk5912_enet.h as SMC91C96_XXX where XXX is the name of the register )

Return Value
16-bit register value

Example

    Uint16 regval;
    /* Get the value of register SMC91C96 MMU_COMMAND */
    regval = OSK5912_ENET_rget( SMC91C96_MMU_COMMAND );

OSK5912_ENET_rset()

Description
Set the value of an ENET register

Required Headers
osk5912.h
osk5912_enet.h

Required Libraries
osk5912bsl.lib

Function Prototype
void OSK5912_ENET_rset( Uint16 regnum, Uint16 value )

Parameters
regnum - Register index ( Defined in osk5912_enet.h as SMC91C96_XXX where XXX is the name of the register )
value - 16-bit register value

Return Value
None

Example

    Uint16 regval = 0x40;
    /* Set the value of register SMC91C96 MMU_COMMAND to 0x40 */
    OSK5912_ENET_rget( SMC91C96_MMU_COMMAND, regval );

OSK5912_ENET_readEEPROM()

Description
Read from the on-board ENET EEPROM

Required Headers
osk5912.h
osk5912_enet.h

Required Libraries
osk5912bsl.lib

Function Prototype
Uint16 OSK5912_ENET_readEEPROM( Uint16 addr )

Parameters
addr - Address to read from the Ethernet EEPROM

Return Value
16-bit value

Example

    Uint16 data;
    /* Read the ENET EEPROM contents at address 0 */
    data = OSK5912_ENET_readEEPROM( 0 );

OSK5912_ENET_writeEEPROM()

Description
Read from the on-board ENET EEPROM

Required Headers
osk5912.h
osk5912_enet.h

Required Libraries
osk5912bsl.lib

Function Prototype
void OSK5912_ENET_writeEEPROM( Uint16 addr, Uint16 value )

Parameters
addr - Address to write to on the Ethernet EEPROM
value - 16-bit value to write

Return Value
None

Example

    Uint16 data;

    /* Read the ENET EEPROM contents at address 0 */
    data = OSK5912_ENET_readEEPROM( 0 );

    /* Write to the ENET EEPROM address 0,
     * with the original contents */
    OSK5912_ENET_writeEEPROM( 0, data );
©Copyright 2002-2012 Spectrum Digital, Inc. All Rights Reserved.