nds/arm9/input.h File Reference

NDS input support. More...

#include <nds/jtypes.h>

Enumerations

enum  KEYPAD_BITS {
  KEY_A = BIT(0), KEY_B = BIT(1), KEY_SELECT = BIT(2), KEY_START = BIT(3),
  KEY_RIGHT = BIT(4), KEY_LEFT = BIT(5), KEY_UP = BIT(6), KEY_DOWN = BIT(7),
  KEY_R = BIT(8), KEY_L = BIT(9), KEY_X = BIT(10), KEY_Y = BIT(11),
  KEY_TOUCH = BIT(12), KEY_LID = BIT(13)
}
 Bit values for the keypad buttons. More...

Functions

void scanKeys ()
 Obtains the current keypad state.
uint32 keysHeld (void)
 Obtains the current keypad held state.
uint32 keysDown (void)
 Obtains the current keypad pressed state.
uint32 keysDownRepeat (void)
 Obtains the current keypad pressed or repeating state.
void keysSetRepeat (u8 setDelay, u8 setRepeat)
 Sets the key repeat parameters.
uint32 keysUp (void)
 Obtains the current keypad released state.
touchPosition touchReadXY ()
 Obtains the current touchscreen co-ordinates.


Detailed Description

NDS input support.


Enumeration Type Documentation

enum KEYPAD_BITS

Bit values for the keypad buttons.

Enumerator:
KEY_A  Keypad A button.
KEY_B  Keypad B button.
KEY_SELECT  Keypad SELECT button.
KEY_START  Keypad START button.
KEY_RIGHT  Keypad RIGHT button.
KEY_LEFT  Keypad LEFT button.
KEY_UP  Keypad UP button.
KEY_DOWN  Keypad DOWN button.
KEY_R  Right shoulder button.
KEY_L  Left shoulder button.
KEY_X  Keypad X button.
KEY_Y  Keypad Y button.
KEY_TOUCH  Touchscreen pendown.
KEY_LID  Lid state.
00104                          {
00105   KEY_A      = BIT(0),  
00106   KEY_B      = BIT(1),  
00107   KEY_SELECT = BIT(2),  
00108   KEY_START  = BIT(3),  
00109   KEY_RIGHT  = BIT(4),  
00110   KEY_LEFT   = BIT(5),  
00111   KEY_UP     = BIT(6),  
00112   KEY_DOWN   = BIT(7),  
00113   KEY_R      = BIT(8),  
00114   KEY_L      = BIT(9),  
00115   KEY_X      = BIT(10), 
00116   KEY_Y      = BIT(11), 
00117   KEY_TOUCH  = BIT(12), 
00118   KEY_LID    = BIT(13)  
00119 } KEYPAD_BITS;


Function Documentation

uint32 keysDown ( void   ) 

Obtains the current keypad pressed state.

uint32 keysDownRepeat ( void   ) 

Obtains the current keypad pressed or repeating state.

uint32 keysHeld ( void   ) 

Obtains the current keypad held state.

void keysSetRepeat ( u8  setDelay,
u8  setRepeat 
)

Sets the key repeat parameters.

Parameters:
setDelay Number of scanKeys calls before keys start to repeat.
setRepeat Number of scanKeys calls before keys repeat.

uint32 keysUp ( void   ) 

Obtains the current keypad released state.

void scanKeys (  ) 

Obtains the current keypad state.

Call this function once per main loop in order to use the keypad functions.

touchPosition touchReadXY (  ) 

Obtains the current touchscreen co-ordinates.


Generated on Tue Jan 22 15:48:55 2008 for libnds(ARM9) by  doxygen 1.5.4