Site Index
   Support Home
   C6000 Home
   DaVinci EVM
   EVMDM6437
   EVM6424
   EVMDM642
   XEVM642
   DSKTCI6482
   EVMTCI6482
   DSK6455
   EVM6455
   EVM6418
   DSK6713
   DSK6416
   Ordering Info.
Google

C6000 Site
Support Site
Main Site

EVM6418 Dip Switch Module

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

Function Description
EVM6418_DIP_init Initialize the DIP switches
EVM6418_DIP_get Read the value of a DIP switch

EVM6418_DIP_init()

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

Required Headers
evm6418.h
evm6418_dip.h

Required Libraries
evm6418bsl.lib

Function Prototype
void EVM6418_DIP_init( )

Parameters
None

Return Value
None

Example

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

EVM6418_DIP_get()

Description
Read the value of a DIP switch

Required Headers
evm6418.h
evm6418_dip.h

Required Libraries
evm6418bsl.lib

Function Prototype
Uint32 EVM6418_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 (EVM6418_DIP_get(2) == 0)
    {
        /* DIP switch 2 is on */
    } else
    {
        /* DIP switch 2 is off */
    }
©Copyright 2002-2012 Spectrum Digital, Inc. All Rights Reserved.