Texas Instruments TMS320C6000 Manuale Utente

Pagina di 62
DIP_SUPPORT
5-3
 DIP API Module
5.2
DIP API Reference  
Returns current value of specified DIP switch
DIP_get
Function
Uint32 DIP_get(
  Uint32 dipNum
);
Arguments
dipNum
Specifies which DIP switch to be read, can be one of
the following:
-
DIP_1
-
DIP_2
-
DIP_3
-
Return Value
Uint32
Current value of the specified DIP switch.
-
0 = DIP switch position is off.
-
1 = DIP switch position is on.
Description
Returns the current value of the specified DIP switch.
C6711 DSK
-
DIP_1 = USER_SW1
-
DIP_2 = USER_SW2
-
DIP_3 = USER_SW3
Example
Uint32 val; 
val = DIP_get(DIP_1);
Compile time constant
DIP_SUPPORT
Constant
DIP_SUPPORT
Description
Compile time constant that has a value of 1 if the board supports the DIP
module and 0 otherwise. You are not required to use this constant.
Currently, all devices support this module.
Example
#if (DIP_SUPPORT)
  /* do DIP operations */
#endif