Site Index
   Support Home
   C5000 Home
   EVM5502
   EVM5509
   EVM5509A_PLUS
   DSK5509A
   DSK5510
   DSK5416
   PEP5416
   Ordering Info.
Google

C5000 Site
Support Site
Main Site

EVM5509 Dip Switch Module

The following list summarizes the DIP Switch API in terms of its function calls:

Function Description
EVM5509_DIP_init Initialize the DIP switches
EVM5509_DIP_get Read the value of a DIP switch

EVM5509_DIP_init()

Description
Initialize the DIP switch module, must be called before any DIP switch functions.

Required Headers
evm5509.h
evm5509_dip.h

Required Libraries
evm5509bsl.lib

Function Prototype
void EVM5509_DIP_init( )

Parameters
None

Return Value
None

Example

    /* Initialize the DIP switch module */
    EVM5509_DIP_init();

EVM5509_DIP_get()

Description
Read the value of a DIP switch

Required Headers
evm5509.h
evm5509_dip.h

Required Libraries
evm5509bsl.lib

Function Prototype
Uint32 EVM5509_DIP_get(Uint32 dipNum)

Parameters
dipNum – Index of the switch to read. dipNum ranges from 0 to 3.

Return Value
0 – Specified switch is on (switch is depressed).
1 – Specified switch is off (switch is in up position).

Example

    /* Check the value of DIP switch 2 */
    if (EVM6413_DIP_get(2) == 0)
    {
        /* DIP switch 2 is on */
    }
    else
    {
        /* DIP switch 2 is off */
    }
©Copyright 2002-2012 Spectrum Digital, Inc. All Rights Reserved.