172 #define scanKeys hidScanInput
174 #define keysHeld hidKeysHeld
176 #define keysDown hidKeysDown
178 #define keysUp hidKeysUp
180 #define touchRead hidTouchRead
182 #define circleRead hidCircleRead
Result HIDUSER_GetGyroscopeRawToDpsCoefficient(float *coeff)
Gets the gyroscope raw to dps coefficient.
Result HIDUSER_DisableAccelerometer(void)
Disables the accelerometer.
Handle hidMemHandle
HID shared memory handle.
Result HIDUSER_EnableAccelerometer(void)
Enables the accelerometer.
Result hidInit(void)
Initializes HID.
void hidGyroRead(angularRate *rate)
Reads the current gyroscope data.
@ KEY_TOUCH
Touch (Not actually provided by HID)
Definition: hid.h:26
@ KEY_UP
D-Pad Up or Circle Pad Up.
Definition: hid.h:37
@ KEY_DDOWN
D-Pad Down.
Definition: hid.h:19
@ KEY_B
B.
Definition: hid.h:13
@ KEY_CSTICK_UP
C-Stick Up (New 3DS only)
Definition: hid.h:29
@ KEY_CPAD_RIGHT
Circle Pad Right.
Definition: hid.h:31
@ KEY_SELECT
Select.
Definition: hid.h:14
@ KEY_DRIGHT
D-Pad Right.
Definition: hid.h:16
@ KEY_X
X.
Definition: hid.h:22
@ KEY_ZR
ZR (New 3DS only)
Definition: hid.h:25
@ KEY_CSTICK_RIGHT
C-Stick Right (New 3DS only)
Definition: hid.h:27
@ KEY_Y
Y.
Definition: hid.h:23
@ KEY_LEFT
D-Pad Left or Circle Pad Left.
Definition: hid.h:39
@ KEY_START
Start.
Definition: hid.h:15
@ KEY_RIGHT
D-Pad Right or Circle Pad Right.
Definition: hid.h:40
@ KEY_DUP
D-Pad Up.
Definition: hid.h:18
@ KEY_ZL
ZL (New 3DS only)
Definition: hid.h:24
@ KEY_R
R.
Definition: hid.h:20
@ KEY_A
A.
Definition: hid.h:12
@ KEY_DOWN
D-Pad Down or Circle Pad Down.
Definition: hid.h:38
@ KEY_CPAD_UP
Circle Pad Up.
Definition: hid.h:33
@ KEY_CSTICK_LEFT
C-Stick Left (New 3DS only)
Definition: hid.h:28
@ KEY_L
L.
Definition: hid.h:21
@ KEY_CPAD_DOWN
Circle Pad Down.
Definition: hid.h:34
@ KEY_DLEFT
D-Pad Left.
Definition: hid.h:17
@ KEY_CSTICK_DOWN
C-Stick Down (New 3DS only)
Definition: hid.h:30
@ KEY_CPAD_LEFT
Circle Pad Left.
Definition: hid.h:32
void hidCircleRead(circlePosition *pos)
Reads the current circle pad position.
Result HIDUSER_DisableGyroscope(void)
Disables the gyroscope.
Result HIDUSER_GetSoundVolume(u8 *volume)
Gets the current volume slider value.
u32 hidKeysHeld(void)
Returns a bitmask of held buttons.
Result HIDUSER_GetHandles(Handle *outMemHandle, Handle *eventpad0, Handle *eventpad1, Handle *eventaccel, Handle *eventgyro, Handle *eventdebugpad)
Gets the handles for HID operation.
Result hidWaitForAnyEvent(bool nextEvents, Handle cancelEvent, s64 timeout)
Waits for any HID or IRRST event.
u32 hidKeysDownRepeat(void)
Returns a bitmask of newly pressed or repeated buttons, this frame.
u32 hidKeysDown(void)
Returns a bitmask of newly pressed buttons, this frame.
HID_Event
HID events.
Definition: hid.h:75
@ HIDEVENT_Gyro
Event signaled by HID-module, when the sharedmem gyroscope state was updated.
Definition: hid.h:79
@ HIDEVENT_DebugPad
Event signaled by HID-module, when the sharedmem DebugPad state was updated.
Definition: hid.h:80
@ HIDEVENT_Accel
Event signaled by HID-module, when the sharedmem accelerometer state was updated.
Definition: hid.h:78
@ HIDEVENT_MAX
Used to know how many events there are.
Definition: hid.h:82
@ HIDEVENT_PAD1
Event signaled by HID-module, when the sharedmem+0(PAD/circle-pad)/+0xA8(touch-screen) region was upd...
Definition: hid.h:77
@ HIDEVENT_PAD0
Event signaled by HID-module, when the sharedmem+0(PAD/circle-pad)/+0xA8(touch-screen) region was upd...
Definition: hid.h:76
void hidScanInput(void)
Scans HID for input data.
void hidTouchRead(touchPosition *pos)
Reads the current touch position.
vu32 * hidSharedMem
HID shared memory.
u32 hidKeysUp(void)
Returns a bitmask of newly released buttons, this frame.
void hidExit(void)
Exits HID.
void hidAccelRead(accelVector *vector)
Reads the current accelerometer data.
Result HIDUSER_EnableGyroscope(void)
Enables the gyroscope.
void hidWaitForEvent(HID_Event id, bool nextEvent)
Waits for an HID event.
void hidSetRepeatParameters(u32 delay, u32 interval)
Sets the key repeat parameters for hidKeysRepeat.
Accelerometer vector.
Definition: hid.h:59
s16 x
Accelerometer X.
Definition: hid.h:60
s16 y
Accelerometer Y.
Definition: hid.h:61
s16 z
Accelerometer Z.
Definition: hid.h:62
Gyroscope angular rate.
Definition: hid.h:67
s16 y
Pitch.
Definition: hid.h:70
s16 z
Yaw.
Definition: hid.h:69
s16 x
Roll.
Definition: hid.h:68
Circle Pad position.
Definition: hid.h:52
s16 dx
Pad X.
Definition: hid.h:53
s16 dy
Pad Y.
Definition: hid.h:54
Touch position.
Definition: hid.h:45
u16 px
Touch X.
Definition: hid.h:46
u16 py
Touch Y.
Definition: hid.h:47
int64_t s64
64-bit signed integer
Definition: types.h:29
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:47
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
int16_t s16
16-bit signed integer
Definition: types.h:27
u32 Handle
Resource handle.
Definition: types.h:41
volatile u32 vu32
32-bit volatile unsigned integer.
Definition: types.h:33
s32 Result
Function result.
Definition: types.h:42
uint16_t u16
16-bit unsigned integer
Definition: types.h:22
uint32_t u32
32-bit unsigned integer
Definition: types.h:23