libctr9
Nintendo 3DS ARM9 library
ctr_hid.h File Reference
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

#define CTR_HID_REG   ((volatile ctr_hid_button_type*)0x10146000)
 
#define CTR_HID_NON   0x000u
 
#define CTR_HID_A   0x001u
 
#define CTR_HID_B   0x002u
 
#define CTR_HID_SELECT   0x004u
 
#define CTR_HID_START   0x008u
 
#define CTR_HID_RIGHT   0x010u
 
#define CTR_HID_LEFT   0x020u
 
#define CTR_HID_UP   0x040u
 
#define CTR_HID_DOWN   0x080u
 
#define CTR_HID_RT   0x100u
 
#define CTR_HID_LT   0x200u
 
#define CTR_HID_X   0x400u
 
#define CTR_HID_Y   0x800u
 

Typedefs

typedef uint32_t ctr_hid_button_type
 

Functions

bool ctr_hid_button_status (ctr_hid_button_type buttons)
 Returns whether the given button combination is pressed or not. More...
 
ctr_hid_button_type ctr_hid_get_buttons (void)
 Returns all of the buttons pressed at the instant this is called. More...
 

Function Documentation

bool ctr_hid_button_status ( ctr_hid_button_type  buttons)

Returns whether the given button combination is pressed or not.

Parameters
[in]buttonsButton combination to check if they are pressed.
Returns
True if the buttons passed in are pressed, false otherwise.
ctr_hid_button_type ctr_hid_get_buttons ( void  )

Returns all of the buttons pressed at the instant this is called.

returns All of the buttons pressed at the time this function is called.