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 LED Module

The LED module API provides functions to control the on-board OSK5912 LEDs. The LEDs can be turned on and off, or have the state toggle between on and off.

Function Description
OSK5912_LED_init Initialize the LEDs ( default state is LED D2 & D3 off )
OSK5912_LED_off Turn specified LED off
OSK5912_LED_on Turn specified LED on
OSK5912_LED_toggle Toggle specified LED

OSK5912_LED_init()

Description
Initialize the LED module; this must be called before any other LED functions. LED state after initialization is D2 & D3 OFF.

Required Headers
osk5912.h
osk5912_led.h

Required Libraries
osk5912bsl.lib

Function Prototype
void OSK5912_LED_init( )

Parameters
None

Return Value
None

Example

    /* Initialize the LED module with LED D8 turned off */
    OSK5912_LED_init( );

OSK5912_LED_off()

Description
Turn LED off

Required Headers
osk5912.h
osk5912_led.h

Required Libraries
osk5912bsl.lib

Function Prototype
void OSK5912_LED_off( Uint16 lednum )

Parameters
lednum - Indicates which led to turn off ( possible values [0,1] )

Return Value
None

Example

    /* Turn off LED 0 */
    OSK5912_LED_off( 0 );

    /* Turn off LED 0
     * this second call will not affect LED 0,
     * since it is already off */
    OSK5912_LED_off( 0 );

OSK5912_LED_on()

Description
Turn LED on

Required Headers
osk5912.h
osk5912_led.h

Required Libraries
osk5912bsl.lib

Function Prototype
void OSK5912_LED_on( Uint16 lednum )

Parameters
lednum - Indicates which led to turn on ( possible values [0,1] )

Return Value
None

Example

    /* Turn on LED 0 */
    OSK5912_LED_on( 0 );

    /* Turn on LED 0
     * this second call will not affect LED 0, 
     * since it is already on */
    OSK5912_LED_on( 0 );

OSK5912_LED_toggle()

Description
Toggle LED between on & off

Required Headers
osk5912.h
osk5912_led.h

Required Libraries
osk5912bsl.lib

Function Prototype
void OSK5912_LED_toggle( Uint16 lednum )

Parameters
lednum - Indicates which led to toggle ( possible values [0,1] )

Return Value
None

Example

    /* Toggle LED 0 */
    OSK5912_LED_toggle( 0 );

    /* Toggle LED 0 */
    OSK5912_LED_toggle( 0 );

    /* At this point LED 0 will have 
     * toggled to its original state */
©Copyright 2002-2012 Spectrum Digital, Inc. All Rights Reserved.