libnx  v4.7.0
hid.h
Go to the documentation of this file.
1 /**
2  * @file hid.h
3  * @brief Human input device (hid) service IPC wrapper.
4  * @author shinyquagsire23
5  * @author yellows8
6  * @copyright libnx Authors
7  */
8 #pragma once
9 #include "../types.h"
10 #include "../kernel/event.h"
11 #include "../services/btdrv_types.h"
12 #include "../sf/service.h"
13 
14 // Begin enums and output structs
15 
16 /// HidDebugPadButton
17 typedef enum {
18  HidDebugPadButton_A = BIT(0), ///< A button
19  HidDebugPadButton_B = BIT(1), ///< B button
20  HidDebugPadButton_X = BIT(2), ///< X button
21  HidDebugPadButton_Y = BIT(3), ///< Y button
22  HidDebugPadButton_L = BIT(4), ///< L button
23  HidDebugPadButton_R = BIT(5), ///< R button
24  HidDebugPadButton_ZL = BIT(6), ///< ZL button
25  HidDebugPadButton_ZR = BIT(7), ///< ZR button
26  HidDebugPadButton_Start = BIT(8), ///< Start button
27  HidDebugPadButton_Select = BIT(9), ///< Select button
28  HidDebugPadButton_Left = BIT(10), ///< D-Pad Left button
29  HidDebugPadButton_Up = BIT(11), ///< D-Pad Up button
30  HidDebugPadButton_Right = BIT(12), ///< D-Pad Right button
31  HidDebugPadButton_Down = BIT(13), ///< D-Pad Down button
33 
34 /// HidTouchScreenModeForNx
35 typedef enum {
36  HidTouchScreenModeForNx_UseSystemSetting = 0, ///< UseSystemSetting
40 
41 /// HidMouseButton
42 typedef enum {
43  HidMouseButton_Left = BIT(0),
44  HidMouseButton_Right = BIT(1),
45  HidMouseButton_Middle = BIT(2),
46  HidMouseButton_Forward = BIT(3),
47  HidMouseButton_Back = BIT(4),
49 
50 /// HidKeyboardKey
51 typedef enum {
52  HidKeyboardKey_A = 4,
53  HidKeyboardKey_B = 5,
54  HidKeyboardKey_C = 6,
55  HidKeyboardKey_D = 7,
56  HidKeyboardKey_E = 8,
57  HidKeyboardKey_F = 9,
58  HidKeyboardKey_G = 10,
59  HidKeyboardKey_H = 11,
60  HidKeyboardKey_I = 12,
61  HidKeyboardKey_J = 13,
62  HidKeyboardKey_K = 14,
63  HidKeyboardKey_L = 15,
64  HidKeyboardKey_M = 16,
65  HidKeyboardKey_N = 17,
66  HidKeyboardKey_O = 18,
67  HidKeyboardKey_P = 19,
68  HidKeyboardKey_Q = 20,
69  HidKeyboardKey_R = 21,
70  HidKeyboardKey_S = 22,
71  HidKeyboardKey_T = 23,
72  HidKeyboardKey_U = 24,
73  HidKeyboardKey_V = 25,
74  HidKeyboardKey_W = 26,
75  HidKeyboardKey_X = 27,
76  HidKeyboardKey_Y = 28,
77  HidKeyboardKey_Z = 29,
78  HidKeyboardKey_D1 = 30,
79  HidKeyboardKey_D2 = 31,
80  HidKeyboardKey_D3 = 32,
81  HidKeyboardKey_D4 = 33,
82  HidKeyboardKey_D5 = 34,
83  HidKeyboardKey_D6 = 35,
84  HidKeyboardKey_D7 = 36,
85  HidKeyboardKey_D8 = 37,
86  HidKeyboardKey_D9 = 38,
87  HidKeyboardKey_D0 = 39,
88  HidKeyboardKey_Return = 40,
89  HidKeyboardKey_Escape = 41,
90  HidKeyboardKey_Backspace = 42,
91  HidKeyboardKey_Tab = 43,
92  HidKeyboardKey_Space = 44,
93  HidKeyboardKey_Minus = 45,
94  HidKeyboardKey_Plus = 46,
95  HidKeyboardKey_OpenBracket = 47,
96  HidKeyboardKey_CloseBracket = 48,
97  HidKeyboardKey_Pipe = 49,
98  HidKeyboardKey_Tilde = 50,
99  HidKeyboardKey_Semicolon = 51,
100  HidKeyboardKey_Quote = 52,
101  HidKeyboardKey_Backquote = 53,
102  HidKeyboardKey_Comma = 54,
103  HidKeyboardKey_Period = 55,
104  HidKeyboardKey_Slash = 56,
105  HidKeyboardKey_CapsLock = 57,
106  HidKeyboardKey_F1 = 58,
107  HidKeyboardKey_F2 = 59,
108  HidKeyboardKey_F3 = 60,
109  HidKeyboardKey_F4 = 61,
110  HidKeyboardKey_F5 = 62,
111  HidKeyboardKey_F6 = 63,
112  HidKeyboardKey_F7 = 64,
113  HidKeyboardKey_F8 = 65,
114  HidKeyboardKey_F9 = 66,
115  HidKeyboardKey_F10 = 67,
116  HidKeyboardKey_F11 = 68,
117  HidKeyboardKey_F12 = 69,
118  HidKeyboardKey_PrintScreen = 70,
119  HidKeyboardKey_ScrollLock = 71,
120  HidKeyboardKey_Pause = 72,
121  HidKeyboardKey_Insert = 73,
122  HidKeyboardKey_Home = 74,
123  HidKeyboardKey_PageUp = 75,
124  HidKeyboardKey_Delete = 76,
125  HidKeyboardKey_End = 77,
126  HidKeyboardKey_PageDown = 78,
127  HidKeyboardKey_RightArrow = 79,
128  HidKeyboardKey_LeftArrow = 80,
129  HidKeyboardKey_DownArrow = 81,
130  HidKeyboardKey_UpArrow = 82,
131  HidKeyboardKey_NumLock = 83,
132  HidKeyboardKey_NumPadDivide = 84,
133  HidKeyboardKey_NumPadMultiply = 85,
134  HidKeyboardKey_NumPadSubtract = 86,
135  HidKeyboardKey_NumPadAdd = 87,
136  HidKeyboardKey_NumPadEnter = 88,
137  HidKeyboardKey_NumPad1 = 89,
138  HidKeyboardKey_NumPad2 = 90,
139  HidKeyboardKey_NumPad3 = 91,
140  HidKeyboardKey_NumPad4 = 92,
141  HidKeyboardKey_NumPad5 = 93,
142  HidKeyboardKey_NumPad6 = 94,
143  HidKeyboardKey_NumPad7 = 95,
144  HidKeyboardKey_NumPad8 = 96,
145  HidKeyboardKey_NumPad9 = 97,
146  HidKeyboardKey_NumPad0 = 98,
147  HidKeyboardKey_NumPadDot = 99,
148  HidKeyboardKey_Backslash = 100,
149  HidKeyboardKey_Application = 101,
150  HidKeyboardKey_Power = 102,
151  HidKeyboardKey_NumPadEquals = 103,
152  HidKeyboardKey_F13 = 104,
153  HidKeyboardKey_F14 = 105,
154  HidKeyboardKey_F15 = 106,
155  HidKeyboardKey_F16 = 107,
156  HidKeyboardKey_F17 = 108,
157  HidKeyboardKey_F18 = 109,
158  HidKeyboardKey_F19 = 110,
159  HidKeyboardKey_F20 = 111,
160  HidKeyboardKey_F21 = 112,
161  HidKeyboardKey_F22 = 113,
162  HidKeyboardKey_F23 = 114,
163  HidKeyboardKey_F24 = 115,
164  HidKeyboardKey_NumPadComma = 133,
165  HidKeyboardKey_Ro = 135,
166  HidKeyboardKey_KatakanaHiragana = 136,
167  HidKeyboardKey_Yen = 137,
168  HidKeyboardKey_Henkan = 138,
169  HidKeyboardKey_Muhenkan = 139,
170  HidKeyboardKey_NumPadCommaPc98 = 140,
171  HidKeyboardKey_HangulEnglish = 144,
172  HidKeyboardKey_Hanja = 145,
173  HidKeyboardKey_Katakana = 146,
174  HidKeyboardKey_Hiragana = 147,
175  HidKeyboardKey_ZenkakuHankaku = 148,
176  HidKeyboardKey_LeftControl = 224,
177  HidKeyboardKey_LeftShift = 225,
178  HidKeyboardKey_LeftAlt = 226,
179  HidKeyboardKey_LeftGui = 227,
180  HidKeyboardKey_RightControl = 228,
181  HidKeyboardKey_RightShift = 229,
182  HidKeyboardKey_RightAlt = 230,
183  HidKeyboardKey_RightGui = 231,
185 
186 /// HidKeyboardModifier
187 typedef enum {
188  HidKeyboardModifier_Control = BIT(0),
189  HidKeyboardModifier_Shift = BIT(1),
190  HidKeyboardModifier_LeftAlt = BIT(2),
191  HidKeyboardModifier_RightAlt = BIT(3),
192  HidKeyboardModifier_Gui = BIT(4),
193  HidKeyboardModifier_CapsLock = BIT(8),
194  HidKeyboardModifier_ScrollLock = BIT(9),
195  HidKeyboardModifier_NumLock = BIT(10),
196  HidKeyboardModifier_Katakana = BIT(11),
197  HidKeyboardModifier_Hiragana = BIT(12),
199 
200 /// KeyboardLockKeyEvent
201 typedef enum {
207  HidKeyboardLockKeyEvent_CapsLockToggle = BIT(5), ///< CapsLockToggle
210  HidKeyboardLockKeyEvent_ScrollLockToggle = BIT(8), ///< ScrollLockToggle
212 
213 /// HID controller IDs
214 typedef enum {
215  HidNpadIdType_No1 = 0, ///< Player 1 controller
216  HidNpadIdType_No2 = 1, ///< Player 2 controller
217  HidNpadIdType_No3 = 2, ///< Player 3 controller
218  HidNpadIdType_No4 = 3, ///< Player 4 controller
219  HidNpadIdType_No5 = 4, ///< Player 5 controller
220  HidNpadIdType_No6 = 5, ///< Player 6 controller
221  HidNpadIdType_No7 = 6, ///< Player 7 controller
222  HidNpadIdType_No8 = 7, ///< Player 8 controller
223  HidNpadIdType_Other = 0x10, ///< Other controller
224  HidNpadIdType_Handheld = 0x20, ///< Handheld mode controls
225 } HidNpadIdType;
226 
227 /// HID controller styles
228 typedef enum {
229  HidNpadStyleTag_NpadFullKey = BIT(0), ///< Pro Controller
230  HidNpadStyleTag_NpadHandheld = BIT(1), ///< Joy-Con controller in handheld mode
231  HidNpadStyleTag_NpadJoyDual = BIT(2), ///< Joy-Con controller in dual mode
232  HidNpadStyleTag_NpadJoyLeft = BIT(3), ///< Joy-Con left controller in single mode
233  HidNpadStyleTag_NpadJoyRight = BIT(4), ///< Joy-Con right controller in single mode
234  HidNpadStyleTag_NpadGc = BIT(5), ///< GameCube controller
235  HidNpadStyleTag_NpadPalma = BIT(6), ///< Poké Ball Plus controller
236  HidNpadStyleTag_NpadLark = BIT(7), ///< NES/Famicom controller
237  HidNpadStyleTag_NpadHandheldLark = BIT(8), ///< NES/Famicom controller in handheld mode
238  HidNpadStyleTag_NpadLucia = BIT(9), ///< SNES controller
239  HidNpadStyleTag_NpadLagon = BIT(10), ///< N64 controller
240  HidNpadStyleTag_NpadLager = BIT(11), ///< Sega Genesis controller
241  HidNpadStyleTag_NpadSystemExt = BIT(29), ///< Generic external controller
242  HidNpadStyleTag_NpadSystem = BIT(30), ///< Generic controller
243 
244  HidNpadStyleSet_NpadFullCtrl = HidNpadStyleTag_NpadFullKey | HidNpadStyleTag_NpadHandheld | HidNpadStyleTag_NpadJoyDual, ///< Style set comprising Npad styles containing the full set of controls {FullKey, Handheld, JoyDual}
245  HidNpadStyleSet_NpadStandard = HidNpadStyleSet_NpadFullCtrl | HidNpadStyleTag_NpadJoyLeft | HidNpadStyleTag_NpadJoyRight, ///< Style set comprising all standard Npad styles {FullKey, Handheld, JoyDual, JoyLeft, JoyRight}
247 
248 /// HidColorAttribute
249 typedef enum {
250  HidColorAttribute_Ok = 0, ///< Ok
251  HidColorAttribute_ReadError = 1, ///< ReadError
252  HidColorAttribute_NoController = 2, ///< NoController
254 
255 /// HidNpadButton
256 typedef enum {
257  HidNpadButton_A = BITL(0), ///< A button / Right face button
258  HidNpadButton_B = BITL(1), ///< B button / Down face button
259  HidNpadButton_X = BITL(2), ///< X button / Up face button
260  HidNpadButton_Y = BITL(3), ///< Y button / Left face button
261  HidNpadButton_StickL = BITL(4), ///< Left Stick button
262  HidNpadButton_StickR = BITL(5), ///< Right Stick button
263  HidNpadButton_L = BITL(6), ///< L button
264  HidNpadButton_R = BITL(7), ///< R button
265  HidNpadButton_ZL = BITL(8), ///< ZL button
266  HidNpadButton_ZR = BITL(9), ///< ZR button
267  HidNpadButton_Plus = BITL(10), ///< Plus button
268  HidNpadButton_Minus = BITL(11), ///< Minus button
269  HidNpadButton_Left = BITL(12), ///< D-Pad Left button
270  HidNpadButton_Up = BITL(13), ///< D-Pad Up button
271  HidNpadButton_Right = BITL(14), ///< D-Pad Right button
272  HidNpadButton_Down = BITL(15), ///< D-Pad Down button
273  HidNpadButton_StickLLeft = BITL(16), ///< Left Stick pseudo-button when moved Left
274  HidNpadButton_StickLUp = BITL(17), ///< Left Stick pseudo-button when moved Up
275  HidNpadButton_StickLRight = BITL(18), ///< Left Stick pseudo-button when moved Right
276  HidNpadButton_StickLDown = BITL(19), ///< Left Stick pseudo-button when moved Down
277  HidNpadButton_StickRLeft = BITL(20), ///< Right Stick pseudo-button when moved Left
278  HidNpadButton_StickRUp = BITL(21), ///< Right Stick pseudo-button when moved Up
279  HidNpadButton_StickRRight = BITL(22), ///< Right Stick pseudo-button when moved Right
280  HidNpadButton_StickRDown = BITL(23), ///< Right Stick pseudo-button when moved Left
281  HidNpadButton_LeftSL = BITL(24), ///< SL button on Left Joy-Con
282  HidNpadButton_LeftSR = BITL(25), ///< SR button on Left Joy-Con
283  HidNpadButton_RightSL = BITL(26), ///< SL button on Right Joy-Con
284  HidNpadButton_RightSR = BITL(27), ///< SR button on Right Joy-Con
285  HidNpadButton_Palma = BITL(28), ///< Top button on Poké Ball Plus (Palma) controller
286  HidNpadButton_Verification = BITL(29), ///< Verification
287  HidNpadButton_HandheldLeftB = BITL(30), ///< B button on Left NES/HVC controller in Handheld mode
288  HidNpadButton_LagonCLeft = BITL(31), ///< Left C button in N64 controller
289  HidNpadButton_LagonCUp = BITL(32), ///< Up C button in N64 controller
290  HidNpadButton_LagonCRight = BITL(33), ///< Right C button in N64 controller
291  HidNpadButton_LagonCDown = BITL(34), ///< Down C button in N64 controller
292 
293  HidNpadButton_AnyLeft = HidNpadButton_Left | HidNpadButton_StickLLeft | HidNpadButton_StickRLeft, ///< Bitmask containing all buttons that are considered Left (D-Pad, Sticks)
294  HidNpadButton_AnyUp = HidNpadButton_Up | HidNpadButton_StickLUp | HidNpadButton_StickRUp, ///< Bitmask containing all buttons that are considered Up (D-Pad, Sticks)
295  HidNpadButton_AnyRight = HidNpadButton_Right | HidNpadButton_StickLRight | HidNpadButton_StickRRight, ///< Bitmask containing all buttons that are considered Right (D-Pad, Sticks)
296  HidNpadButton_AnyDown = HidNpadButton_Down | HidNpadButton_StickLDown | HidNpadButton_StickRDown, ///< Bitmask containing all buttons that are considered Down (D-Pad, Sticks)
297  HidNpadButton_AnySL = HidNpadButton_LeftSL | HidNpadButton_RightSL, ///< Bitmask containing SL buttons on both Joy-Cons (Left/Right)
298  HidNpadButton_AnySR = HidNpadButton_LeftSR | HidNpadButton_RightSR, ///< Bitmask containing SR buttons on both Joy-Cons (Left/Right)
299 } HidNpadButton;
300 
301 /// HidDebugPadAttribute
302 typedef enum {
303  HidDebugPadAttribute_IsConnected = BIT(0), ///< IsConnected
305 
306 /// HidTouchAttribute
307 typedef enum {
308  HidTouchAttribute_Start = BIT(0), ///< Start
309  HidTouchAttribute_End = BIT(1), ///< End
311 
312 /// HidMouseAttribute
313 typedef enum {
314  HidMouseAttribute_Transferable = BIT(0), ///< Transferable
315  HidMouseAttribute_IsConnected = BIT(1), ///< IsConnected
317 
318 /// HidNpadAttribute
319 typedef enum {
320  HidNpadAttribute_IsConnected = BIT(0), ///< IsConnected
321  HidNpadAttribute_IsWired = BIT(1), ///< IsWired
322  HidNpadAttribute_IsLeftConnected = BIT(2), ///< IsLeftConnected
323  HidNpadAttribute_IsLeftWired = BIT(3), ///< IsLeftWired
324  HidNpadAttribute_IsRightConnected = BIT(4), ///< IsRightConnected
325  HidNpadAttribute_IsRightWired = BIT(5), ///< IsRightWired
327 
328 /// HidSixAxisSensorAttribute
329 typedef enum {
333 
334 /// HidGestureAttribute
335 typedef enum {
336  HidGestureAttribute_IsNewTouch = BIT(4), ///< IsNewTouch
337  HidGestureAttribute_IsDoubleTap = BIT(8), ///< IsDoubleTap
339 
340 /// HidGestureDirection
341 typedef enum {
348 
349 /// HidGestureType
350 typedef enum {
351  HidGestureType_Idle = 0, ///< Idle
352  HidGestureType_Complete = 1, ///< Complete
353  HidGestureType_Cancel = 2, ///< Cancel
354  HidGestureType_Touch = 3, ///< Touch
355  HidGestureType_Press = 4, ///< Press
356  HidGestureType_Tap = 5, ///< Tap
357  HidGestureType_Pan = 6, ///< Pan
358  HidGestureType_Swipe = 7, ///< Swipe
359  HidGestureType_Pinch = 8, ///< Pinch
360  HidGestureType_Rotate = 9, ///< Rotate
362 
363 /// GyroscopeZeroDriftMode
364 typedef enum {
369 
370 /// NpadJoyHoldType
371 typedef enum {
372  HidNpadJoyHoldType_Vertical = 0, ///< Default / Joy-Con held vertically.
373  HidNpadJoyHoldType_Horizontal = 1, ///< Joy-Con held horizontally.
375 
376 /// NpadJoyDeviceType
377 typedef enum {
381 
382 /// This controls how many Joy-Cons must be attached for handheld-mode to be activated.
383 typedef enum {
384  HidNpadHandheldActivationMode_Dual = 0, ///< Dual (2 Joy-Cons)
385  HidNpadHandheldActivationMode_Single = 1, ///< Single (1 Joy-Con)
386  HidNpadHandheldActivationMode_None = 2, ///< None (0 Joy-Cons)
388 
389 /// NpadJoyAssignmentMode
390 typedef enum {
391  HidNpadJoyAssignmentMode_Dual = 0, ///< Dual (Set by \ref hidSetNpadJoyAssignmentModeDual)
392  HidNpadJoyAssignmentMode_Single = 1, ///< Single (Set by hidSetNpadJoyAssignmentModeSingle*())
394 
395 /// NpadCommunicationMode
396 typedef enum {
402 
403 /// DeviceType (system)
404 typedef enum {
405  HidDeviceTypeBits_FullKey = BIT(0), ///< Pro Controller and Gc controller.
406  HidDeviceTypeBits_DebugPad = BIT(1), ///< DebugPad
407  HidDeviceTypeBits_HandheldLeft = BIT(2), ///< Joy-Con/Famicom/NES left controller in handheld mode.
408  HidDeviceTypeBits_HandheldRight = BIT(3), ///< Joy-Con/Famicom/NES right controller in handheld mode.
409  HidDeviceTypeBits_JoyLeft = BIT(4), ///< Joy-Con left controller.
410  HidDeviceTypeBits_JoyRight = BIT(5), ///< Joy-Con right controller.
411  HidDeviceTypeBits_Palma = BIT(6), ///< Poké Ball Plus controller.
412  HidDeviceTypeBits_LarkHvcLeft = BIT(7), ///< Famicom left controller.
413  HidDeviceTypeBits_LarkHvcRight = BIT(8), ///< Famicom right controller (with microphone).
414  HidDeviceTypeBits_LarkNesLeft = BIT(9), ///< NES left controller.
415  HidDeviceTypeBits_LarkNesRight = BIT(10), ///< NES right controller.
416  HidDeviceTypeBits_HandheldLarkHvcLeft = BIT(11), ///< Famicom left controller in handheld mode.
417  HidDeviceTypeBits_HandheldLarkHvcRight = BIT(12), ///< Famicom right controller (with microphone) in handheld mode.
418  HidDeviceTypeBits_HandheldLarkNesLeft = BIT(13), ///< NES left controller in handheld mode.
419  HidDeviceTypeBits_HandheldLarkNesRight = BIT(14), ///< NES right controller in handheld mode.
420  HidDeviceTypeBits_Lucia = BIT(15), ///< SNES controller
421  HidDeviceTypeBits_Lagon = BIT(16), ///< N64 controller
422  HidDeviceTypeBits_Lager = BIT(17), ///< Sega Genesis controller
423  HidDeviceTypeBits_System = BIT(31), ///< Generic controller.
425 
426 /// Internal DeviceType for [9.0.0+]. Converted to/from the pre-9.0.0 version of this by the hiddbg funcs.
427 typedef enum {
428  HidDeviceType_JoyRight1 = 1, ///< ::HidDeviceTypeBits_JoyRight
429  HidDeviceType_JoyLeft2 = 2, ///< ::HidDeviceTypeBits_JoyLeft
430  HidDeviceType_FullKey3 = 3, ///< ::HidDeviceTypeBits_FullKey
431  HidDeviceType_JoyLeft4 = 4, ///< ::HidDeviceTypeBits_JoyLeft
432  HidDeviceType_JoyRight5 = 5, ///< ::HidDeviceTypeBits_JoyRight
433  HidDeviceType_FullKey6 = 6, ///< ::HidDeviceTypeBits_FullKey
434  HidDeviceType_LarkHvcLeft = 7, ///< ::HidDeviceTypeBits_LarkHvcLeft, ::HidDeviceTypeBits_HandheldLarkHvcLeft
435  HidDeviceType_LarkHvcRight = 8, ///< ::HidDeviceTypeBits_LarkHvcRight, ::HidDeviceTypeBits_HandheldLarkHvcRight
436  HidDeviceType_LarkNesLeft = 9, ///< ::HidDeviceTypeBits_LarkNesLeft, ::HidDeviceTypeBits_HandheldLarkNesLeft
437  HidDeviceType_LarkNesRight = 10, ///< ::HidDeviceTypeBits_LarkNesRight, ::HidDeviceTypeBits_HandheldLarkNesRight
438  HidDeviceType_Lucia = 11, ///< ::HidDeviceTypeBits_Lucia
439  HidDeviceType_Palma = 12, ///< [9.0.0+] ::HidDeviceTypeBits_Palma
440  HidDeviceType_FullKey13 = 13, ///< ::HidDeviceTypeBits_FullKey
441  HidDeviceType_FullKey15 = 15, ///< ::HidDeviceTypeBits_FullKey
442  HidDeviceType_DebugPad = 17, ///< ::HidDeviceTypeBits_DebugPad
443  HidDeviceType_System19 = 19, ///< ::HidDeviceTypeBits_System with \ref HidNpadStyleTag |= ::HidNpadStyleTag_NpadFullKey.
444  HidDeviceType_System20 = 20, ///< ::HidDeviceTypeBits_System with \ref HidNpadStyleTag |= ::HidNpadStyleTag_NpadJoyDual.
445  HidDeviceType_System21 = 21, ///< ::HidDeviceTypeBits_System with \ref HidNpadStyleTag |= ::HidNpadStyleTag_NpadJoyDual.
446  HidDeviceType_Lagon = 22, ///< ::HidDeviceTypeBits_Lagon
447  HidDeviceType_Lager = 28, ///< ::HidDeviceTypeBits_Lager
448 } HidDeviceType;
449 
450 /// AppletFooterUiType (system)
451 typedef enum {
453  HidAppletFooterUiType_HandheldNone = 1, ///< HandheldNone
454  HidAppletFooterUiType_HandheldJoyConLeftOnly = 2, ///< HandheldJoyConLeftOnly
455  HidAppletFooterUiType_HandheldJoyConRightOnly = 3, ///< HandheldJoyConRightOnly
456  HidAppletFooterUiType_HandheldJoyConLeftJoyConRight = 4, ///< HandheldJoyConLeftJoyConRight
458  HidAppletFooterUiType_JoyDualLeftOnly = 6, ///< JoyDualLeftOnly
459  HidAppletFooterUiType_JoyDualRightOnly = 7, ///< JoyDualRightOnly
460  HidAppletFooterUiType_JoyLeftHorizontal = 8, ///< JoyLeftHorizontal
461  HidAppletFooterUiType_JoyLeftVertical = 9, ///< JoyLeftVertical
462  HidAppletFooterUiType_JoyRightHorizontal = 10, ///< JoyRightHorizontal
463  HidAppletFooterUiType_JoyRightVertical = 11, ///< JoyRightVertical
464  HidAppletFooterUiType_SwitchProController = 12, ///< SwitchProController
465  HidAppletFooterUiType_CompatibleProController = 13, ///< CompatibleProController
466  HidAppletFooterUiType_CompatibleJoyCon = 14, ///< CompatibleJoyCon
467  HidAppletFooterUiType_LarkHvc1 = 15, ///< LarkHvc1
468  HidAppletFooterUiType_LarkHvc2 = 16, ///< LarkHvc2
469  HidAppletFooterUiType_LarkNesLeft = 17, ///< LarkNesLeft
470  HidAppletFooterUiType_LarkNesRight = 18, ///< LarkNesRight
472  HidAppletFooterUiType_Verification = 20, ///< Verification
473  HidAppletFooterUiType_Lagon = 21, ///< [13.0.0+] Lagon
475 
476 /// NpadInterfaceType (system)
477 typedef enum {
478  HidNpadInterfaceType_Bluetooth = 1, ///< Bluetooth.
481  HidNpadInterfaceType_Unknown4 = 4, ///< Unknown.
483 
484 /// XcdInterfaceType
485 typedef enum {
486  XcdInterfaceType_Bluetooth = BIT(0),
487  XcdInterfaceType_Uart = BIT(1),
488  XcdInterfaceType_Usb = BIT(2),
489  XcdInterfaceType_FieldSet = BIT(7),
491 
492 /// NpadLarkType
493 typedef enum {
494  HidNpadLarkType_Invalid = 0, ///< Invalid
495  HidNpadLarkType_H1 = 1, ///< H1
496  HidNpadLarkType_H2 = 2, ///< H2
497  HidNpadLarkType_NL = 3, ///< NL
498  HidNpadLarkType_NR = 4, ///< NR
500 
501 /// NpadLuciaType
502 typedef enum {
503  HidNpadLuciaType_Invalid = 0, ///< Invalid
504  HidNpadLuciaType_J = 1, ///< J
505  HidNpadLuciaType_E = 2, ///< E
506  HidNpadLuciaType_U = 3, ///< U
508 
509 /// NpadLagerType
510 typedef enum {
511  HidNpadLagerType_Invalid = 0, ///< Invalid
512  HidNpadLagerType_J = 1, ///< J
513  HidNpadLagerType_E = 2, ///< E
514  HidNpadLagerType_U = 3, ///< U
516 
517 /// Type values for HidVibrationDeviceInfo::type.
518 typedef enum {
520  HidVibrationDeviceType_LinearResonantActuator = 1, ///< LinearResonantActuator
521  HidVibrationDeviceType_GcErm = 2, ///< GcErm (::HidNpadStyleTag_NpadGc)
523 
524 /// VibrationDevicePosition
525 typedef enum {
530 
531 /// VibrationGcErmCommand
532 typedef enum {
533  HidVibrationGcErmCommand_Stop = 0, ///< Stops the vibration with a decay phase.
534  HidVibrationGcErmCommand_Start = 1, ///< Starts the vibration.
535  HidVibrationGcErmCommand_StopHard = 2, ///< Stops the vibration immediately, with no decay phase.
537 
538 /// PalmaOperationType
539 typedef enum {
540  HidPalmaOperationType_PlayActivity = 0, ///< PlayActivity
541  HidPalmaOperationType_SetFrModeType = 1, ///< SetFrModeType
543  HidPalmaOperationType_EnableStep = 3, ///< EnableStep
545  HidPalmaOperationType_ReadApplicationSection = 5, ///< ReadApplicationSection
546  HidPalmaOperationType_WriteApplicationSection = 6, ///< WriteApplicationSection
547  HidPalmaOperationType_ReadUniqueCode = 7, ///< ReadUniqueCode
548  HidPalmaOperationType_SetUniqueCodeInvalid = 8, ///< SetUniqueCodeInvalid
549  HidPalmaOperationType_WriteActivityEntry = 9, ///< WriteActivityEntry
550  HidPalmaOperationType_WriteRgbLedPatternEntry = 10, ///< WriteRgbLedPatternEntry
551  HidPalmaOperationType_WriteWaveEntry = 11, ///< WriteWaveEntry
552  HidPalmaOperationType_ReadDataBaseIdentificationVersion = 12, ///< ReadDataBaseIdentificationVersion
553  HidPalmaOperationType_WriteDataBaseIdentificationVersion = 13, ///< WriteDataBaseIdentificationVersion
554  HidPalmaOperationType_SuspendFeature = 14, ///< SuspendFeature
555  HidPalmaOperationType_ReadPlayLog = 15, ///< [5.1.0+] ReadPlayLog
556  HidPalmaOperationType_ResetPlayLog = 16, ///< [5.1.0+] ResetPlayLog
558 
559 /// PalmaFrModeType
560 typedef enum {
565  HidPalmaFrModeType_Downloaded = 4, ///< Downloaded
567 
568 /// PalmaWaveSet
569 typedef enum {
570  HidPalmaWaveSet_Small = 0, ///< Small
571  HidPalmaWaveSet_Medium = 1, ///< Medium
572  HidPalmaWaveSet_Large = 2, ///< Large
574 
575 /// PalmaFeature
576 typedef enum {
577  HidPalmaFeature_FrMode = BIT(0), ///< FrMode
578  HidPalmaFeature_RumbleFeedback = BIT(1), ///< RumbleFeedback
579  HidPalmaFeature_Step = BIT(2), ///< Step
580  HidPalmaFeature_MuteSwitch = BIT(3), ///< MuteSwitch
582 
583 /// HidAnalogStickState
584 typedef struct HidAnalogStickState {
585  s32 x; ///< X
586  s32 y; ///< Y
588 
589 /// HidVector
590 typedef struct HidVector {
591  float x;
592  float y;
593  float z;
594 } HidVector;
595 
596 /// HidDirectionState
597 typedef struct HidDirectionState {
598  float direction[3][3]; ///< 3x3 matrix
600 
601 #define JOYSTICK_MAX (0x7FFF)
602 #define JOYSTICK_MIN (-0x7FFF)
603 
604 // End enums and output structs
605 
606 /// HidCommonLifoHeader
607 typedef struct HidCommonLifoHeader {
608  u64 unused; ///< Unused
609  u64 buffer_count; ///< BufferCount
610  u64 tail; ///< Tail
611  u64 count; ///< Count
613 
614 // Begin HidDebugPad
615 
616 /// HidDebugPadState
617 typedef struct HidDebugPadState {
618  u64 sampling_number; ///< SamplingNumber
619  u32 attributes; ///< Bitfield of \ref HidDebugPadAttribute.
620  u32 buttons; ///< Bitfield of \ref HidDebugPadButton.
624 
625 /// HidDebugPadStateAtomicStorage
627  u64 sampling_number; ///< SamplingNumber
628  HidDebugPadState state; ///< \ref HidDebugPadState
630 
631 /// HidDebugPadLifo
632 typedef struct HidDebugPadLifo {
633  HidCommonLifoHeader header; ///< \ref HidCommonLifoHeader
634  HidDebugPadStateAtomicStorage storage[17]; ///< \ref HidDebugPadStateAtomicStorage
636 
637 /// HidDebugPadSharedMemoryFormat
639  HidDebugPadLifo lifo;
640  u8 padding[0x138];
642 
643 // End HidDebugPad
644 
645 // Begin HidTouchScreen
646 
647 /// HidTouchState
648 typedef struct HidTouchState {
649  u64 delta_time; ///< DeltaTime
650  u32 attributes; ///< Bitfield of \ref HidTouchAttribute.
651  u32 finger_id; ///< FingerId
652  u32 x; ///< X
653  u32 y; ///< Y
654  u32 diameter_x; ///< DiameterX
655  u32 diameter_y; ///< DiameterY
656  u32 rotation_angle; ///< RotationAngle
657  u32 reserved; ///< Reserved
658 } HidTouchState;
659 
660 /// HidTouchScreenState
661 typedef struct HidTouchScreenState {
662  u64 sampling_number; ///< SamplingNumber
663  s32 count; ///< Number of entries in the touches array.
664  u32 reserved; ///< Reserved
665  HidTouchState touches[16]; ///< Array of \ref HidTouchState, with the above count.
667 
668 /// HidTouchScreenStateAtomicStorage
670  u64 sampling_number; ///< SamplingNumber
671  HidTouchScreenState state; ///< \ref HidTouchScreenState
673 
674 /// HidTouchScreenLifo
675 typedef struct HidTouchScreenLifo {
676  HidCommonLifoHeader header; ///< \ref HidCommonLifoHeader
677  HidTouchScreenStateAtomicStorage storage[17]; ///< \ref HidTouchScreenStateAtomicStorage
679 
680 /// HidTouchScreenSharedMemoryFormat
682  HidTouchScreenLifo lifo;
683  u8 padding[0x3c8];
685 
686 /// HidTouchScreenConfigurationForNx
687 typedef struct {
688  u8 mode; ///< \ref HidTouchScreenModeForNx
689  u8 reserved[0xF]; ///< Reserved
691 
692 // End HidTouchScreen
693 
694 // Begin HidMouse
695 
696 /// HidMouseState
697 typedef struct HidMouseState {
698  u64 sampling_number; ///< SamplingNumber
699  s32 x; ///< X
700  s32 y; ///< Y
701  s32 delta_x; ///< DeltaX
702  s32 delta_y; ///< DeltaY
703  s32 wheel_delta_x; ///< WheelDeltaX
704  s32 wheel_delta_y; ///< WheelDeltaY
705  u32 buttons; ///< Bitfield of \ref HidMouseButton.
706  u32 attributes; ///< Bitfield of \ref HidMouseAttribute.
707 } HidMouseState;
708 
709 /// HidMouseStateAtomicStorage
711  u64 sampling_number; ///< SamplingNumber
712  HidMouseState state;
714 
715 /// HidMouseLifo
716 typedef struct HidMouseLifo {
717  HidCommonLifoHeader header;
718  HidMouseStateAtomicStorage storage[17];
719 } HidMouseLifo;
720 
721 /// HidMouseSharedMemoryFormat
723  HidMouseLifo lifo;
724  u8 padding[0xB0];
726 
727 // End HidMouse
728 
729 // Begin HidKeyboard
730 
731 /// HidKeyboardState
732 typedef struct HidKeyboardState {
733  u64 sampling_number; ///< SamplingNumber
734  u64 modifiers; ///< Bitfield of \ref HidKeyboardModifier.
735  u64 keys[4];
737 
738 /// HidKeyboardStateAtomicStorage
740  u64 sampling_number; ///< SamplingNumber
741  HidKeyboardState state;
743 
744 /// HidKeyboardLifo
745 typedef struct HidKeyboardLifo {
746  HidCommonLifoHeader header;
747  HidKeyboardStateAtomicStorage storage[17];
749 
750 /// HidKeyboardSharedMemoryFormat
752  HidKeyboardLifo lifo;
753  u8 padding[0x28];
755 
756 // End HidKeyboard
757 
758 // Begin HidNpad
759 
760 /// Npad colors.
761 /// Color fields are zero when not set.
762 typedef struct HidNpadControllerColor {
763  u32 main; ///< RGBA Body Color
764  u32 sub; ///< RGBA Buttons Color
766 
767 /// HidNpadFullKeyColorState
768 typedef struct HidNpadFullKeyColorState {
769  u32 attribute; ///< \ref HidColorAttribute
770  HidNpadControllerColor full_key; ///< \ref HidNpadControllerColor FullKey
772 
773 /// HidNpadJoyColorState
774 typedef struct HidNpadJoyColorState {
775  u32 attribute; ///< \ref HidColorAttribute
776  HidNpadControllerColor left; ///< \ref HidNpadControllerColor Left
777  HidNpadControllerColor right; ///< \ref HidNpadControllerColor Right
779 
780 /// HidNpadCommonState
781 typedef struct HidNpadCommonState {
782  u64 sampling_number; ///< SamplingNumber
783  u64 buttons; ///< Bitfield of \ref HidNpadButton.
786  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
787  u32 reserved; ///< Reserved
789 
790 typedef HidNpadCommonState HidNpadFullKeyState; ///< State for ::HidNpadStyleTag_NpadFullKey.
791 typedef HidNpadCommonState HidNpadHandheldState; ///< State for ::HidNpadStyleTag_NpadHandheld.
792 typedef HidNpadCommonState HidNpadJoyDualState; ///< State for ::HidNpadStyleTag_NpadJoyDual.
793 typedef HidNpadCommonState HidNpadJoyLeftState; ///< State for ::HidNpadStyleTag_NpadJoyLeft.
794 typedef HidNpadCommonState HidNpadJoyRightState; ///< State for ::HidNpadStyleTag_NpadJoyRight.
795 
796 /// State for ::HidNpadStyleTag_NpadGc. Loaded from the same lifo as \ref HidNpadFullKeyState, with the additional trigger_l/trigger_r loaded from elsewhere.
797 typedef struct HidNpadGcState {
798  u64 sampling_number; ///< SamplingNumber
799  u64 buttons; ///< Bitfield of \ref HidNpadButton.
802  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
803  u32 trigger_l; ///< L analog trigger. Valid range: 0x0-0x7FFF.
804  u32 trigger_r; ///< R analog trigger. Valid range: 0x0-0x7FFF.
805  u32 pad;
807 
808 typedef HidNpadCommonState HidNpadPalmaState; ///< State for ::HidNpadStyleTag_NpadPalma.
809 
810 /// State for ::HidNpadStyleTag_NpadLark. The base state is loaded from the same lifo as \ref HidNpadFullKeyState.
811 typedef struct HidNpadLarkState {
812  u64 sampling_number; ///< SamplingNumber
813  u64 buttons; ///< Bitfield of \ref HidNpadButton.
814  HidAnalogStickState analog_stick_l; ///< This is always zero.
815  HidAnalogStickState analog_stick_r; ///< This is always zero.
816  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
817  HidNpadLarkType lark_type_l_and_main; ///< \ref HidNpadLarkType LarkTypeLAndMain
819 
820 /// State for ::HidNpadStyleTag_NpadHandheldLark. The base state is loaded from the same lifo as \ref HidNpadHandheldState.
821 typedef struct HidNpadHandheldLarkState {
822  u64 sampling_number; ///< SamplingNumber
823  u64 buttons; ///< Bitfield of \ref HidNpadButton.
826  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
827  HidNpadLarkType lark_type_l_and_main; ///< \ref HidNpadLarkType LarkTypeLAndMain
828  HidNpadLarkType lark_type_r; ///< \ref HidNpadLarkType LarkTypeR
829  u32 pad;
831 
832 /// State for ::HidNpadStyleTag_NpadLucia. The base state is loaded from the same lifo as \ref HidNpadFullKeyState.
833 typedef struct HidNpadLuciaState {
834  u64 sampling_number; ///< SamplingNumber
835  u64 buttons; ///< Bitfield of \ref HidNpadButton.
836  HidAnalogStickState analog_stick_l; ///< This is always zero.
837  HidAnalogStickState analog_stick_r; ///< This is always zero.
838  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
839  HidNpadLuciaType lucia_type; ///< \ref HidNpadLuciaType
841 
842 typedef HidNpadCommonState HidNpadLagerState; ///< State for ::HidNpadStyleTag_NpadLager. Analog-sticks state are always zero.
843 
844 typedef HidNpadCommonState HidNpadSystemExtState; ///< State for ::HidNpadStyleTag_NpadSystemExt.
845 typedef HidNpadCommonState HidNpadSystemState; ///< State for ::HidNpadStyleTag_NpadSystem. Analog-sticks state are always zero. Only the following button bits are available: HidNpadButton_A, HidNpadButton_B, HidNpadButton_X, HidNpadButton_Y, HidNpadButton_Left, HidNpadButton_Up, HidNpadButton_Right, HidNpadButton_Down, HidNpadButton_L, HidNpadButton_R.
846 
847 /// HidNpadCommonStateAtomicStorage
849  u64 sampling_number; ///< SamplingNumber
850  HidNpadCommonState state;
852 
853 /// HidNpadCommonLifo
854 typedef struct HidNpadCommonLifo {
855  HidCommonLifoHeader header;
858 
859 /// HidNpadGcTriggerState
860 typedef struct HidNpadGcTriggerState {
861  u64 sampling_number; ///< SamplingNumber
862  u32 trigger_l;
863  u32 trigger_r;
865 
866 /// HidNpadGcTriggerStateAtomicStorage
868  u64 sampling_number; ///< SamplingNumber
869  HidNpadGcTriggerState state;
871 
872 /// HidNpadGcTriggerLifo
873 typedef struct HidNpadGcTriggerLifo {
874  HidCommonLifoHeader header;
877 
878 /// HidSixAxisSensorState
879 typedef struct HidSixAxisSensorState {
880  u64 delta_time; ///< DeltaTime
881  u64 sampling_number; ///< SamplingNumber
882  HidVector acceleration; ///< Acceleration
883  HidVector angular_velocity; ///< AngularVelocity
884  HidVector angle; ///< Angle
885  HidDirectionState direction; ///< Direction
886  u32 attributes; ///< Bitfield of \ref HidSixAxisSensorAttribute.
887  u32 reserved; ///< Reserved
889 
890 /// HidSixAxisSensorStateAtomicStorage
892  u64 sampling_number; ///< SamplingNumber
893  HidSixAxisSensorState state;
895 
896 /// HidNpadSixAxisSensorLifo
897 typedef struct HidNpadSixAxisSensorLifo {
898  HidCommonLifoHeader header;
901 
902 /// NpadSystemProperties
903 typedef struct {
904  u64 is_charging : 3; ///< Use \ref hidGetNpadPowerInfoSingle / \ref hidGetNpadPowerInfoSplit instead of accessing this directly.
905  u64 is_powered : 3; ///< Use \ref hidGetNpadPowerInfoSingle / \ref hidGetNpadPowerInfoSplit instead of accessing this directly.
906 
907  u64 bit6 : 1; ///< Unused
908  u64 bit7 : 1; ///< Unused
909  u64 bit8 : 1; ///< Unused
910  u64 is_unsupported_button_pressed_on_npad_system : 1; ///< IsUnsupportedButtonPressedOnNpadSystem
911  u64 is_unsupported_button_pressed_on_npad_system_ext : 1; ///< IsUnsupportedButtonPressedOnNpadSystemExt
912 
913  u64 is_abxy_button_oriented : 1; ///< IsAbxyButtonOriented
914  u64 is_sl_sr_button_oriented : 1; ///< IsSlSrButtonOriented
915  u64 is_plus_available : 1; ///< [4.0.0+] IsPlusAvailable
916  u64 is_minus_available : 1; ///< [4.0.0+] IsMinusAvailable
917  u64 is_directional_buttons_available : 1; ///< [8.0.0+] IsDirectionalButtonsAvailable
918 
919  u64 unused : 48; ///< Unused
921 
922 /// NpadSystemButtonProperties
923 typedef struct {
924  u32 is_unintended_home_button_input_protection_enabled : 1; ///< IsUnintendedHomeButtonInputProtectionEnabled
926 
927 /// HidPowerInfo (system)
928 typedef struct {
929  bool is_powered; ///< IsPowered
930  bool is_charging; ///< IsCharging
931  u8 reserved[6]; ///< Reserved
932  u32 battery_level; ///< BatteryLevel, always 0-4.
933 } HidPowerInfo;
934 
935 /// XcdDeviceHandle
936 typedef struct XcdDeviceHandle {
937  u64 handle;
939 
940 /// HidNfcXcdDeviceHandleStateImpl
942  XcdDeviceHandle handle;
943  u8 is_available;
944  u8 is_activated;
945  u8 reserved[6];
946  u64 sampling_number; ///< SamplingNumber
948 
949 /// HidNfcXcdDeviceHandleStateImplAtomicStorage
951  u64 sampling_number; ///< SamplingNumber
952  HidNfcXcdDeviceHandleStateImpl state; ///< \ref HidNfcXcdDeviceHandleStateImpl
954 
955 /// HidNfcXcdDeviceHandleState
957  HidCommonLifoHeader header;
960 
961 /// HidNpadInternalState
962 typedef struct HidNpadInternalState {
963  u32 style_set; ///< Bitfield of \ref HidNpadStyleTag.
964  u32 joy_assignment_mode; ///< \ref HidNpadJoyAssignmentMode
965  HidNpadFullKeyColorState full_key_color; ///< \ref HidNpadFullKeyColorState
966  HidNpadJoyColorState joy_color; ///< \ref HidNpadJoyColorState
967 
969  HidNpadCommonLifo handheld_lifo; ///< HandheldLifo
974  HidNpadCommonLifo system_ext_lifo; ///< SystemExtLifo
975 
982 
983  u32 device_type; ///< Bitfield of \ref HidDeviceTypeBits.
984  u32 reserved; ///< Reserved
985  HidNpadSystemProperties system_properties;
986  HidNpadSystemButtonProperties system_button_properties;
987  u32 battery_level[3];
988  union {
989  struct { // [1.0.0-3.0.2]
990  HidNfcXcdDeviceHandleState nfc_xcd_device_handle;
991  };
992 
993  struct {
994  u32 applet_footer_ui_attribute; ///< Bitfield of AppletFooterUiAttribute.
995  u8 applet_footer_ui_type; ///< \ref HidAppletFooterUiType
996  u8 reserved_x41AD[0x5B];
997  };
998  };
999  u8 reserved_x4208[0x20]; ///< Mutex on pre-10.0.0.
1000  HidNpadGcTriggerLifo gc_trigger_lifo;
1001  u32 lark_type_l_and_main; ///< \ref HidNpadLarkType
1002  u32 lark_type_r; ///< \ref HidNpadLarkType
1003  u32 lucia_type; ///< \ref HidNpadLuciaType
1004  u32 lager_type; ///< \ref HidNpadLagerType
1006 
1007 /// HidNpadSharedMemoryEntry
1009  HidNpadInternalState internal_state;
1010  u8 pad[0xC10];
1012 
1013 /// HidNpadSharedMemoryFormat
1015  HidNpadSharedMemoryEntry entries[10];
1017 
1018 // End HidNpad
1019 
1020 // Begin HidGesture
1021 
1022 /// HidGesturePoint
1023 typedef struct HidGesturePoint {
1024  u32 x; ///< X
1025  u32 y; ///< Y
1026 } HidGesturePoint;
1027 
1028 /// HidGestureState
1029 typedef struct HidGestureState {
1030  u64 sampling_number; ///< SamplingNumber
1031  u64 context_number; ///< ContextNumber
1032  u32 type; ///< \ref HidGestureType
1033  u32 direction; ///< \ref HidGestureDirection
1034  u32 x; ///< X
1035  u32 y; ///< Y
1036  s32 delta_x; ///< DeltaX
1037  s32 delta_y; ///< DeltaY
1038  float velocity_x; ///< VelocityX
1039  float velocity_y; ///< VelocityY
1040  u32 attributes; ///< Bitfield of \ref HidGestureAttribute.
1041  float scale; ///< Scale
1042  float rotation_angle; ///< RotationAngle
1043  s32 point_count; ///< Number of entries in the points array.
1044  HidGesturePoint points[4]; ///< Array of \ref HidGesturePoint with the above count.
1045 } HidGestureState;
1046 
1047 /// HidGestureDummyStateAtomicStorage
1049  u64 sampling_number; ///< SamplingNumber
1050  HidGestureState state;
1052 
1053 /// HidGestureLifo
1054 typedef struct HidGestureLifo {
1055  HidCommonLifoHeader header;
1057 } HidGestureLifo;
1058 
1059 /// HidGestureSharedMemoryFormat
1061  HidGestureLifo lifo;
1062  u8 pad[0xF8];
1064 
1065 // End HidGesture
1066 
1067 /// HidConsoleSixAxisSensor
1068 typedef struct {
1069  u64 sampling_number; ///< SamplingNumber
1070  u8 is_seven_six_axis_sensor_at_rest; ///< IsSevenSixAxisSensorAtRest
1071  u8 pad[0x3]; ///< Padding
1072  float verticalization_error; ///< VerticalizationError
1073  UtilFloat3 gyro_bias; ///< GyroBias
1074  u8 pad2[0x4]; ///< Padding
1076 
1077 /// HidSharedMemory
1078 typedef struct HidSharedMemory {
1083  u8 digitizer[0x1000]; ///< [10.0.0+] Digitizer [1.0.0-9.2.0] BasicXpad
1084  u8 home_button[0x200];
1085  u8 sleep_button[0x200];
1086  u8 capture_button[0x200];
1087  u8 input_detector[0x800];
1088  u8 unique_pad[0x4000]; ///< [1.0.0-4.1.0] UniquePad
1091  HidConsoleSixAxisSensor console_six_axis_sensor; ///< [5.0.0+] ConsoleSixAxisSensor
1092  u8 unk_x3C220[0x3DE0];
1093 } HidSharedMemory;
1094 
1095 /// HidSevenSixAxisSensorState
1096 typedef struct {
1097  u64 timestamp0;
1098  u64 sampling_number;
1099 
1100  u64 unk_x10;
1101  float unk_x18[10];
1103 
1104 /// HidSevenSixAxisSensorStateEntry
1105 typedef struct {
1106  u64 sampling_number;
1107  u64 unused;
1110 
1111 /// HidSevenSixAxisSensorStates
1112 typedef struct {
1113  HidCommonLifoHeader header;
1114  HidSevenSixAxisSensorStateEntry storage[0x21];
1116 
1117 /// HidSixAxisSensorHandle
1118 typedef union HidSixAxisSensorHandle {
1119  u32 type_value; ///< TypeValue
1120  struct {
1121  u32 npad_style_index : 8; ///< NpadStyleIndex
1122  u32 player_number : 8; ///< PlayerNumber
1123  u32 device_idx : 8; ///< DeviceIdx
1124  u32 pad : 8; ///< Padding
1125  };
1127 
1128 /// HidVibrationDeviceHandle
1130  u32 type_value; ///< TypeValue
1131  struct {
1132  u32 npad_style_index : 8; ///< NpadStyleIndex
1133  u32 player_number : 8; ///< PlayerNumber
1134  u32 device_idx : 8; ///< DeviceIdx
1135  u32 pad : 8; ///< Padding
1136  };
1138 
1139 /// HidVibrationDeviceInfo
1140 typedef struct HidVibrationDeviceInfo {
1141  u32 type; ///< \ref HidVibrationDeviceType
1142  u32 position; ///< \ref HidVibrationDevicePosition
1144 
1145 /// HidVibrationValue
1146 typedef struct HidVibrationValue {
1147  float amp_low; ///< Low Band amplitude. 1.0f: Max amplitude.
1148  float freq_low; ///< Low Band frequency in Hz.
1149  float amp_high; ///< High Band amplitude. 1.0f: Max amplitude.
1150  float freq_high; ///< High Band frequency in Hz.
1152 
1153 /// PalmaConnectionHandle
1155  u64 handle; ///< Handle
1157 
1158 /// PalmaOperationInfo
1159 typedef struct HidPalmaOperationInfo {
1160  u32 type; ///< \ref HidPalmaOperationType
1161  Result res; ///< Result
1162  u8 data[0x140]; ///< Data
1164 
1165 /// PalmaApplicationSectionAccessBuffer
1167  u8 data[0x100]; ///< Application data.
1169 
1170 /// PalmaActivityEntry
1171 typedef struct HidPalmaActivityEntry {
1172  u16 rgb_led_pattern_index; ///< RgbLedPatternIndex
1173  u16 pad; ///< Padding
1174  u32 wave_set; ///< \ref HidPalmaWaveSet
1175  u16 wave_index; ///< WaveIndex
1177 
1178 /// Initialize hid. Called automatically during app startup.
1180 
1181 /// Exit hid. Called automatically during app exit.
1182 void hidExit(void);
1183 
1184 /// Gets the Service object for the actual hid service session.
1186 
1187 /// Gets the address of the SharedMemory.
1189 
1190 ///@name TouchScreen
1191 ///@{
1192 
1193 /// Initialize TouchScreen. Must be called when TouchScreen is being used. Used automatically by \ref hidScanInput when required.
1195 
1196 /**
1197  * @brief Gets \ref HidTouchScreenState.
1198  * @param[out] states Output array of \ref HidTouchScreenState.
1199  * @param[in] count Size of the states array in entries.
1200  * @return Total output entries.
1201  */
1202 size_t hidGetTouchScreenStates(HidTouchScreenState *states, size_t count);
1203 
1204 ///@}
1205 
1206 ///@name Mouse
1207 ///@{
1208 
1209 /// Initialize Mouse. Must be called when Mouse is being used. Used automatically by \ref hidScanInput when required.
1211 
1212 /**
1213  * @brief Gets \ref HidMouseState.
1214  * @param[out] states Output array of \ref HidMouseState.
1215  * @param[in] count Size of the states array in entries.
1216  * @return Total output entries.
1217  */
1218 size_t hidGetMouseStates(HidMouseState *states, size_t count);
1219 
1220 ///@}
1221 
1222 ///@name Keyboard
1223 ///@{
1224 
1225 /// Initialize Keyboard. Must be called when Keyboard is being used. Used automatically by \ref hidScanInput when required.
1227 
1228 /**
1229  * @brief Gets \ref HidKeyboardState.
1230  * @param[out] states Output array of \ref HidKeyboardState.
1231  * @param[in] count Size of the states array in entries.
1232  * @return Total output entries.
1233  */
1234 size_t hidGetKeyboardStates(HidKeyboardState *states, size_t count);
1235 
1236 /**
1237  * @brief Gets the state of a key in a \ref HidKeyboardState.
1238  * @param[in] state \ref HidKeyboardState.
1239  * @param[in] key \ref HidKeyboardKey.
1240  * @return true if the key is pressed, false if not.
1241  */
1243  return (state->keys[key / 64] & (1UL << (key & 63))) != 0;
1244 }
1245 
1246 ///@}
1247 
1248 ///@name Npad
1249 ///@{
1250 
1251 /// Initialize Npad. Must be called when Npad is being used. Used automatically by \ref hidScanInput when required.
1253 
1254 /**
1255  * @brief Gets the StyleSet for the specified Npad.
1256  * @param[in] id \ref HidNpadIdType
1257  * @return Bitfield of \ref HidNpadStyleTag.
1258  */
1260 
1261 /**
1262  * @brief Gets the \ref HidNpadJoyAssignmentMode for the specified Npad.
1263  * @param[in] id \ref HidNpadIdType
1264  * @return \ref HidNpadJoyAssignmentMode
1265  */
1267 
1268 /**
1269  * @brief Gets the main \ref HidNpadControllerColor for the specified Npad.
1270  * @param[in] id \ref HidNpadIdType
1271  * @param[out] color \ref HidNpadControllerColor
1272  */
1274 
1275 /**
1276  * @brief Gets the left/right \ref HidNpadControllerColor for the specified Npad (Joy-Con pair in dual mode).
1277  * @param[in] id \ref HidNpadIdType
1278  * @param[out] color_left \ref HidNpadControllerColor
1279  * @param[out] color_right \ref HidNpadControllerColor
1280  */
1282 
1283 /**
1284  * @brief Gets the DeviceType for the specified Npad.
1285  * @param[in] id \ref HidNpadIdType
1286  * @return Bitfield of \ref HidDeviceTypeBits.
1287  */
1289 
1290 /**
1291  * @brief Gets the \ref HidNpadSystemProperties for the specified Npad.
1292  * @param[in] id \ref HidNpadIdType
1293  * @param[out] out \ref HidNpadSystemProperties
1294  */
1296 
1297 /**
1298  * @brief Gets the \ref HidNpadSystemButtonProperties for the specified Npad.
1299  * @param[in] id \ref HidNpadIdType
1300  * @param[out] out \ref HidNpadSystemButtonProperties
1301  */
1303 
1304 /**
1305  * @brief Gets the main \ref HidPowerInfo for the specified Npad.
1306  * @param[in] id \ref HidNpadIdType
1307  * @param[out] info \ref HidPowerInfo
1308  */
1310 
1311 /**
1312  * @brief Gets the left/right \ref HidPowerInfo for the specified Npad (Joy-Con pair in dual mode).
1313  * @param[in] id \ref HidNpadIdType
1314  * @param[out] info_left \ref HidPowerInfo
1315  * @param[out] info_right \ref HidPowerInfo
1316  */
1318 
1319 /**
1320  * @brief Gets the AppletFooterUiAttributesSet for the specified Npad.
1321  * @note Only available on [9.0.0+].
1322  * @param[in] id \ref HidNpadIdType
1323  * @return Bitfield of AppletFooterUiAttribute (system).
1324  */
1326 
1327 /**
1328  * @brief Gets \ref HidAppletFooterUiType for the specified Npad.
1329  * @note Only available on [9.0.0+].
1330  * @param[in] id \ref HidNpadIdType
1331  * @return \ref HidAppletFooterUiType
1332  */
1334 
1335 /**
1336  * @brief Gets \ref HidNpadLagerType for the specified Npad.
1337  * @param[in] id \ref HidNpadIdType
1338  * @return \ref HidNpadLagerType
1339  */
1341 
1342 /**
1343  * @brief Gets \ref HidNpadFullKeyState.
1344  * @param[out] states Output array of \ref HidNpadFullKeyState.
1345  * @param[in] count Size of the states array in entries.
1346  * @return Total output entries.
1347  */
1349 
1350 /**
1351  * @brief Gets \ref HidNpadHandheldState.
1352  * @param[out] states Output array of \ref HidNpadHandheldState.
1353  * @param[in] count Size of the states array in entries.
1354  * @return Total output entries.
1355  */
1357 
1358 /**
1359  * @brief Gets \ref HidNpadJoyDualState.
1360  * @param[out] states Output array of \ref HidNpadJoyDualState.
1361  * @param[in] count Size of the states array in entries.
1362  * @return Total output entries.
1363  */
1365 
1366 /**
1367  * @brief Gets \ref HidNpadJoyLeftState.
1368  * @param[out] states Output array of \ref HidNpadJoyLeftState.
1369  * @param[in] count Size of the states array in entries.
1370  * @return Total output entries.
1371  */
1373 
1374 /**
1375  * @brief Gets \ref HidNpadJoyRightState.
1376  * @param[out] states Output array of \ref HidNpadJoyRightState.
1377  * @param[in] count Size of the states array in entries.
1378  * @return Total output entries.
1379  */
1381 
1382 /**
1383  * @brief Gets \ref HidNpadGcState.
1384  * @param[out] states Output array of \ref HidNpadGcState.
1385  * @param[in] count Size of the states array in entries.
1386  * @return Total output entries.
1387  */
1388 size_t hidGetNpadStatesGc(HidNpadIdType id, HidNpadGcState *states, size_t count);
1389 
1390 /**
1391  * @brief Gets \ref HidNpadPalmaState.
1392  * @param[out] states Output array of \ref HidNpadPalmaState.
1393  * @param[in] count Size of the states array in entries.
1394  * @return Total output entries.
1395  */
1396 size_t hidGetNpadStatesPalma(HidNpadIdType id, HidNpadPalmaState *states, size_t count);
1397 
1398 /**
1399  * @brief Gets \ref HidNpadLarkState.
1400  * @param[out] states Output array of \ref HidNpadLarkState.
1401  * @param[in] count Size of the states array in entries.
1402  * @return Total output entries.
1403  */
1404 size_t hidGetNpadStatesLark(HidNpadIdType id, HidNpadLarkState *states, size_t count);
1405 
1406 /**
1407  * @brief Gets \ref HidNpadHandheldLarkState.
1408  * @param[out] states Output array of \ref HidNpadHandheldLarkState.
1409  * @param[in] count Size of the states array in entries.
1410  * @return Total output entries.
1411  */
1413 
1414 /**
1415  * @brief Gets \ref HidNpadLuciaState.
1416  * @param[out] states Output array of \ref HidNpadLuciaState.
1417  * @param[in] count Size of the states array in entries.
1418  * @return Total output entries.
1419  */
1420 size_t hidGetNpadStatesLucia(HidNpadIdType id, HidNpadLuciaState *states, size_t count);
1421 
1422 /**
1423  * @brief Gets \ref HidNpadLagerState.
1424  * @param[out] states Output array of \ref HidNpadLagerState.
1425  * @param[in] count Size of the states array in entries.
1426  * @return Total output entries.
1427  */
1428 size_t hidGetNpadStatesLager(HidNpadIdType id, HidNpadLagerState *states, size_t count);
1429 
1430 /**
1431  * @brief Gets \ref HidNpadSystemExtState.
1432  * @param[out] states Output array of \ref HidNpadSystemExtState.
1433  * @param[in] count Size of the states array in entries.
1434  * @return Total output entries.
1435  */
1437 
1438 /**
1439  * @brief Gets \ref HidNpadSystemState.
1440  * @param[out] states Output array of \ref HidNpadSystemState.
1441  * @param[in] count Size of the states array in entries.
1442  * @return Total output entries.
1443  */
1444 size_t hidGetNpadStatesSystem(HidNpadIdType id, HidNpadSystemState *states, size_t count);
1445 
1446 /**
1447  * @brief Gets \ref HidSixAxisSensorState for the specified handle.
1448  * @param[in] handle \ref HidSixAxisSensorHandle
1449  * @param[out] states Output array of \ref HidSixAxisSensorState.
1450  * @param[in] count Size of the states array in entries.
1451  * @return Total output entries.
1452  */
1454 
1455 ///@}
1456 
1457 ///@name Gesture
1458 ///@{
1459 
1460 /// Initialize Gesture. Must be called when Gesture is being used.
1462 
1463 /**
1464  * @brief Gets \ref HidGestureState.
1465  * @param[out] states Output array of \ref HidGestureState.
1466  * @param[in] count Size of the states array in entries.
1467  * @return Total output entries.
1468  */
1469 size_t hidGetGestureStates(HidGestureState *states, size_t count);
1470 
1471 ///@}
1472 
1473 /**
1474  * @brief SendKeyboardLockKeyEvent
1475  * @note Same as \ref hidsysSendKeyboardLockKeyEvent.
1476  * @note Only available on [6.0.0+].
1477  * @param[in] events Bitfield of \ref HidKeyboardLockKeyEvent.
1478  */
1480 
1481 /**
1482  * @brief Gets SixAxisSensorHandles.
1483  * @note Only ::HidNpadStyleTag_NpadJoyDual supports total_handles==2.
1484  * @param[out] handles Output array of \ref HidSixAxisSensorHandle.
1485  * @param[in] total_handles Total handles for the handles array. Must be 1 or 2, if 2 handles aren't supported by the specified style an error is thrown.
1486  * @param[in] id \ref HidNpadIdType
1487  * @param[in] style \ref HidNpadStyleTag
1488  */
1490 
1491 /**
1492  * @brief Starts the SixAxisSensor for the specified handle.
1493  * @param[in] handle \ref HidSixAxisSensorHandle
1494  */
1496 
1497 /**
1498  * @brief Stops the SixAxisSensor for the specified handle.
1499  * @param[in] handle \ref HidSixAxisSensorHandle
1500  */
1502 
1503 /**
1504  * @brief IsSixAxisSensorFusionEnabled
1505  * @param[in] handle \ref HidSixAxisSensorHandle
1506  * @param[out] out Output flag.
1507  */
1509 
1510 /**
1511  * @brief EnableSixAxisSensorFusion
1512  * @param[in] handle \ref HidSixAxisSensorHandle
1513  * @param[in] flag Flag
1514  */
1516 
1517 /**
1518  * @brief SetSixAxisSensorFusionParameters
1519  * @param[in] handle \ref HidSixAxisSensorHandle
1520  * @param[in] unk0 Must be 0.0f-1.0f.
1521  * @param[in] unk1 Unknown
1522  */
1524 
1525 /**
1526  * @brief GetSixAxisSensorFusionParameters
1527  * @param[in] handle \ref HidSixAxisSensorHandle
1528  * @param[out] unk0 Unknown
1529  * @param[out] unk1 Unknown
1530  */
1532 
1533 /**
1534  * @brief ResetSixAxisSensorFusionParameters
1535  * @param[in] handle \ref HidSixAxisSensorHandle
1536  */
1538 
1539 /**
1540  * @brief Sets the ::HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle.
1541  * @param[in] handle \ref HidSixAxisSensorHandle
1542  * @param[in] mode \ref HidGyroscopeZeroDriftMode
1543  */
1545 
1546 /**
1547  * @brief Gets the ::HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle.
1548  * @param[in] handle \ref HidSixAxisSensorHandle
1549  * @param[out] mode \ref HidGyroscopeZeroDriftMode
1550  */
1552 
1553 /**
1554  * @brief Resets the ::HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle to ::HidGyroscopeZeroDriftMode_Standard.
1555  * @param[in] handle \ref HidSixAxisSensorHandle
1556  */
1558 
1559 /**
1560  * @brief IsSixAxisSensorAtRest
1561  * @param[in] handle \ref HidSixAxisSensorHandle
1562  * @param[out] out Output flag.
1563  */
1565 
1566 /**
1567  * @brief IsFirmwareUpdateAvailableForSixAxisSensor
1568  * @note Only available on [6.0.0+].
1569  * @param[in] handle \ref HidSixAxisSensorHandle
1570  * @param[out] out Output flag.
1571  */
1573 
1574 /**
1575  * @brief Sets which controller styles are supported.
1576  * @note This is automatically called with the needed styles in \ref hidScanInput when required.
1577  * @param[in] style_set Bitfield of \ref HidNpadStyleTag.
1578  */
1580 
1581 /**
1582  * @brief Gets which controller styles are supported.
1583  * @param[out] style_set Bitfield of \ref HidNpadStyleTag.
1584  */
1586 
1587 /**
1588  * @brief Sets which \ref HidNpadIdType are supported.
1589  * @note This is automatically called with HidNpadIdType_No{1-8} and HidNpadIdType_Handheld when required in \ref hidScanInput.
1590  * @param[in] ids Input array of \ref HidNpadIdType.
1591  * @param[in] count Total entries in the ids array. Must be <=10.
1592  */
1594 
1595 /**
1596  * @brief Gets an Event which is signaled when the \ref hidGetNpadStyleSet output is updated for the specified controller.
1597  * @note The Event must be closed by the user once finished with it.
1598  * @param[in] id \ref HidNpadIdType
1599  * @param[out] out_event Output Event.
1600  * @param[in] autoclear The autoclear for the Event.
1601 **/
1603 
1604 /**
1605  * @brief DisconnectNpad
1606  * @param[in] id \ref HidNpadIdType
1607  */
1609 
1610 /**
1611  * @brief GetPlayerLedPattern
1612  * @param[in] id \ref HidNpadIdType
1613  * @param[out] out Output value.
1614  */
1616 
1617 /**
1618  * @brief Sets the \ref HidNpadJoyHoldType.
1619  * @note Used automatically by \ref hidScanInput when required.
1620  * @param[in] type \ref HidNpadJoyHoldType
1621  */
1623 
1624 /**
1625  * @brief Gets the \ref HidNpadJoyHoldType.
1626  * @param[out] type \ref HidNpadJoyHoldType
1627  */
1629 
1630 /**
1631  * @brief This is the same as \ref hidSetNpadJoyAssignmentModeSingle, except ::HidNpadJoyDeviceType_Left is used for the type.
1632  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
1633  */
1635 
1636 /**
1637  * @brief This is the same as \ref hidSetNpadJoyAssignmentModeSingleWithDestination, except without the output params.
1638  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
1639  * @param[in] type \ref HidNpadJoyDeviceType
1640  */
1642 
1643 /**
1644  * @brief Use this if you want to use a pair of joy-cons as a single HidNpadIdType_No*. When used, both joy-cons in a pair should be used with this (HidNpadIdType_No1 and HidNpadIdType_No2 for example).
1645  * @note Used automatically by \ref hidScanInput when required.
1646  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
1647  */
1649 
1650 /**
1651  * @brief Merge two single joy-cons into a dual-mode controller. Use this after \ref hidSetNpadJoyAssignmentModeDual, when \ref hidSetNpadJoyAssignmentModeSingleByDefault was previously used (this includes using this manually at application exit).
1652  * @brief To be successful, id0/id1 must correspond to controllers supporting styles HidNpadStyleTag_NpadJoyLeft/Right, or HidNpadStyleTag_NpadJoyRight/Left.
1653  * @brief If successful, the id of the resulting dual controller is set to id0.
1654  * @param[in] id0 \ref HidNpadIdType
1655  * @param[in] id1 \ref HidNpadIdType
1656  */
1658 
1659 /**
1660  * @brief StartLrAssignmentMode
1661  */
1663 
1664 /**
1665  * @brief StopLrAssignmentMode
1666  */
1668 
1669 /**
1670  * @brief Sets the \ref HidNpadHandheldActivationMode.
1671  * @param[in] mode \ref HidNpadHandheldActivationMode
1672  */
1674 
1675 /**
1676  * @brief Gets the \ref HidNpadHandheldActivationMode.
1677  * @param[out] out \ref HidNpadHandheldActivationMode
1678  */
1680 
1681 /**
1682  * @brief SwapNpadAssignment
1683  * @param[in] id0 \ref HidNpadIdType
1684  * @param[in] id1 \ref HidNpadIdType
1685  */
1687 
1688 /**
1689  * @brief EnableUnintendedHomeButtonInputProtection
1690  * @note To get the state of this, use \ref hidGetNpadSystemButtonProperties to access HidNpadSystemButtonProperties::is_unintended_home_button_input_protection_enabled.
1691  * @param[in] id \ref HidNpadIdType
1692  * @param[in] flag Whether UnintendedHomeButtonInputProtection is enabled.
1693  */
1695 
1696 /**
1697  * @brief Use this if you want to use a single joy-con as a dedicated HidNpadIdType_No*. When used, both joy-cons in a pair should be used with this (HidNpadIdType_No1 and HidNpadIdType_No2 for example).
1698  * @note Only available on [5.0.0+].
1699  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
1700  * @param[in] type \ref HidNpadJoyDeviceType
1701  * @param[out] flag Whether the dest output is set.
1702  * @param[out] dest \ref HidNpadIdType
1703  */
1705 
1706 /**
1707  * @brief SetNpadAnalogStickUseCenterClamp
1708  * @note Only available on [6.1.0+].
1709  * @param[in] flag Flag
1710  */
1712 
1713 /**
1714  * @brief Assigns the button(s) which trigger the CaptureButton.
1715  * @note Only available on [8.0.0+].
1716  * @param[in] style \ref HidNpadStyleTag, exactly 1 bit must be set.
1717  * @param[in] buttons Bitfield of \ref HidNpadButton, multiple bits can be set.
1718  */
1720 
1721 /**
1722  * @brief ClearNpadCaptureButtonAssignment
1723  * @note Only available on [8.0.0+].
1724  */
1726 
1727 /**
1728  * @brief Gets and initializes vibration handles.
1729  * @note Only the following styles support total_handles 2: ::HidNpadStyleTag_NpadFullKey, ::HidNpadStyleTag_NpadHandheld, ::HidNpadStyleTag_NpadJoyDual, ::HidNpadStyleTag_NpadHandheldLark, ::HidNpadStyleTag_NpadSystem, ::HidNpadStyleTag_NpadSystemExt.
1730  * @param[out] handles Output array of \ref HidVibrationDeviceHandle.
1731  * @param[in] total_handles Total handles for the handles array. Must be 1 or 2, if 2 handles aren't supported by the specified style an error is thrown.
1732  * @param[in] id \ref HidNpadIdType
1733  * @param[in] style \ref HidNpadStyleTag
1734  */
1736 
1737 /**
1738  * @brief Gets \ref HidVibrationDeviceInfo for the specified device.
1739  * @param[in] handle \ref HidVibrationDeviceHandle
1740  * @param[out] out \ref HidVibrationDeviceInfo
1741  */
1743 
1744 /**
1745  * @brief Sends the \ref HidVibrationDeviceHandle to the specified device.
1746  * @note With ::HidVibrationDeviceType_GcErm, use \ref hidSendVibrationGcErmCommand instead.
1747  * @param[in] handle \ref HidVibrationDeviceHandle
1748  * @param[in] value \ref HidVibrationValue
1749  */
1751 
1752 /**
1753  * @brief Gets the current \ref HidVibrationValue for the specified device.
1754  * @note With ::HidVibrationDeviceType_GcErm, use \ref hidGetActualVibrationGcErmCommand instead.
1755  * @param[in] handle \ref HidVibrationDeviceHandle
1756  * @param[out] out \ref HidVibrationValue
1757  */
1759 
1760 /**
1761  * @brief Sets whether vibration is allowed, this also affects the config displayed by System Settings.
1762  * @param[in] flag Flag
1763  */
1765 
1766 /**
1767  * @brief Gets whether vibration is allowed.
1768  * @param[out] flag Flag
1769  */
1771 
1772 /**
1773  * @brief Send vibration values[index] to handles[index].
1774  * @note With ::HidVibrationDeviceType_GcErm, use \ref hidSendVibrationGcErmCommand instead.
1775  * @param[in] handles Input array of \ref HidVibrationDeviceHandle.
1776  * @param[in] values Input array of \ref HidVibrationValue.
1777  * @param[in] count Total entries in the handles/values arrays.
1778  */
1780 
1781 /**
1782  * @brief Send \ref HidVibrationGcErmCommand to the specified device, for ::HidVibrationDeviceType_GcErm.
1783  * @note Only available on [4.0.0+].
1784  * @param[in] handle \ref HidVibrationDeviceHandle
1785  * @param[in] cmd \ref HidVibrationGcErmCommand
1786  */
1788 
1789 /**
1790  * @brief Get \ref HidVibrationGcErmCommand for the specified device, for ::HidVibrationDeviceType_GcErm.
1791  * @note Only available on [4.0.0+].
1792  * @param[in] handle \ref HidVibrationDeviceHandle
1793  * @param[out] out \ref HidVibrationGcErmCommand
1794  */
1796 
1797 /**
1798  * @brief Begins a forced-permitted vibration session.
1799  * @note Only available on [4.0.0+].
1800  */
1802 
1803 /**
1804  * @brief Ends the session started by \ref hidBeginPermitVibrationSession.
1805  * @note Only available on [4.0.0+].
1806  */
1808 
1809 /**
1810  * @brief Gets whether vibration is available with the specified device.
1811  * @note Only available on [7.0.0+].
1812  * @param[in] handle \ref HidVibrationDeviceHandle
1813  * @param[out] flag Flag
1814  */
1816 
1817 /**
1818  * @brief Starts the SevenSixAxisSensor.
1819  * @note Only available on [5.0.0+].
1820  */
1822 
1823 /**
1824  * @brief Stops the SevenSixAxisSensor.
1825  * @note Only available on [5.0.0+].
1826  */
1828 
1829 /**
1830  * @brief Initializes the SevenSixAxisSensor.
1831  * @note Only available on [5.0.0+].
1832  */
1834 
1835 /**
1836  * @brief Finalizes the SevenSixAxisSensor.
1837  * @note This must be called before \ref hidExit.
1838  * @note Only available on [5.0.0+].
1839  */
1841 
1842 /**
1843  * @brief Sets the SevenSixAxisSensor FusionStrength.
1844  * @note Only available on [5.0.0+].
1845  * @param[in] strength Strength
1846  */
1848 
1849 /**
1850  * @brief Gets the SevenSixAxisSensor FusionStrength.
1851  * @note Only available on [5.0.0+].
1852  * @param[out] strength Strength
1853  */
1855 
1856 /**
1857  * @brief Resets the timestamp for the SevenSixAxisSensor.
1858  * @note Only available on [6.0.0+].
1859  */
1861 
1862 /**
1863  * @brief GetSevenSixAxisSensorStates
1864  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
1865  * @param[out] states Output array of \ref HidSevenSixAxisSensorState.
1866  * @param[in] count Size of the states array in entries.
1867  * @param[out] total_out Total output entries.
1868  */
1869 Result hidGetSevenSixAxisSensorStates(HidSevenSixAxisSensorState *states, size_t count, size_t *total_out);
1870 
1871 /**
1872  * @brief IsSevenSixAxisSensorAtRest
1873  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
1874  * @param[out] out Output flag.
1875  */
1877 
1878 /**
1879  * @brief GetSensorFusionError
1880  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
1881  * @param[out] out Output data.
1882  */
1884 
1885 /**
1886  * @brief GetGyroBias
1887  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
1888  * @param[out] out \ref UtilFloat3
1889  */
1891 
1892 /**
1893  * @brief IsUsbFullKeyControllerEnabled
1894  * @note Only available on [3.0.0+].
1895  * @param[out] out Output flag.
1896  */
1898 
1899 /**
1900  * @brief EnableUsbFullKeyController
1901  * @note Only available on [3.0.0+].
1902  * @param[in] flag Flag
1903  */
1905 
1906 /**
1907  * @brief IsUsbFullKeyControllerConnected
1908  * @note Only available on [3.0.0+].
1909  * @param[in] id \ref HidNpadIdType
1910  * @param[out] out Output flag.
1911  */
1913 
1914 /**
1915  * @brief Gets the \ref HidNpadInterfaceType for the specified controller.
1916  * @note When available, \ref hidsysGetNpadInterfaceType should be used instead.
1917  * @note Only available on [4.0.0+].
1918  * @param[in] id \ref HidNpadIdType
1919  * @param[out] out \ref HidNpadInterfaceType
1920  */
1922 
1923 /**
1924  * @brief GetNpadOfHighestBatteryLevel
1925  * @note Only available on [10.0.0+].
1926  * @param[in] ids Input array of \ref HidNpadIdType, ::HidNpadIdType_Handheld is ignored.
1927  * @param[in] count Total entries in the ids array.
1928  * @param[out] out \ref HidNpadIdType
1929  */
1931 
1932 ///@name Palma, see ::HidNpadStyleTag_NpadPalma.
1933 ///@{
1934 
1935 /**
1936  * @brief GetPalmaConnectionHandle
1937  * @note Only available on [5.0.0+].
1938  * @param[in] id \ref HidNpadIdType
1939  * @param[out] out \ref HidPalmaConnectionHandle
1940  */
1942 
1943 /**
1944  * @brief InitializePalma
1945  * @note Only available on [5.0.0+].
1946  * @param[in] handle \ref HidPalmaConnectionHandle
1947  */
1949 
1950 /**
1951  * @brief Gets an Event which is signaled when data is available with \ref hidGetPalmaOperationInfo.
1952  * @note The Event must be closed by the user once finished with it.
1953  * @note Only available on [5.0.0+].
1954  * @param[in] handle \ref HidPalmaConnectionHandle
1955  * @param[out] out_event Output Event.
1956  * @param[in] autoclear The autoclear for the Event.
1957 **/
1959 
1960 /**
1961  * @brief Gets \ref HidPalmaOperationInfo for a completed operation.
1962  * @note This must be used at some point following using any of the other Palma cmds which trigger an Operation, once the Event from \ref hidAcquirePalmaOperationCompleteEvent is signaled. Up to 4 Operations can be queued at once, the other cmds will throw an error once there's too many operations.
1963  * @note Only available on [5.0.0+].
1964  * @param[in] handle \ref HidPalmaConnectionHandle
1965  * @param[out] out \ref HidPalmaOperationInfo
1966  */
1968 
1969 /**
1970  * @brief PlayPalmaActivity
1971  * @note See \ref hidGetPalmaOperationInfo.
1972  * @note Only available on [5.0.0+].
1973  * @param[in] handle \ref HidPalmaConnectionHandle
1974  * @param[in] val Input value.
1975  */
1977 
1978 /**
1979  * @brief SetPalmaFrModeType
1980  * @note See \ref hidGetPalmaOperationInfo.
1981  * @note Only available on [5.0.0+].
1982  * @param[in] handle \ref HidPalmaConnectionHandle
1983  * @param[in] type \ref HidPalmaFrModeType
1984  */
1986 
1987 /**
1988  * @brief ReadPalmaStep
1989  * @note See \ref hidGetPalmaOperationInfo.
1990  * @note \ref hidEnablePalmaStep should be used before this.
1991  * @note Only available on [5.0.0+].
1992  * @param[in] handle \ref HidPalmaConnectionHandle
1993  */
1995 
1996 /**
1997  * @brief EnablePalmaStep
1998  * @note See \ref hidGetPalmaOperationInfo.
1999  * @note Only available on [5.0.0+].
2000  * @param[in] handle \ref HidPalmaConnectionHandle
2001  * @param[in] flag Flag
2002  */
2004 
2005 /**
2006  * @brief ResetPalmaStep
2007  * @note See \ref hidGetPalmaOperationInfo.
2008  * @note Only available on [5.0.0+].
2009  * @param[in] handle \ref HidPalmaConnectionHandle
2010  */
2012 
2013 /**
2014  * @brief ReadPalmaApplicationSection
2015  * @note See \ref hidGetPalmaOperationInfo.
2016  * @note Only available on [5.0.0+].
2017  * @param[in] handle \ref HidPalmaConnectionHandle
2018  * @param[in] inval0 First input value.
2019  * @param[in] size This must be within the size of \ref HidPalmaApplicationSectionAccessBuffer.
2020  */
2022 
2023 /**
2024  * @brief WritePalmaApplicationSection
2025  * @note See \ref hidGetPalmaOperationInfo.
2026  * @note Only available on [5.0.0+].
2027  * @param[in] handle \ref HidPalmaConnectionHandle
2028  * @param[in] inval0 First input value.
2029  * @param[in] size Size of the data in \ref HidPalmaApplicationSectionAccessBuffer.
2030  * @param[in] buf \ref HidPalmaApplicationSectionAccessBuffer
2031  */
2033 
2034 /**
2035  * @brief ReadPalmaUniqueCode
2036  * @note See \ref hidGetPalmaOperationInfo.
2037  * @note Only available on [5.0.0+].
2038  * @param[in] handle \ref HidPalmaConnectionHandle
2039  */
2041 
2042 /**
2043  * @brief SetPalmaUniqueCodeInvalid
2044  * @note See \ref hidGetPalmaOperationInfo.
2045  * @note Only available on [5.0.0+].
2046  * @param[in] handle \ref HidPalmaConnectionHandle
2047  */
2049 
2050 /**
2051  * @brief WritePalmaActivityEntry
2052  * @note See \ref hidGetPalmaOperationInfo.
2053  * @note Only available on [5.0.0+].
2054  * @param[in] handle \ref HidPalmaConnectionHandle
2055  * @param[in] unk Unknown
2056  * @param[in] entry \ref HidPalmaActivityEntry
2057  */
2059 
2060 /**
2061  * @brief WritePalmaRgbLedPatternEntry
2062  * @note See \ref hidGetPalmaOperationInfo.
2063  * @note Only available on [5.0.0+].
2064  * @param[in] handle \ref HidPalmaConnectionHandle
2065  * @param[in] unk Unknown
2066  * @param[in] buffer Input buffer.
2067  * @param[in] size Input buffer size.
2068  */
2069 Result hidWritePalmaRgbLedPatternEntry(HidPalmaConnectionHandle handle, u16 unk, const void* buffer, size_t size);
2070 
2071 /**
2072  * @brief WritePalmaWaveEntry
2073  * @note See \ref hidGetPalmaOperationInfo.
2074  * @note Only available on [5.0.0+].
2075  * @param[in] handle \ref HidPalmaConnectionHandle
2076  * @param[in] wave_set \ref HidPalmaWaveSet
2077  * @param[in] unk Unknown
2078  * @param[in] buffer TransferMemory buffer, must be 0x1000-byte aligned.
2079  * @param[in] tmem_size TransferMemory buffer size, must be 0x1000-byte aligned.
2080  * @param[in] size Actual size of the data in the buffer.
2081  */
2082 Result hidWritePalmaWaveEntry(HidPalmaConnectionHandle handle, HidPalmaWaveSet wave_set, u16 unk, const void* buffer, size_t tmem_size, size_t size);
2083 
2084 /**
2085  * @brief SetPalmaDataBaseIdentificationVersion
2086  * @note See \ref hidGetPalmaOperationInfo.
2087  * @note Only available on [5.0.0+].
2088  * @param[in] handle \ref HidPalmaConnectionHandle
2089  * @param[in] version Version
2090  */
2092 
2093 /**
2094  * @brief GetPalmaDataBaseIdentificationVersion
2095  * @note See \ref hidGetPalmaOperationInfo.
2096  * @note Only available on [5.0.0+].
2097  * @param[in] handle \ref HidPalmaConnectionHandle
2098  */
2100 
2101 /**
2102  * @brief SuspendPalmaFeature
2103  * @note See \ref hidGetPalmaOperationInfo.
2104  * @note Only available on [5.0.0+].
2105  * @param[in] handle \ref HidPalmaConnectionHandle
2106  * @param[in] features Bitfield of \ref HidPalmaFeature.
2107  */
2109 
2110 /**
2111  * @brief ReadPalmaPlayLog
2112  * @note See \ref hidGetPalmaOperationInfo.
2113  * @note Only available on [5.1.0+].
2114  * @param[in] handle \ref HidPalmaConnectionHandle
2115  * @param[in] unk Unknown
2116  */
2118 
2119 /**
2120  * @brief ResetPalmaPlayLog
2121  * @note See \ref hidGetPalmaOperationInfo.
2122  * @note Only available on [5.1.0+].
2123  * @param[in] handle \ref HidPalmaConnectionHandle
2124  * @param[in] unk Unknown
2125  */
2127 
2128 /**
2129  * @brief Sets whether any Palma can connect.
2130  * @note Only available on [5.1.0+].
2131  * @param[in] flag Flag
2132  */
2134 
2135 /**
2136  * @brief Sets whether paired Palma can connect.
2137  * @note Only available on [5.1.0+].
2138  * @param[in] flag Flag
2139  */
2141 
2142 /**
2143  * @brief PairPalma
2144  * @note Only available on [5.1.0+].
2145  * @param[in] handle \ref HidPalmaConnectionHandle
2146  */
2148 
2149 /**
2150  * @brief CancelWritePalmaWaveEntry
2151  * @note Only available on [7.0.0+].
2152  * @param[in] handle \ref HidPalmaConnectionHandle
2153  */
2155 
2156 /**
2157  * @brief EnablePalmaBoostMode
2158  * @note Only available on [5.1.0+]. Uses cmd EnablePalmaBoostMode on [8.0.0+], otherwise cmd SetPalmaBoostMode is used.
2159  * @param[in] flag Flag
2160  */
2162 
2163 /**
2164  * @brief GetPalmaBluetoothAddress
2165  * @note Only available on [8.0.0+].
2166  * @param[in] handle \ref HidPalmaConnectionHandle
2167  * @param[out] out \ref BtdrvAddress
2168  */
2170 
2171 /**
2172  * @brief SetDisallowedPalmaConnection
2173  * @note Only available on [8.0.0+].
2174  * @param[in] addrs Input array of \ref BtdrvAddress.
2175  * @param[in] count Total entries in the addrs array.
2176  */
2178 
2179 ///@}
2180 
2181 /**
2182  * @brief SetNpadCommunicationMode
2183  * @note [2.0.0+] Stubbed, just returns 0.
2184  * @param[in] mode \ref HidNpadCommunicationMode
2185  */
2187 
2188 /**
2189  * @brief GetNpadCommunicationMode
2190  * @note [2.0.0+] Stubbed, always returns output mode ::HidNpadCommunicationMode_Default.
2191  * @param[out] out \ref HidNpadCommunicationMode
2192  */
2194 
2195 /**
2196  * @brief SetTouchScreenConfiguration
2197  * @note Only available on [9.0.0+].
2198  * @param[in] config \ref HidTouchScreenConfigurationForNx
2199  */
2201 
2202 /**
2203  * @brief IsFirmwareUpdateNeededForNotification
2204  * @note Only available on [9.0.0+].
2205  * @param[out] out Output flag.
2206  */
Result hidSendVibrationGcErmCommand(HidVibrationDeviceHandle handle, HidVibrationGcErmCommand cmd)
Send HidVibrationGcErmCommand to the specified device, for HidVibrationDeviceType_GcErm.
HidKeyboardModifier
HidKeyboardModifier.
Definition: hid.h:187
size_t hidGetNpadStatesHandheld(HidNpadIdType id, HidNpadHandheldState *states, size_t count)
Gets HidNpadHandheldState.
Result hidSetNpadJoyAssignmentModeSingle(HidNpadIdType id, HidNpadJoyDeviceType type)
This is the same as hidSetNpadJoyAssignmentModeSingleWithDestination, except without the output param...
Result hidSetNpadCaptureButtonAssignment(HidNpadStyleTag style, u64 buttons)
Assigns the button(s) which trigger the CaptureButton.
Result hidSetTouchScreenConfiguration(const HidTouchScreenConfigurationForNx *config)
SetTouchScreenConfiguration.
Result hidSetPalmaFrModeType(HidPalmaConnectionHandle handle, HidPalmaFrModeType type)
SetPalmaFrModeType.
Result hidReadPalmaStep(HidPalmaConnectionHandle handle)
ReadPalmaStep.
Result hidSetNpadJoyAssignmentModeSingleByDefault(HidNpadIdType id)
This is the same as hidSetNpadJoyAssignmentModeSingle, except HidNpadJoyDeviceType_Left is used for t...
Result hidIsSevenSixAxisSensorAtRest(bool *out)
IsSevenSixAxisSensorAtRest.
u32 hidGetNpadDeviceType(HidNpadIdType id)
Gets the DeviceType for the specified Npad.
Result hidGetNpadHandheldActivationMode(HidNpadHandheldActivationMode *out)
Gets the HidNpadHandheldActivationMode.
Result hidStopSevenSixAxisSensor(void)
Stops the SevenSixAxisSensor.
Result hidInitialize(void)
Initialize hid. Called automatically during app startup.
HidPalmaFeature
PalmaFeature.
Definition: hid.h:576
@ HidPalmaFeature_Step
Step.
Definition: hid.h:579
@ HidPalmaFeature_MuteSwitch
MuteSwitch.
Definition: hid.h:580
@ HidPalmaFeature_RumbleFeedback
RumbleFeedback.
Definition: hid.h:578
@ HidPalmaFeature_FrMode
FrMode.
Definition: hid.h:577
HidColorAttribute
HidColorAttribute.
Definition: hid.h:249
@ HidColorAttribute_Ok
Ok.
Definition: hid.h:250
@ HidColorAttribute_NoController
NoController.
Definition: hid.h:252
@ HidColorAttribute_ReadError
ReadError.
Definition: hid.h:251
Result hidFinalizeSevenSixAxisSensor(void)
Finalizes the SevenSixAxisSensor.
Result hidStartLrAssignmentMode(void)
StartLrAssignmentMode.
HidNpadCommonState HidNpadSystemState
State for HidNpadStyleTag_NpadSystem. Analog-sticks state are always zero. Only the following button ...
Definition: hid.h:845
Result hidSetGyroscopeZeroDriftMode(HidSixAxisSensorHandle handle, HidGyroscopeZeroDriftMode mode)
Sets the HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle.
size_t hidGetSixAxisSensorStates(HidSixAxisSensorHandle handle, HidSixAxisSensorState *states, size_t count)
Gets HidSixAxisSensorState for the specified handle.
Result hidMergeSingleJoyAsDualJoy(HidNpadIdType id0, HidNpadIdType id1)
Merge two single joy-cons into a dual-mode controller.
void hidGetNpadSystemProperties(HidNpadIdType id, HidNpadSystemProperties *out)
Gets the HidNpadSystemProperties for the specified Npad.
Result hidPlayPalmaActivity(HidPalmaConnectionHandle handle, u16 val)
PlayPalmaActivity.
Result hidSendVibrationValues(const HidVibrationDeviceHandle *handles, const HidVibrationValue *values, s32 count)
Send vibration values[index] to handles[index].
Result hidGetNpadCommunicationMode(HidNpadCommunicationMode *out)
GetNpadCommunicationMode.
Result hidGetNpadControllerColorSingle(HidNpadIdType id, HidNpadControllerColor *color)
Gets the main HidNpadControllerColor for the specified Npad.
Result hidIsVibrationDeviceMounted(HidVibrationDeviceHandle handle, bool *flag)
Gets whether vibration is available with the specified device.
size_t hidGetMouseStates(HidMouseState *states, size_t count)
Gets HidMouseState.
HidGestureAttribute
HidGestureAttribute.
Definition: hid.h:335
@ HidGestureAttribute_IsNewTouch
IsNewTouch.
Definition: hid.h:336
@ HidGestureAttribute_IsDoubleTap
IsDoubleTap.
Definition: hid.h:337
HidAppletFooterUiType
AppletFooterUiType (system)
Definition: hid.h:451
@ HidAppletFooterUiType_LarkNesLeft
LarkNesLeft.
Definition: hid.h:469
@ HidAppletFooterUiType_JoyLeftHorizontal
JoyLeftHorizontal.
Definition: hid.h:460
@ HidAppletFooterUiType_Verification
Verification.
Definition: hid.h:472
@ HidAppletFooterUiType_LarkHvc2
LarkHvc2.
Definition: hid.h:468
@ HidAppletFooterUiType_SwitchProController
SwitchProController.
Definition: hid.h:464
@ HidAppletFooterUiType_HandheldJoyConLeftJoyConRight
HandheldJoyConLeftJoyConRight.
Definition: hid.h:456
@ HidAppletFooterUiType_Lagon
[13.0.0+] Lagon
Definition: hid.h:473
@ HidAppletFooterUiType_JoyRightVertical
JoyRightVertical.
Definition: hid.h:463
@ HidAppletFooterUiType_HandheldJoyConLeftOnly
HandheldJoyConLeftOnly.
Definition: hid.h:454
@ HidAppletFooterUiType_None
None.
Definition: hid.h:452
@ HidAppletFooterUiType_LarkHvc1
LarkHvc1.
Definition: hid.h:467
@ HidAppletFooterUiType_JoyLeftVertical
JoyLeftVertical.
Definition: hid.h:461
@ HidAppletFooterUiType_JoyDualRightOnly
JoyDualRightOnly.
Definition: hid.h:459
@ HidAppletFooterUiType_JoyDual
JoyDual.
Definition: hid.h:457
@ HidAppletFooterUiType_CompatibleProController
CompatibleProController.
Definition: hid.h:465
@ HidAppletFooterUiType_JoyRightHorizontal
JoyRightHorizontal.
Definition: hid.h:462
@ HidAppletFooterUiType_JoyDualLeftOnly
JoyDualLeftOnly.
Definition: hid.h:458
@ HidAppletFooterUiType_HandheldNone
HandheldNone.
Definition: hid.h:453
@ HidAppletFooterUiType_Lucia
Lucia.
Definition: hid.h:471
@ HidAppletFooterUiType_CompatibleJoyCon
CompatibleJoyCon.
Definition: hid.h:466
@ HidAppletFooterUiType_LarkNesRight
LarkNesRight.
Definition: hid.h:470
@ HidAppletFooterUiType_HandheldJoyConRightOnly
HandheldJoyConRightOnly.
Definition: hid.h:455
Result hidSetPalmaDataBaseIdentificationVersion(HidPalmaConnectionHandle handle, s32 version)
SetPalmaDataBaseIdentificationVersion.
HidDebugPadButton
HidDebugPadButton.
Definition: hid.h:17
@ HidDebugPadButton_ZL
ZL button.
Definition: hid.h:24
@ HidDebugPadButton_Select
Select button.
Definition: hid.h:27
@ HidDebugPadButton_Up
D-Pad Up button.
Definition: hid.h:29
@ HidDebugPadButton_Y
Y button.
Definition: hid.h:21
@ HidDebugPadButton_Right
D-Pad Right button.
Definition: hid.h:30
@ HidDebugPadButton_Start
Start button.
Definition: hid.h:26
@ HidDebugPadButton_X
X button.
Definition: hid.h:20
@ HidDebugPadButton_ZR
ZR button.
Definition: hid.h:25
@ HidDebugPadButton_L
L button.
Definition: hid.h:22
@ HidDebugPadButton_R
R button.
Definition: hid.h:23
@ HidDebugPadButton_B
B button.
Definition: hid.h:19
@ HidDebugPadButton_Down
D-Pad Down button.
Definition: hid.h:31
@ HidDebugPadButton_A
A button.
Definition: hid.h:18
@ HidDebugPadButton_Left
D-Pad Left button.
Definition: hid.h:28
Result hidInitializePalma(HidPalmaConnectionHandle handle)
InitializePalma.
size_t hidGetNpadStatesHandheldLark(HidNpadIdType id, HidNpadHandheldLarkState *states, size_t count)
Gets HidNpadHandheldLarkState.
Result hidAcquirePalmaOperationCompleteEvent(HidPalmaConnectionHandle handle, Event *out_event, bool autoclear)
Gets an Event which is signaled when data is available with hidGetPalmaOperationInfo.
HidDebugPadAttribute
HidDebugPadAttribute.
Definition: hid.h:302
@ HidDebugPadAttribute_IsConnected
IsConnected.
Definition: hid.h:303
size_t hidGetNpadStatesSystem(HidNpadIdType id, HidNpadSystemState *states, size_t count)
Gets HidNpadSystemState.
HidNpadCommonState HidNpadJoyLeftState
State for HidNpadStyleTag_NpadJoyLeft.
Definition: hid.h:793
Result hidIsSixAxisSensorFusionEnabled(HidSixAxisSensorHandle handle, bool *out)
IsSixAxisSensorFusionEnabled.
Result hidGetSevenSixAxisSensorStates(HidSevenSixAxisSensorState *states, size_t count, size_t *total_out)
GetSevenSixAxisSensorStates.
Result hidIsFirmwareUpdateNeededForNotification(bool *out)
IsFirmwareUpdateNeededForNotification.
u32 hidGetAppletFooterUiAttributesSet(HidNpadIdType id)
Gets the AppletFooterUiAttributesSet for the specified Npad.
HidKeyboardKey
HidKeyboardKey.
Definition: hid.h:51
Result hidSetSixAxisSensorFusionParameters(HidSixAxisSensorHandle handle, float unk0, float unk1)
SetSixAxisSensorFusionParameters.
HidNpadCommonState HidNpadJoyRightState
State for HidNpadStyleTag_NpadJoyRight.
Definition: hid.h:794
Result hidIsFirmwareUpdateAvailableForSixAxisSensor(HidSixAxisSensorHandle handle, bool *out)
IsFirmwareUpdateAvailableForSixAxisSensor.
HidMouseButton
HidMouseButton.
Definition: hid.h:42
void hidInitializeGesture(void)
Initialize Gesture. Must be called when Gesture is being used.
size_t hidGetNpadStatesLark(HidNpadIdType id, HidNpadLarkState *states, size_t count)
Gets HidNpadLarkState.
HidNpadLagerType hidGetNpadLagerType(HidNpadIdType id)
Gets HidNpadLagerType for the specified Npad.
HidNpadCommonState HidNpadFullKeyState
State for HidNpadStyleTag_NpadFullKey.
Definition: hid.h:790
size_t hidGetNpadStatesJoyDual(HidNpadIdType id, HidNpadJoyDualState *states, size_t count)
Gets HidNpadJoyDualState.
Result hidSwapNpadAssignment(HidNpadIdType id0, HidNpadIdType id1)
SwapNpadAssignment.
HidKeyboardLockKeyEvent
KeyboardLockKeyEvent.
Definition: hid.h:201
@ HidKeyboardLockKeyEvent_CapsLockToggle
CapsLockToggle.
Definition: hid.h:207
@ HidKeyboardLockKeyEvent_ScrollLockToggle
ScrollLockToggle.
Definition: hid.h:210
@ HidKeyboardLockKeyEvent_CapsLockOff
CapsLockOff.
Definition: hid.h:206
@ HidKeyboardLockKeyEvent_ScrollLockOn
ScrollLockOn.
Definition: hid.h:208
@ HidKeyboardLockKeyEvent_NumLockToggle
NumLockToggle.
Definition: hid.h:204
@ HidKeyboardLockKeyEvent_NumLockOn
NumLockOn.
Definition: hid.h:202
@ HidKeyboardLockKeyEvent_ScrollLockOff
ScrollLockOff.
Definition: hid.h:209
@ HidKeyboardLockKeyEvent_NumLockOff
NumLockOff.
Definition: hid.h:203
@ HidKeyboardLockKeyEvent_CapsLockOn
CapsLockOn.
Definition: hid.h:205
HidGestureType
HidGestureType.
Definition: hid.h:350
@ HidGestureType_Touch
Touch.
Definition: hid.h:354
@ HidGestureType_Rotate
Rotate.
Definition: hid.h:360
@ HidGestureType_Press
Press.
Definition: hid.h:355
@ HidGestureType_Complete
Complete.
Definition: hid.h:352
@ HidGestureType_Tap
Tap.
Definition: hid.h:356
@ HidGestureType_Cancel
Cancel.
Definition: hid.h:353
@ HidGestureType_Pan
Pan.
Definition: hid.h:357
@ HidGestureType_Pinch
Pinch.
Definition: hid.h:359
@ HidGestureType_Idle
Idle.
Definition: hid.h:351
@ HidGestureType_Swipe
Swipe.
Definition: hid.h:358
Result hidGetNpadControllerColorSplit(HidNpadIdType id, HidNpadControllerColor *color_left, HidNpadControllerColor *color_right)
Gets the left/right HidNpadControllerColor for the specified Npad (Joy-Con pair in dual mode).
Result hidEnableUnintendedHomeButtonInputProtection(HidNpadIdType id, bool flag)
EnableUnintendedHomeButtonInputProtection.
HidGyroscopeZeroDriftMode
GyroscopeZeroDriftMode.
Definition: hid.h:364
@ HidGyroscopeZeroDriftMode_Standard
Standard.
Definition: hid.h:366
@ HidGyroscopeZeroDriftMode_Loose
Loose.
Definition: hid.h:365
@ HidGyroscopeZeroDriftMode_Tight
Tight.
Definition: hid.h:367
HidNpadCommonState HidNpadJoyDualState
State for HidNpadStyleTag_NpadJoyDual.
Definition: hid.h:792
Result hidGetGyroBias(UtilFloat3 *out)
GetGyroBias.
Result hidEnablePalmaStep(HidPalmaConnectionHandle handle, bool flag)
EnablePalmaStep.
Result hidResetPalmaPlayLog(HidPalmaConnectionHandle handle, u16 unk)
ResetPalmaPlayLog.
Result hidSetPalmaUniqueCodeInvalid(HidPalmaConnectionHandle handle)
SetPalmaUniqueCodeInvalid.
Result hidDisconnectNpad(HidNpadIdType id)
DisconnectNpad.
void hidInitializeKeyboard(void)
Initialize Keyboard. Must be called when Keyboard is being used. Used automatically by hidScanInput w...
HidNpadCommonState HidNpadPalmaState
State for HidNpadStyleTag_NpadPalma.
Definition: hid.h:808
HidDeviceTypeBits
DeviceType (system)
Definition: hid.h:404
@ HidDeviceTypeBits_Palma
Poké Ball Plus controller.
Definition: hid.h:411
@ HidDeviceTypeBits_LarkNesLeft
NES left controller.
Definition: hid.h:414
@ HidDeviceTypeBits_LarkHvcRight
Famicom right controller (with microphone).
Definition: hid.h:413
@ HidDeviceTypeBits_JoyLeft
Joy-Con left controller.
Definition: hid.h:409
@ HidDeviceTypeBits_Lagon
N64 controller.
Definition: hid.h:421
@ HidDeviceTypeBits_FullKey
Pro Controller and Gc controller.
Definition: hid.h:405
@ HidDeviceTypeBits_Lucia
SNES controller.
Definition: hid.h:420
@ HidDeviceTypeBits_HandheldLarkNesRight
NES right controller in handheld mode.
Definition: hid.h:419
@ HidDeviceTypeBits_HandheldLarkHvcRight
Famicom right controller (with microphone) in handheld mode.
Definition: hid.h:417
@ HidDeviceTypeBits_HandheldLarkNesLeft
NES left controller in handheld mode.
Definition: hid.h:418
@ HidDeviceTypeBits_HandheldLeft
Joy-Con/Famicom/NES left controller in handheld mode.
Definition: hid.h:407
@ HidDeviceTypeBits_JoyRight
Joy-Con right controller.
Definition: hid.h:410
@ HidDeviceTypeBits_Lager
Sega Genesis controller.
Definition: hid.h:422
@ HidDeviceTypeBits_DebugPad
DebugPad.
Definition: hid.h:406
@ HidDeviceTypeBits_LarkNesRight
NES right controller.
Definition: hid.h:415
@ HidDeviceTypeBits_System
Generic controller.
Definition: hid.h:423
@ HidDeviceTypeBits_HandheldLarkHvcLeft
Famicom left controller in handheld mode.
Definition: hid.h:416
@ HidDeviceTypeBits_HandheldRight
Joy-Con/Famicom/NES right controller in handheld mode.
Definition: hid.h:408
@ HidDeviceTypeBits_LarkHvcLeft
Famicom left controller.
Definition: hid.h:412
HidSixAxisSensorAttribute
HidSixAxisSensorAttribute.
Definition: hid.h:329
@ HidSixAxisSensorAttribute_IsInterpolated
IsInterpolated.
Definition: hid.h:331
@ HidSixAxisSensorAttribute_IsConnected
IsConnected.
Definition: hid.h:330
HidGestureDirection
HidGestureDirection.
Definition: hid.h:341
@ HidGestureDirection_Down
Down.
Definition: hid.h:346
@ HidGestureDirection_Right
Right.
Definition: hid.h:345
@ HidGestureDirection_Up
Up.
Definition: hid.h:344
@ HidGestureDirection_Left
Left.
Definition: hid.h:343
@ HidGestureDirection_None
None.
Definition: hid.h:342
size_t hidGetKeyboardStates(HidKeyboardState *states, size_t count)
Gets HidKeyboardState.
Result hidEnableSixAxisSensorFusion(HidSixAxisSensorHandle handle, bool flag)
EnableSixAxisSensorFusion.
HidNpadJoyAssignmentMode
NpadJoyAssignmentMode.
Definition: hid.h:390
@ HidNpadJoyAssignmentMode_Dual
Dual (Set by hidSetNpadJoyAssignmentModeDual)
Definition: hid.h:391
@ HidNpadJoyAssignmentMode_Single
Single (Set by hidSetNpadJoyAssignmentModeSingle*())
Definition: hid.h:392
HidNpadInterfaceType
NpadInterfaceType (system)
Definition: hid.h:477
@ HidNpadInterfaceType_Bluetooth
Bluetooth.
Definition: hid.h:478
@ HidNpadInterfaceType_Rail
Rail.
Definition: hid.h:479
@ HidNpadInterfaceType_USB
USB.
Definition: hid.h:480
@ HidNpadInterfaceType_Unknown4
Unknown.
Definition: hid.h:481
Result hidBeginPermitVibrationSession(void)
Begins a forced-permitted vibration session.
HidVibrationDeviceType
Type values for HidVibrationDeviceInfo::type.
Definition: hid.h:518
@ HidVibrationDeviceType_LinearResonantActuator
LinearResonantActuator.
Definition: hid.h:520
@ HidVibrationDeviceType_Unknown
Unknown.
Definition: hid.h:519
@ HidVibrationDeviceType_GcErm
GcErm (HidNpadStyleTag_NpadGc)
Definition: hid.h:521
Result hidReadPalmaPlayLog(HidPalmaConnectionHandle handle, u16 unk)
ReadPalmaPlayLog.
size_t hidGetNpadStatesJoyLeft(HidNpadIdType id, HidNpadJoyLeftState *states, size_t count)
Gets HidNpadJoyLeftState.
HidTouchAttribute
HidTouchAttribute.
Definition: hid.h:307
@ HidTouchAttribute_End
End.
Definition: hid.h:309
@ HidTouchAttribute_Start
Start.
Definition: hid.h:308
HidNpadJoyAssignmentMode hidGetNpadJoyAssignment(HidNpadIdType id)
Gets the HidNpadJoyAssignmentMode for the specified Npad.
void hidInitializeNpad(void)
Initialize Npad. Must be called when Npad is being used. Used automatically by hidScanInput when requ...
Result hidClearNpadCaptureButtonAssignment(void)
ClearNpadCaptureButtonAssignment.
Result hidResetPalmaStep(HidPalmaConnectionHandle handle)
ResetPalmaStep.
Result hidGetPalmaDataBaseIdentificationVersion(HidPalmaConnectionHandle handle)
GetPalmaDataBaseIdentificationVersion.
Result hidSetNpadJoyAssignmentModeDual(HidNpadIdType id)
Use this if you want to use a pair of joy-cons as a single HidNpadIdType_No*.
Result hidSetNpadJoyHoldType(HidNpadJoyHoldType type)
Sets the HidNpadJoyHoldType.
Result hidGetSixAxisSensorHandles(HidSixAxisSensorHandle *handles, s32 total_handles, HidNpadIdType id, HidNpadStyleTag style)
Gets SixAxisSensorHandles.
Result hidIsUsbFullKeyControllerConnected(HidNpadIdType id, bool *out)
IsUsbFullKeyControllerConnected.
HidNpadLagerType
NpadLagerType.
Definition: hid.h:510
@ HidNpadLagerType_E
E.
Definition: hid.h:513
@ HidNpadLagerType_U
U.
Definition: hid.h:514
@ HidNpadLagerType_Invalid
Invalid.
Definition: hid.h:511
@ HidNpadLagerType_J
J.
Definition: hid.h:512
HidVibrationGcErmCommand
VibrationGcErmCommand.
Definition: hid.h:532
@ HidVibrationGcErmCommand_Start
Starts the vibration.
Definition: hid.h:534
@ HidVibrationGcErmCommand_StopHard
Stops the vibration immediately, with no decay phase.
Definition: hid.h:535
@ HidVibrationGcErmCommand_Stop
Stops the vibration with a decay phase.
Definition: hid.h:533
Result hidStartSixAxisSensor(HidSixAxisSensorHandle handle)
Starts the SixAxisSensor for the specified handle.
Result hidSetSevenSixAxisSensorFusionStrength(float strength)
Sets the SevenSixAxisSensor FusionStrength.
HidTouchScreenModeForNx
HidTouchScreenModeForNx.
Definition: hid.h:35
@ HidTouchScreenModeForNx_Finger
Finger.
Definition: hid.h:37
@ HidTouchScreenModeForNx_Heat2
Heat2.
Definition: hid.h:38
@ HidTouchScreenModeForNx_UseSystemSetting
UseSystemSetting.
Definition: hid.h:36
void hidGetNpadPowerInfoSplit(HidNpadIdType id, HidPowerInfo *info_left, HidPowerInfo *info_right)
Gets the left/right HidPowerInfo for the specified Npad (Joy-Con pair in dual mode).
Result hidSetIsPalmaPairedConnectable(bool flag)
Sets whether paired Palma can connect.
Result hidGetSensorFusionError(float *out)
GetSensorFusionError.
HidDeviceType
Internal DeviceType for [9.0.0+]. Converted to/from the pre-9.0.0 version of this by the hiddbg funcs...
Definition: hid.h:427
@ HidDeviceType_JoyLeft4
HidDeviceTypeBits_JoyLeft
Definition: hid.h:431
@ HidDeviceType_Lucia
HidDeviceTypeBits_Lucia
Definition: hid.h:438
@ HidDeviceType_LarkHvcRight
HidDeviceTypeBits_LarkHvcRight, HidDeviceTypeBits_HandheldLarkHvcRight
Definition: hid.h:435
@ HidDeviceType_System20
HidDeviceTypeBits_System with HidNpadStyleTag |= HidNpadStyleTag_NpadJoyDual.
Definition: hid.h:444
@ HidDeviceType_LarkNesRight
HidDeviceTypeBits_LarkNesRight, HidDeviceTypeBits_HandheldLarkNesRight
Definition: hid.h:437
@ HidDeviceType_JoyLeft2
HidDeviceTypeBits_JoyLeft
Definition: hid.h:429
@ HidDeviceType_FullKey15
HidDeviceTypeBits_FullKey
Definition: hid.h:441
@ HidDeviceType_Lager
HidDeviceTypeBits_Lager
Definition: hid.h:447
@ HidDeviceType_JoyRight1
HidDeviceTypeBits_JoyRight
Definition: hid.h:428
@ HidDeviceType_Palma
[9.0.0+] HidDeviceTypeBits_Palma
Definition: hid.h:439
@ HidDeviceType_DebugPad
HidDeviceTypeBits_DebugPad
Definition: hid.h:442
@ HidDeviceType_JoyRight5
HidDeviceTypeBits_JoyRight
Definition: hid.h:432
@ HidDeviceType_System19
HidDeviceTypeBits_System with HidNpadStyleTag |= HidNpadStyleTag_NpadFullKey.
Definition: hid.h:443
@ HidDeviceType_LarkHvcLeft
HidDeviceTypeBits_LarkHvcLeft, HidDeviceTypeBits_HandheldLarkHvcLeft
Definition: hid.h:434
@ HidDeviceType_FullKey13
HidDeviceTypeBits_FullKey
Definition: hid.h:440
@ HidDeviceType_Lagon
HidDeviceTypeBits_Lagon
Definition: hid.h:446
@ HidDeviceType_LarkNesLeft
HidDeviceTypeBits_LarkNesLeft, HidDeviceTypeBits_HandheldLarkNesLeft
Definition: hid.h:436
@ HidDeviceType_System21
HidDeviceTypeBits_System with HidNpadStyleTag |= HidNpadStyleTag_NpadJoyDual.
Definition: hid.h:445
@ HidDeviceType_FullKey6
HidDeviceTypeBits_FullKey
Definition: hid.h:433
@ HidDeviceType_FullKey3
HidDeviceTypeBits_FullKey
Definition: hid.h:430
Result hidSetDisallowedPalmaConnection(const BtdrvAddress *addrs, s32 count)
SetDisallowedPalmaConnection.
void hidGetNpadPowerInfoSingle(HidNpadIdType id, HidPowerInfo *info)
Gets the main HidPowerInfo for the specified Npad.
Result hidSetNpadAnalogStickUseCenterClamp(bool flag)
SetNpadAnalogStickUseCenterClamp.
HidMouseAttribute
HidMouseAttribute.
Definition: hid.h:313
@ HidMouseAttribute_Transferable
Transferable.
Definition: hid.h:314
@ HidMouseAttribute_IsConnected
IsConnected.
Definition: hid.h:315
size_t hidGetNpadStatesGc(HidNpadIdType id, HidNpadGcState *states, size_t count)
Gets HidNpadGcState.
size_t hidGetNpadStatesLucia(HidNpadIdType id, HidNpadLuciaState *states, size_t count)
Gets HidNpadLuciaState.
Result hidStartSevenSixAxisSensor(void)
Starts the SevenSixAxisSensor.
HidPalmaFrModeType
PalmaFrModeType.
Definition: hid.h:560
@ HidPalmaFrModeType_B03
B03.
Definition: hid.h:564
@ HidPalmaFrModeType_Downloaded
Downloaded.
Definition: hid.h:565
@ HidPalmaFrModeType_Off
Off.
Definition: hid.h:561
@ HidPalmaFrModeType_B01
B01.
Definition: hid.h:562
@ HidPalmaFrModeType_B02
B02.
Definition: hid.h:563
size_t hidGetGestureStates(HidGestureState *states, size_t count)
Gets HidGestureState.
void hidGetNpadSystemButtonProperties(HidNpadIdType id, HidNpadSystemButtonProperties *out)
Gets the HidNpadSystemButtonProperties for the specified Npad.
Result hidResetSixAxisSensorFusionParameters(HidSixAxisSensorHandle handle)
ResetSixAxisSensorFusionParameters.
Result hidWritePalmaActivityEntry(HidPalmaConnectionHandle handle, u16 unk, const HidPalmaActivityEntry *entry)
WritePalmaActivityEntry.
Result hidAcquireNpadStyleSetUpdateEventHandle(HidNpadIdType id, Event *out_event, bool autoclear)
Gets an Event which is signaled when the hidGetNpadStyleSet output is updated for the specified contr...
u32 hidGetNpadStyleSet(HidNpadIdType id)
Gets the StyleSet for the specified Npad.
size_t hidGetNpadStatesPalma(HidNpadIdType id, HidNpadPalmaState *states, size_t count)
Gets HidNpadPalmaState.
HidNpadAttribute
HidNpadAttribute.
Definition: hid.h:319
@ HidNpadAttribute_IsLeftConnected
IsLeftConnected.
Definition: hid.h:322
@ HidNpadAttribute_IsWired
IsWired.
Definition: hid.h:321
@ HidNpadAttribute_IsRightConnected
IsRightConnected.
Definition: hid.h:324
@ HidNpadAttribute_IsRightWired
IsRightWired.
Definition: hid.h:325
@ HidNpadAttribute_IsLeftWired
IsLeftWired.
Definition: hid.h:323
@ HidNpadAttribute_IsConnected
IsConnected.
Definition: hid.h:320
Result hidGetActualVibrationValue(HidVibrationDeviceHandle handle, HidVibrationValue *out)
Gets the current HidVibrationValue for the specified device.
Result hidReadPalmaUniqueCode(HidPalmaConnectionHandle handle)
ReadPalmaUniqueCode.
HidNpadButton
HidNpadButton.
Definition: hid.h:256
@ HidNpadButton_LagonCLeft
Left C button in N64 controller.
Definition: hid.h:288
@ HidNpadButton_StickRRight
Right Stick pseudo-button when moved Right.
Definition: hid.h:279
@ HidNpadButton_StickRDown
Right Stick pseudo-button when moved Left.
Definition: hid.h:280
@ HidNpadButton_AnySL
Bitmask containing SL buttons on both Joy-Cons (Left/Right)
Definition: hid.h:297
@ HidNpadButton_Verification
Verification.
Definition: hid.h:286
@ HidNpadButton_X
X button / Up face button.
Definition: hid.h:259
@ HidNpadButton_LagonCDown
Down C button in N64 controller.
Definition: hid.h:291
@ HidNpadButton_StickLDown
Left Stick pseudo-button when moved Down.
Definition: hid.h:276
@ HidNpadButton_Left
D-Pad Left button.
Definition: hid.h:269
@ HidNpadButton_AnyDown
Bitmask containing all buttons that are considered Down (D-Pad, Sticks)
Definition: hid.h:296
@ HidNpadButton_B
B button / Down face button.
Definition: hid.h:258
@ HidNpadButton_Y
Y button / Left face button.
Definition: hid.h:260
@ HidNpadButton_StickR
Right Stick button.
Definition: hid.h:262
@ HidNpadButton_AnySR
Bitmask containing SR buttons on both Joy-Cons (Left/Right)
Definition: hid.h:298
@ HidNpadButton_RightSL
SL button on Right Joy-Con.
Definition: hid.h:283
@ HidNpadButton_LeftSL
SL button on Left Joy-Con.
Definition: hid.h:281
@ HidNpadButton_A
A button / Right face button.
Definition: hid.h:257
@ HidNpadButton_LagonCRight
Right C button in N64 controller.
Definition: hid.h:290
@ HidNpadButton_Minus
Minus button.
Definition: hid.h:268
@ HidNpadButton_StickRUp
Right Stick pseudo-button when moved Up.
Definition: hid.h:278
@ HidNpadButton_Down
D-Pad Down button.
Definition: hid.h:272
@ HidNpadButton_Plus
Plus button.
Definition: hid.h:267
@ HidNpadButton_LagonCUp
Up C button in N64 controller.
Definition: hid.h:289
@ HidNpadButton_R
R button.
Definition: hid.h:264
@ HidNpadButton_ZL
ZL button.
Definition: hid.h:265
@ HidNpadButton_ZR
ZR button.
Definition: hid.h:266
@ HidNpadButton_Up
D-Pad Up button.
Definition: hid.h:270
@ HidNpadButton_StickL
Left Stick button.
Definition: hid.h:261
@ HidNpadButton_AnyLeft
Bitmask containing all buttons that are considered Left (D-Pad, Sticks)
Definition: hid.h:293
@ HidNpadButton_StickRLeft
Right Stick pseudo-button when moved Left.
Definition: hid.h:277
@ HidNpadButton_HandheldLeftB
B button on Left NES/HVC controller in Handheld mode.
Definition: hid.h:287
@ HidNpadButton_AnyRight
Bitmask containing all buttons that are considered Right (D-Pad, Sticks)
Definition: hid.h:295
@ HidNpadButton_L
L button.
Definition: hid.h:263
@ HidNpadButton_StickLLeft
Left Stick pseudo-button when moved Left.
Definition: hid.h:273
@ HidNpadButton_Right
D-Pad Right button.
Definition: hid.h:271
@ HidNpadButton_LeftSR
SR button on Left Joy-Con.
Definition: hid.h:282
@ HidNpadButton_RightSR
SR button on Right Joy-Con.
Definition: hid.h:284
@ HidNpadButton_AnyUp
Bitmask containing all buttons that are considered Up (D-Pad, Sticks)
Definition: hid.h:294
@ HidNpadButton_Palma
Top button on Poké Ball Plus (Palma) controller.
Definition: hid.h:285
@ HidNpadButton_StickLUp
Left Stick pseudo-button when moved Up.
Definition: hid.h:274
@ HidNpadButton_StickLRight
Left Stick pseudo-button when moved Right.
Definition: hid.h:275
Result hidIsVibrationPermitted(bool *flag)
Gets whether vibration is allowed.
Result hidGetPalmaOperationInfo(HidPalmaConnectionHandle handle, HidPalmaOperationInfo *out)
Gets HidPalmaOperationInfo for a completed operation.
Result hidResetGyroscopeZeroDriftMode(HidSixAxisSensorHandle handle)
Resets the HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle to HidGyroscopeZeroDriftMo...
Result hidGetVibrationDeviceInfo(HidVibrationDeviceHandle handle, HidVibrationDeviceInfo *out)
Gets HidVibrationDeviceInfo for the specified device.
size_t hidGetNpadStatesSystemExt(HidNpadIdType id, HidNpadSystemExtState *states, size_t count)
Gets HidNpadSystemExtState.
HidNpadCommonState HidNpadHandheldState
State for HidNpadStyleTag_NpadHandheld.
Definition: hid.h:791
static bool hidKeyboardStateGetKey(const HidKeyboardState *state, HidKeyboardKey key)
Gets the state of a key in a HidKeyboardState.
Definition: hid.h:1242
HidAppletFooterUiType hidGetAppletFooterUiTypes(HidNpadIdType id)
Gets HidAppletFooterUiType for the specified Npad.
Result hidSetNpadCommunicationMode(HidNpadCommunicationMode mode)
SetNpadCommunicationMode.
Result hidStopSixAxisSensor(HidSixAxisSensorHandle handle)
Stops the SixAxisSensor for the specified handle.
HidPalmaOperationType
PalmaOperationType.
Definition: hid.h:539
@ HidPalmaOperationType_WriteWaveEntry
WriteWaveEntry.
Definition: hid.h:551
@ HidPalmaOperationType_ReadDataBaseIdentificationVersion
ReadDataBaseIdentificationVersion.
Definition: hid.h:552
@ HidPalmaOperationType_WriteRgbLedPatternEntry
WriteRgbLedPatternEntry.
Definition: hid.h:550
@ HidPalmaOperationType_ReadApplicationSection
ReadApplicationSection.
Definition: hid.h:545
@ HidPalmaOperationType_WriteDataBaseIdentificationVersion
WriteDataBaseIdentificationVersion.
Definition: hid.h:553
@ HidPalmaOperationType_EnableStep
EnableStep.
Definition: hid.h:543
@ HidPalmaOperationType_ReadPlayLog
[5.1.0+] ReadPlayLog
Definition: hid.h:555
@ HidPalmaOperationType_ReadUniqueCode
ReadUniqueCode.
Definition: hid.h:547
@ HidPalmaOperationType_ResetStep
ResetStep.
Definition: hid.h:544
@ HidPalmaOperationType_SetFrModeType
SetFrModeType.
Definition: hid.h:541
@ HidPalmaOperationType_SetUniqueCodeInvalid
SetUniqueCodeInvalid.
Definition: hid.h:548
@ HidPalmaOperationType_SuspendFeature
SuspendFeature.
Definition: hid.h:554
@ HidPalmaOperationType_ReadStep
ReadStep.
Definition: hid.h:542
@ HidPalmaOperationType_WriteActivityEntry
WriteActivityEntry.
Definition: hid.h:549
@ HidPalmaOperationType_ResetPlayLog
[5.1.0+] ResetPlayLog
Definition: hid.h:556
@ HidPalmaOperationType_WriteApplicationSection
WriteApplicationSection.
Definition: hid.h:546
@ HidPalmaOperationType_PlayActivity
PlayActivity.
Definition: hid.h:540
HidNpadIdType
HID controller IDs.
Definition: hid.h:214
@ HidNpadIdType_Handheld
Handheld mode controls.
Definition: hid.h:224
@ HidNpadIdType_No6
Player 6 controller.
Definition: hid.h:220
@ HidNpadIdType_No8
Player 8 controller.
Definition: hid.h:222
@ HidNpadIdType_No5
Player 5 controller.
Definition: hid.h:219
@ HidNpadIdType_No1
Player 1 controller.
Definition: hid.h:215
@ HidNpadIdType_No2
Player 2 controller.
Definition: hid.h:216
@ HidNpadIdType_No4
Player 4 controller.
Definition: hid.h:218
@ HidNpadIdType_Other
Other controller.
Definition: hid.h:223
@ HidNpadIdType_No3
Player 3 controller.
Definition: hid.h:217
@ HidNpadIdType_No7
Player 7 controller.
Definition: hid.h:221
Result hidGetPalmaConnectionHandle(HidNpadIdType id, HidPalmaConnectionHandle *out)
GetPalmaConnectionHandle.
Result hidWritePalmaWaveEntry(HidPalmaConnectionHandle handle, HidPalmaWaveSet wave_set, u16 unk, const void *buffer, size_t tmem_size, size_t size)
WritePalmaWaveEntry.
Result hidInitializeSevenSixAxisSensor(void)
Initializes the SevenSixAxisSensor.
Result hidReadPalmaApplicationSection(HidPalmaConnectionHandle handle, s32 inval0, u64 size)
ReadPalmaApplicationSection.
Result hidResetSevenSixAxisSensorTimestamp(void)
Resets the timestamp for the SevenSixAxisSensor.
Result hidEnablePalmaBoostMode(bool flag)
EnablePalmaBoostMode.
void * hidGetSharedmemAddr(void)
Gets the address of the SharedMemory.
Result hidWritePalmaRgbLedPatternEntry(HidPalmaConnectionHandle handle, u16 unk, const void *buffer, size_t size)
WritePalmaRgbLedPatternEntry.
Service * hidGetServiceSession(void)
Gets the Service object for the actual hid service session.
Result hidGetGyroscopeZeroDriftMode(HidSixAxisSensorHandle handle, HidGyroscopeZeroDriftMode *mode)
Gets the HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle.
HidNpadLarkType
NpadLarkType.
Definition: hid.h:493
@ HidNpadLarkType_NL
NL.
Definition: hid.h:497
@ HidNpadLarkType_NR
NR.
Definition: hid.h:498
@ HidNpadLarkType_H1
H1.
Definition: hid.h:495
@ HidNpadLarkType_Invalid
Invalid.
Definition: hid.h:494
@ HidNpadLarkType_H2
H2.
Definition: hid.h:496
HidNpadJoyDeviceType
NpadJoyDeviceType.
Definition: hid.h:377
@ HidNpadJoyDeviceType_Right
Right.
Definition: hid.h:379
@ HidNpadJoyDeviceType_Left
Left.
Definition: hid.h:378
Result hidGetPalmaBluetoothAddress(HidPalmaConnectionHandle handle, BtdrvAddress *out)
GetPalmaBluetoothAddress.
Result hidSetIsPalmaAllConnectable(bool flag)
Sets whether any Palma can connect.
Result hidGetSupportedNpadStyleSet(u32 *style_set)
Gets which controller styles are supported.
size_t hidGetTouchScreenStates(HidTouchScreenState *states, size_t count)
Gets HidTouchScreenState.
HidNpadStyleTag
HID controller styles.
Definition: hid.h:228
@ HidNpadStyleTag_NpadLucia
SNES controller.
Definition: hid.h:238
@ HidNpadStyleTag_NpadJoyDual
Joy-Con controller in dual mode.
Definition: hid.h:231
@ HidNpadStyleTag_NpadHandheld
Joy-Con controller in handheld mode.
Definition: hid.h:230
@ HidNpadStyleTag_NpadJoyRight
Joy-Con right controller in single mode.
Definition: hid.h:233
@ HidNpadStyleTag_NpadGc
GameCube controller.
Definition: hid.h:234
@ HidNpadStyleTag_NpadPalma
Poké Ball Plus controller.
Definition: hid.h:235
@ HidNpadStyleTag_NpadLark
NES/Famicom controller.
Definition: hid.h:236
@ HidNpadStyleTag_NpadLager
Sega Genesis controller.
Definition: hid.h:240
@ HidNpadStyleSet_NpadFullCtrl
Style set comprising Npad styles containing the full set of controls {FullKey, Handheld,...
Definition: hid.h:244
@ HidNpadStyleTag_NpadLagon
N64 controller.
Definition: hid.h:239
@ HidNpadStyleTag_NpadSystemExt
Generic external controller.
Definition: hid.h:241
@ HidNpadStyleTag_NpadHandheldLark
NES/Famicom controller in handheld mode.
Definition: hid.h:237
@ HidNpadStyleSet_NpadStandard
Style set comprising all standard Npad styles {FullKey, Handheld, JoyDual, JoyLeft,...
Definition: hid.h:245
@ HidNpadStyleTag_NpadJoyLeft
Joy-Con left controller in single mode.
Definition: hid.h:232
@ HidNpadStyleTag_NpadSystem
Generic controller.
Definition: hid.h:242
@ HidNpadStyleTag_NpadFullKey
Pro Controller.
Definition: hid.h:229
Result hidEndPermitVibrationSession(void)
Ends the session started by hidBeginPermitVibrationSession.
HidNpadCommunicationMode
NpadCommunicationMode.
Definition: hid.h:396
@ HidNpadCommunicationMode_10ms
10ms
Definition: hid.h:398
@ HidNpadCommunicationMode_15ms
15ms
Definition: hid.h:399
@ HidNpadCommunicationMode_Default
Default.
Definition: hid.h:400
@ HidNpadCommunicationMode_5ms
5ms
Definition: hid.h:397
Result hidSendKeyboardLockKeyEvent(u32 events)
SendKeyboardLockKeyEvent.
Result hidSetNpadJoyAssignmentModeSingleWithDestination(HidNpadIdType id, HidNpadJoyDeviceType type, bool *flag, HidNpadIdType *dest)
Use this if you want to use a single joy-con as a dedicated HidNpadIdType_No*.
HidNpadCommonState HidNpadSystemExtState
State for HidNpadStyleTag_NpadSystemExt.
Definition: hid.h:844
void hidExit(void)
Exit hid. Called automatically during app exit.
Result hidSendVibrationValue(HidVibrationDeviceHandle handle, const HidVibrationValue *value)
Sends the HidVibrationDeviceHandle to the specified device.
Result hidGetSevenSixAxisSensorFusionStrength(float *strength)
Gets the SevenSixAxisSensor FusionStrength.
size_t hidGetNpadStatesLager(HidNpadIdType id, HidNpadLagerState *states, size_t count)
Gets HidNpadLagerState.
Result hidSetSupportedNpadStyleSet(u32 style_set)
Sets which controller styles are supported.
void hidInitializeMouse(void)
Initialize Mouse. Must be called when Mouse is being used. Used automatically by hidScanInput when re...
HidNpadCommonState HidNpadLagerState
State for HidNpadStyleTag_NpadLager. Analog-sticks state are always zero.
Definition: hid.h:842
Result hidGetNpadInterfaceType(HidNpadIdType id, u8 *out)
Gets the HidNpadInterfaceType for the specified controller.
Result hidGetPlayerLedPattern(HidNpadIdType id, u8 *out)
GetPlayerLedPattern.
HidNpadJoyHoldType
NpadJoyHoldType.
Definition: hid.h:371
@ HidNpadJoyHoldType_Horizontal
Joy-Con held horizontally.
Definition: hid.h:373
@ HidNpadJoyHoldType_Vertical
Default / Joy-Con held vertically.
Definition: hid.h:372
Result hidPairPalma(HidPalmaConnectionHandle handle)
PairPalma.
Result hidCancelWritePalmaWaveEntry(HidPalmaConnectionHandle handle)
CancelWritePalmaWaveEntry.
HidNpadLuciaType
NpadLuciaType.
Definition: hid.h:502
@ HidNpadLuciaType_J
J.
Definition: hid.h:504
@ HidNpadLuciaType_Invalid
Invalid.
Definition: hid.h:503
@ HidNpadLuciaType_E
E.
Definition: hid.h:505
@ HidNpadLuciaType_U
U.
Definition: hid.h:506
Result hidSetNpadHandheldActivationMode(HidNpadHandheldActivationMode mode)
Sets the HidNpadHandheldActivationMode.
HidNpadHandheldActivationMode
This controls how many Joy-Cons must be attached for handheld-mode to be activated.
Definition: hid.h:383
@ HidNpadHandheldActivationMode_None
None (0 Joy-Cons)
Definition: hid.h:386
@ HidNpadHandheldActivationMode_Dual
Dual (2 Joy-Cons)
Definition: hid.h:384
@ HidNpadHandheldActivationMode_Single
Single (1 Joy-Con)
Definition: hid.h:385
HidVibrationDevicePosition
VibrationDevicePosition.
Definition: hid.h:525
@ HidVibrationDevicePosition_Right
Right.
Definition: hid.h:528
@ HidVibrationDevicePosition_Left
Left.
Definition: hid.h:527
@ HidVibrationDevicePosition_None
None.
Definition: hid.h:526
Result hidPermitVibration(bool flag)
Sets whether vibration is allowed, this also affects the config displayed by System Settings.
Result hidSuspendPalmaFeature(HidPalmaConnectionHandle handle, u32 features)
SuspendPalmaFeature.
Result hidGetActualVibrationGcErmCommand(HidVibrationDeviceHandle handle, HidVibrationGcErmCommand *out)
Get HidVibrationGcErmCommand for the specified device, for HidVibrationDeviceType_GcErm.
Result hidEnableUsbFullKeyController(bool flag)
EnableUsbFullKeyController.
Result hidIsUsbFullKeyControllerEnabled(bool *out)
IsUsbFullKeyControllerEnabled.
size_t hidGetNpadStatesFullKey(HidNpadIdType id, HidNpadFullKeyState *states, size_t count)
Gets HidNpadFullKeyState.
void hidInitializeTouchScreen(void)
Initialize TouchScreen. Must be called when TouchScreen is being used. Used automatically by hidScanI...
Result hidInitializeVibrationDevices(HidVibrationDeviceHandle *handles, s32 total_handles, HidNpadIdType id, HidNpadStyleTag style)
Gets and initializes vibration handles.
Result hidIsSixAxisSensorAtRest(HidSixAxisSensorHandle handle, bool *out)
IsSixAxisSensorAtRest.
Result hidSetSupportedNpadIdType(const HidNpadIdType *ids, size_t count)
Sets which HidNpadIdType are supported.
size_t hidGetNpadStatesJoyRight(HidNpadIdType id, HidNpadJoyRightState *states, size_t count)
Gets HidNpadJoyRightState.
Result hidGetNpadOfHighestBatteryLevel(const HidNpadIdType *ids, size_t count, HidNpadIdType *out)
GetNpadOfHighestBatteryLevel.
HidPalmaWaveSet
PalmaWaveSet.
Definition: hid.h:569
@ HidPalmaWaveSet_Large
Large.
Definition: hid.h:572
@ HidPalmaWaveSet_Small
Small.
Definition: hid.h:570
@ HidPalmaWaveSet_Medium
Medium.
Definition: hid.h:571
XcdInterfaceType
XcdInterfaceType.
Definition: hid.h:485
Result hidGetSixAxisSensorFusionParameters(HidSixAxisSensorHandle handle, float *unk0, float *unk1)
GetSixAxisSensorFusionParameters.
Result hidGetNpadJoyHoldType(HidNpadJoyHoldType *type)
Gets the HidNpadJoyHoldType.
Result hidWritePalmaApplicationSection(HidPalmaConnectionHandle handle, s32 inval0, u64 size, const HidPalmaApplicationSectionAccessBuffer *buf)
WritePalmaApplicationSection.
Result hidStopLrAssignmentMode(void)
StopLrAssignmentMode.
Address.
Definition: btdrv_types.h:214
Kernel-mode event structure.
Definition: event.h:13
HidAnalogStickState.
Definition: hid.h:584
s32 x
X.
Definition: hid.h:585
s32 y
Y.
Definition: hid.h:586
HidCommonLifoHeader.
Definition: hid.h:607
u64 count
Count.
Definition: hid.h:611
u64 unused
Unused.
Definition: hid.h:608
u64 buffer_count
BufferCount.
Definition: hid.h:609
u64 tail
Tail.
Definition: hid.h:610
HidConsoleSixAxisSensor.
Definition: hid.h:1068
float verticalization_error
VerticalizationError.
Definition: hid.h:1072
UtilFloat3 gyro_bias
GyroBias.
Definition: hid.h:1073
u8 is_seven_six_axis_sensor_at_rest
IsSevenSixAxisSensorAtRest.
Definition: hid.h:1070
u64 sampling_number
SamplingNumber.
Definition: hid.h:1069
HidDebugPadLifo.
Definition: hid.h:632
HidCommonLifoHeader header
HidCommonLifoHeader
Definition: hid.h:633
HidDebugPadStateAtomicStorage storage[17]
HidDebugPadStateAtomicStorage
Definition: hid.h:634
HidDebugPadSharedMemoryFormat.
Definition: hid.h:638
HidDebugPadStateAtomicStorage.
Definition: hid.h:626
u64 sampling_number
SamplingNumber.
Definition: hid.h:627
HidDebugPadState state
HidDebugPadState
Definition: hid.h:628
HidDebugPadState.
Definition: hid.h:617
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hid.h:621
u64 sampling_number
SamplingNumber.
Definition: hid.h:618
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hid.h:622
u32 attributes
Bitfield of HidDebugPadAttribute.
Definition: hid.h:619
u32 buttons
Bitfield of HidDebugPadButton.
Definition: hid.h:620
HidDirectionState.
Definition: hid.h:597
float direction[3][3]
3x3 matrix
Definition: hid.h:598
HidGestureDummyStateAtomicStorage.
Definition: hid.h:1048
u64 sampling_number
SamplingNumber.
Definition: hid.h:1049
HidGestureLifo.
Definition: hid.h:1054
HidGesturePoint.
Definition: hid.h:1023
u32 y
Y.
Definition: hid.h:1025
u32 x
X.
Definition: hid.h:1024
HidGestureSharedMemoryFormat.
Definition: hid.h:1060
HidGestureState.
Definition: hid.h:1029
float rotation_angle
RotationAngle.
Definition: hid.h:1042
float velocity_x
VelocityX.
Definition: hid.h:1038
u32 attributes
Bitfield of HidGestureAttribute.
Definition: hid.h:1040
u64 sampling_number
SamplingNumber.
Definition: hid.h:1030
float velocity_y
VelocityY.
Definition: hid.h:1039
u32 direction
HidGestureDirection
Definition: hid.h:1033
s32 point_count
Number of entries in the points array.
Definition: hid.h:1043
u32 y
Y.
Definition: hid.h:1035
float scale
Scale.
Definition: hid.h:1041
s32 delta_y
DeltaY.
Definition: hid.h:1037
u32 type
HidGestureType
Definition: hid.h:1032
s32 delta_x
DeltaX.
Definition: hid.h:1036
u64 context_number
ContextNumber.
Definition: hid.h:1031
HidGesturePoint points[4]
Array of HidGesturePoint with the above count.
Definition: hid.h:1044
u32 x
X.
Definition: hid.h:1034
HidKeyboardLifo.
Definition: hid.h:745
HidKeyboardSharedMemoryFormat.
Definition: hid.h:751
HidKeyboardStateAtomicStorage.
Definition: hid.h:739
u64 sampling_number
SamplingNumber.
Definition: hid.h:740
HidKeyboardState.
Definition: hid.h:732
u64 modifiers
Bitfield of HidKeyboardModifier.
Definition: hid.h:734
u64 sampling_number
SamplingNumber.
Definition: hid.h:733
HidMouseLifo.
Definition: hid.h:716
HidMouseSharedMemoryFormat.
Definition: hid.h:722
HidMouseStateAtomicStorage.
Definition: hid.h:710
u64 sampling_number
SamplingNumber.
Definition: hid.h:711
HidMouseState.
Definition: hid.h:697
u32 attributes
Bitfield of HidMouseAttribute.
Definition: hid.h:706
u32 buttons
Bitfield of HidMouseButton.
Definition: hid.h:705
s32 delta_x
DeltaX.
Definition: hid.h:701
s32 y
Y.
Definition: hid.h:700
s32 wheel_delta_y
WheelDeltaY.
Definition: hid.h:704
s32 delta_y
DeltaY.
Definition: hid.h:702
s32 x
X.
Definition: hid.h:699
s32 wheel_delta_x
WheelDeltaX.
Definition: hid.h:703
u64 sampling_number
SamplingNumber.
Definition: hid.h:698
HidNfcXcdDeviceHandleStateImplAtomicStorage.
Definition: hid.h:950
u64 sampling_number
SamplingNumber.
Definition: hid.h:951
HidNfcXcdDeviceHandleStateImpl state
HidNfcXcdDeviceHandleStateImpl
Definition: hid.h:952
HidNfcXcdDeviceHandleStateImpl.
Definition: hid.h:941
u64 sampling_number
SamplingNumber.
Definition: hid.h:946
HidNfcXcdDeviceHandleState.
Definition: hid.h:956
HidNpadCommonLifo.
Definition: hid.h:854
HidNpadCommonStateAtomicStorage.
Definition: hid.h:848
u64 sampling_number
SamplingNumber.
Definition: hid.h:849
HidNpadCommonState.
Definition: hid.h:781
u64 sampling_number
SamplingNumber.
Definition: hid.h:782
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hid.h:784
u32 reserved
Reserved.
Definition: hid.h:787
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:786
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hid.h:785
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:783
Npad colors.
Definition: hid.h:762
u32 main
RGBA Body Color.
Definition: hid.h:763
u32 sub
RGBA Buttons Color.
Definition: hid.h:764
HidNpadFullKeyColorState.
Definition: hid.h:768
HidNpadControllerColor full_key
HidNpadControllerColor FullKey
Definition: hid.h:770
u32 attribute
HidColorAttribute
Definition: hid.h:769
State for HidNpadStyleTag_NpadGc. Loaded from the same lifo as HidNpadFullKeyState,...
Definition: hid.h:797
u64 sampling_number
SamplingNumber.
Definition: hid.h:798
u32 trigger_l
L analog trigger. Valid range: 0x0-0x7FFF.
Definition: hid.h:803
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hid.h:801
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:799
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:802
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hid.h:800
u32 trigger_r
R analog trigger. Valid range: 0x0-0x7FFF.
Definition: hid.h:804
HidNpadGcTriggerLifo.
Definition: hid.h:873
HidNpadGcTriggerStateAtomicStorage.
Definition: hid.h:867
u64 sampling_number
SamplingNumber.
Definition: hid.h:868
HidNpadGcTriggerState.
Definition: hid.h:860
u64 sampling_number
SamplingNumber.
Definition: hid.h:861
State for HidNpadStyleTag_NpadHandheldLark. The base state is loaded from the same lifo as HidNpadHan...
Definition: hid.h:821
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:823
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hid.h:825
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hid.h:824
u64 sampling_number
SamplingNumber.
Definition: hid.h:822
HidNpadLarkType lark_type_r
HidNpadLarkType LarkTypeR
Definition: hid.h:828
HidNpadLarkType lark_type_l_and_main
HidNpadLarkType LarkTypeLAndMain
Definition: hid.h:827
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:826
HidNpadInternalState.
Definition: hid.h:962
u32 reserved
Reserved.
Definition: hid.h:984
HidNpadSixAxisSensorLifo joy_dual_right_six_axis_sensor_lifo
JoyDualRightSixAxisSensorLifo.
Definition: hid.h:979
u32 style_set
Bitfield of HidNpadStyleTag.
Definition: hid.h:963
HidNpadCommonLifo joy_dual_lifo
JoyDualLifo.
Definition: hid.h:970
HidNpadCommonLifo palma_lifo
PalmaLifo.
Definition: hid.h:973
HidNpadJoyColorState joy_color
HidNpadJoyColorState
Definition: hid.h:966
HidNpadFullKeyColorState full_key_color
HidNpadFullKeyColorState
Definition: hid.h:965
HidNpadCommonLifo system_ext_lifo
SystemExtLifo.
Definition: hid.h:974
u8 reserved_x4208[0x20]
Mutex on pre-10.0.0.
Definition: hid.h:999
u8 applet_footer_ui_type
HidAppletFooterUiType
Definition: hid.h:995
u32 joy_assignment_mode
HidNpadJoyAssignmentMode
Definition: hid.h:964
u32 applet_footer_ui_attribute
Bitfield of AppletFooterUiAttribute.
Definition: hid.h:994
u32 lager_type
HidNpadLagerType
Definition: hid.h:1004
HidNpadCommonLifo full_key_lifo
FullKeyLifo.
Definition: hid.h:968
HidNpadCommonLifo handheld_lifo
HandheldLifo.
Definition: hid.h:969
u32 lucia_type
HidNpadLuciaType
Definition: hid.h:1003
HidNpadSixAxisSensorLifo joy_left_six_axis_sensor_lifo
JoyLeftSixAxisSensorLifo.
Definition: hid.h:980
HidNpadSixAxisSensorLifo full_key_six_axis_sensor_lifo
FullKeySixAxisSensorLifo.
Definition: hid.h:976
u32 lark_type_l_and_main
HidNpadLarkType
Definition: hid.h:1001
HidNpadSixAxisSensorLifo handheld_six_axis_sensor_lifo
HandheldSixAxisSensorLifo.
Definition: hid.h:977
u32 lark_type_r
HidNpadLarkType
Definition: hid.h:1002
HidNpadSixAxisSensorLifo joy_dual_left_six_axis_sensor_lifo
JoyDualLeftSixAxisSensorLifo.
Definition: hid.h:978
HidNpadSixAxisSensorLifo joy_right_six_axis_sensor_lifo
JoyRightSixAxisSensorLifo.
Definition: hid.h:981
HidNpadCommonLifo joy_right_lifo
JoyRightLifo.
Definition: hid.h:972
HidNpadCommonLifo joy_left_lifo
JoyLeftLifo.
Definition: hid.h:971
u32 device_type
Bitfield of HidDeviceTypeBits.
Definition: hid.h:983
HidNpadJoyColorState.
Definition: hid.h:774
u32 attribute
HidColorAttribute
Definition: hid.h:775
HidNpadControllerColor left
HidNpadControllerColor Left
Definition: hid.h:776
HidNpadControllerColor right
HidNpadControllerColor Right
Definition: hid.h:777
State for HidNpadStyleTag_NpadLark. The base state is loaded from the same lifo as HidNpadFullKeyStat...
Definition: hid.h:811
HidNpadLarkType lark_type_l_and_main
HidNpadLarkType LarkTypeLAndMain
Definition: hid.h:817
u64 sampling_number
SamplingNumber.
Definition: hid.h:812
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:813
HidAnalogStickState analog_stick_l
This is always zero.
Definition: hid.h:814
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:816
HidAnalogStickState analog_stick_r
This is always zero.
Definition: hid.h:815
State for HidNpadStyleTag_NpadLucia. The base state is loaded from the same lifo as HidNpadFullKeySta...
Definition: hid.h:833
HidAnalogStickState analog_stick_r
This is always zero.
Definition: hid.h:837
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:838
HidAnalogStickState analog_stick_l
This is always zero.
Definition: hid.h:836
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:835
HidNpadLuciaType lucia_type
HidNpadLuciaType
Definition: hid.h:839
u64 sampling_number
SamplingNumber.
Definition: hid.h:834
HidNpadSharedMemoryEntry.
Definition: hid.h:1008
HidNpadSharedMemoryFormat.
Definition: hid.h:1014
HidNpadSixAxisSensorLifo.
Definition: hid.h:897
NpadSystemButtonProperties.
Definition: hid.h:923
u32 is_unintended_home_button_input_protection_enabled
IsUnintendedHomeButtonInputProtectionEnabled.
Definition: hid.h:924
NpadSystemProperties.
Definition: hid.h:903
u64 is_abxy_button_oriented
IsAbxyButtonOriented.
Definition: hid.h:913
u64 is_directional_buttons_available
[8.0.0+] IsDirectionalButtonsAvailable
Definition: hid.h:917
u64 bit6
Unused.
Definition: hid.h:907
u64 bit8
Unused.
Definition: hid.h:909
u64 is_plus_available
[4.0.0+] IsPlusAvailable
Definition: hid.h:915
u64 is_powered
Use hidGetNpadPowerInfoSingle / hidGetNpadPowerInfoSplit instead of accessing this directly.
Definition: hid.h:905
u64 is_charging
Use hidGetNpadPowerInfoSingle / hidGetNpadPowerInfoSplit instead of accessing this directly.
Definition: hid.h:904
u64 is_unsupported_button_pressed_on_npad_system
IsUnsupportedButtonPressedOnNpadSystem.
Definition: hid.h:910
u64 bit7
Unused.
Definition: hid.h:908
u64 is_sl_sr_button_oriented
IsSlSrButtonOriented.
Definition: hid.h:914
u64 unused
Unused.
Definition: hid.h:919
u64 is_unsupported_button_pressed_on_npad_system_ext
IsUnsupportedButtonPressedOnNpadSystemExt.
Definition: hid.h:911
u64 is_minus_available
[4.0.0+] IsMinusAvailable
Definition: hid.h:916
PalmaActivityEntry.
Definition: hid.h:1171
u16 rgb_led_pattern_index
RgbLedPatternIndex.
Definition: hid.h:1172
u16 wave_index
WaveIndex.
Definition: hid.h:1175
u16 pad
Padding.
Definition: hid.h:1173
u32 wave_set
HidPalmaWaveSet
Definition: hid.h:1174
PalmaApplicationSectionAccessBuffer.
Definition: hid.h:1166
u8 data[0x100]
Application data.
Definition: hid.h:1167
PalmaConnectionHandle.
Definition: hid.h:1154
u64 handle
Handle.
Definition: hid.h:1155
PalmaOperationInfo.
Definition: hid.h:1159
Result res
Result.
Definition: hid.h:1161
u32 type
HidPalmaOperationType
Definition: hid.h:1160
u8 data[0x140]
Data.
Definition: hid.h:1162
HidPowerInfo (system)
Definition: hid.h:928
bool is_charging
IsCharging.
Definition: hid.h:930
u32 battery_level
BatteryLevel, always 0-4.
Definition: hid.h:932
bool is_powered
IsPowered.
Definition: hid.h:929
HidSevenSixAxisSensorStateEntry.
Definition: hid.h:1105
HidSevenSixAxisSensorState.
Definition: hid.h:1096
HidSevenSixAxisSensorStates.
Definition: hid.h:1112
HidSharedMemory.
Definition: hid.h:1078
HidConsoleSixAxisSensor console_six_axis_sensor
[5.0.0+] ConsoleSixAxisSensor
Definition: hid.h:1091
u8 digitizer[0x1000]
[10.0.0+] Digitizer [1.0.0-9.2.0] BasicXpad
Definition: hid.h:1083
u8 unique_pad[0x4000]
[1.0.0-4.1.0] UniquePad
Definition: hid.h:1088
HidSixAxisSensorStateAtomicStorage.
Definition: hid.h:891
u64 sampling_number
SamplingNumber.
Definition: hid.h:892
HidSixAxisSensorState.
Definition: hid.h:879
u32 reserved
Reserved.
Definition: hid.h:887
HidDirectionState direction
Direction.
Definition: hid.h:885
u64 sampling_number
SamplingNumber.
Definition: hid.h:881
HidVector angle
Angle.
Definition: hid.h:884
u64 delta_time
DeltaTime.
Definition: hid.h:880
u32 attributes
Bitfield of HidSixAxisSensorAttribute.
Definition: hid.h:886
HidVector angular_velocity
AngularVelocity.
Definition: hid.h:883
HidVector acceleration
Acceleration.
Definition: hid.h:882
HidTouchScreenConfigurationForNx.
Definition: hid.h:687
u8 mode
HidTouchScreenModeForNx
Definition: hid.h:688
HidTouchScreenLifo.
Definition: hid.h:675
HidTouchScreenStateAtomicStorage storage[17]
HidTouchScreenStateAtomicStorage
Definition: hid.h:677
HidCommonLifoHeader header
HidCommonLifoHeader
Definition: hid.h:676
HidTouchScreenSharedMemoryFormat.
Definition: hid.h:681
HidTouchScreenStateAtomicStorage.
Definition: hid.h:669
HidTouchScreenState state
HidTouchScreenState
Definition: hid.h:671
u64 sampling_number
SamplingNumber.
Definition: hid.h:670
HidTouchScreenState.
Definition: hid.h:661
u64 sampling_number
SamplingNumber.
Definition: hid.h:662
HidTouchState touches[16]
Array of HidTouchState, with the above count.
Definition: hid.h:665
u32 reserved
Reserved.
Definition: hid.h:664
s32 count
Number of entries in the touches array.
Definition: hid.h:663
HidTouchState.
Definition: hid.h:648
u32 reserved
Reserved.
Definition: hid.h:657
u32 attributes
Bitfield of HidTouchAttribute.
Definition: hid.h:650
u32 diameter_y
DiameterY.
Definition: hid.h:655
u32 y
Y.
Definition: hid.h:653
u32 rotation_angle
RotationAngle.
Definition: hid.h:656
u32 diameter_x
DiameterX.
Definition: hid.h:654
u32 finger_id
FingerId.
Definition: hid.h:651
u64 delta_time
DeltaTime.
Definition: hid.h:649
u32 x
X.
Definition: hid.h:652
HidVector.
Definition: hid.h:590
HidVibrationDeviceInfo.
Definition: hid.h:1140
u32 type
HidVibrationDeviceType
Definition: hid.h:1141
u32 position
HidVibrationDevicePosition
Definition: hid.h:1142
HidVibrationValue.
Definition: hid.h:1146
float amp_low
Low Band amplitude. 1.0f: Max amplitude.
Definition: hid.h:1147
float freq_high
High Band frequency in Hz.
Definition: hid.h:1150
float freq_low
Low Band frequency in Hz.
Definition: hid.h:1148
float amp_high
High Band amplitude. 1.0f: Max amplitude.
Definition: hid.h:1149
Service object structure.
Definition: service.h:14
Definition: types.h:50
XcdDeviceHandle.
Definition: hid.h:936
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:54
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
uint16_t u16
16-bit unsigned integer.
Definition: types.h:20
u32 Result
Function error code result type.
Definition: types.h:44
#define NX_CONSTEXPR
Flags a function as constexpr in C++14 and above; or as (always) inline otherwise.
Definition: types.h:92
int32_t s32
32-bit signed integer.
Definition: types.h:27
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
HidSixAxisSensorHandle.
Definition: hid.h:1118
u32 device_idx
DeviceIdx.
Definition: hid.h:1123
u32 npad_style_index
NpadStyleIndex.
Definition: hid.h:1121
u32 type_value
TypeValue.
Definition: hid.h:1119
u32 player_number
PlayerNumber.
Definition: hid.h:1122
u32 pad
Padding.
Definition: hid.h:1124
HidVibrationDeviceHandle.
Definition: hid.h:1129
u32 type_value
TypeValue.
Definition: hid.h:1130
u32 npad_style_index
NpadStyleIndex.
Definition: hid.h:1132
u32 device_idx
DeviceIdx.
Definition: hid.h:1134
u32 pad
Padding.
Definition: hid.h:1135
u32 player_number
PlayerNumber.
Definition: hid.h:1133