libnx  v4.8.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 HidBasicXpad
759 
760 /// HidBasicXpadState
761 typedef struct {
762  u64 sampling_number;
763  u32 attributes;
764  u32 buttons;
765  u64 analog_stick_left;
766  u64 analog_stick_right;
768 
769 /// HidBasicXpadStateAtomicStorage
770 typedef struct {
771  u64 sampling_number;
772  HidBasicXpadState state;
774 
775 /// HidBasicXpadLifo
776 typedef struct {
777  HidCommonLifoHeader header;
778  HidBasicXpadStateAtomicStorage storage[17];
780 
781 /// HidBasicXpadSharedMemoryEntry
782 typedef struct {
783  HidBasicXpadLifo lifo;
784  u8 padding[0x138];
786 
787 /// HidBasicXpadSharedMemoryFormat
788 typedef struct {
791 
792 // End HidBasicXpad
793 
794 // Begin HidDigitizer
795 
796 /// HidDigitizerState
797 typedef struct {
798  u64 sampling_number;
799  u32 unk_0x8;
800  u32 unk_0xC;
801  u32 attributes;
802  u32 buttons;
803  u32 unk_0x18;
804  u32 unk_0x1C;
805  u32 unk_0x20;
806  u32 unk_0x24;
807  u32 unk_0x28;
808  u32 unk_0x2C;
809  u32 unk_0x30;
810  u32 unk_0x34;
811  u32 unk_0x38;
812  u32 unk_0x3C;
813  u32 unk_0x40;
814  u32 unk_0x44;
815  u32 unk_0x48;
816  u32 unk_0x4C;
817  u32 unk_0x50;
818  u32 unk_0x54;
820 
821 /// HidDigitizerStateAtomicStorage
822 typedef struct {
823  u64 sampling_number;
824  HidDigitizerState state;
826 
827 /// HidDigitizerLifo
828 typedef struct {
829  HidCommonLifoHeader header;
830  HidDigitizerStateAtomicStorage storage[17];
832 
833 /// HidDigitizerSharedMemoryFormat
834 typedef struct {
835  HidDigitizerLifo lifo;
836  u8 padding[0x980];
838 
839 // End HidDigitizer
840 
841 // Begin HidHomeButton
842 
843 /// HidHomeButtonState
844 typedef struct {
845  u64 sampling_number;
846  u64 buttons;
848 
849 /// HidHomeButtonStateAtomicStorage
850 typedef struct {
851  u64 sampling_number;
852  HidHomeButtonState state;
854 
855 /// HidHomeButtonLifo
856 typedef struct {
857  HidCommonLifoHeader header;
860 
861 /// HidHomeButtonSharedMemoryFormat
862 typedef struct {
863  HidHomeButtonLifo lifo;
864  u8 padding[0x48];
866 
867 // End HidHomeButton
868 
869 // Begin HidSleepButton
870 
871 /// HidSleepButtonState
872 typedef struct {
873  u64 sampling_number;
874  u64 buttons;
876 
877 /// HidSleepButtonStateAtomicStorage
878 typedef struct {
879  u64 sampling_number;
880  HidSleepButtonState state;
882 
883 /// HidSleepButtonLifo
884 typedef struct {
885  HidCommonLifoHeader header;
888 
889 /// HidSleepButtonSharedMemoryFormat
890 typedef struct {
891  HidSleepButtonLifo lifo;
892  u8 padding[0x48];
894 
895 // End HidSleepButton
896 
897 // Begin HidCaptureButton
898 
899 /// HidCaptureButtonState
900 typedef struct {
901  u64 sampling_number;
902  u64 buttons;
904 
905 /// HidCaptureButtonStateAtomicStorage
906 typedef struct {
907  u64 sampling_number;
908  HidCaptureButtonState state;
910 
911 /// HidCaptureButtonLifo
912 typedef struct {
913  HidCommonLifoHeader header;
916 
917 /// HidCaptureButtonSharedMemoryFormat
918 typedef struct {
920  u8 padding[0x48];
922 
923 // End HidCaptureButton
924 
925 // Begin HidInputDetector
926 
927 /// HidInputDetectorState
928 typedef struct {
929  u64 input_source_state;
930  u64 sampling_number;
932 
933 /// HidInputDetectorStateAtomicStorage
934 typedef struct {
935  u64 sampling_number;
936  HidInputDetectorState state;
938 
939 /// HidInputDetectorLifo
940 typedef struct {
941  HidCommonLifoHeader header;
944 
945 /// HidInputDetectorSharedMemoryEntry
946 typedef struct {
948  u8 padding[0x30];
950 
951 /// HidInputDetectorSharedMemoryFormat
952 typedef struct {
955 
956 // End HidInputDetector
957 
958 // Begin HidUniquePad
959 
960 /// HidUniquePadConfigMutex
961 typedef struct {
962  u8 unk_0x0[0x20];
964 
965 /// HidSixAxisSensorUserCalibrationState
966 typedef struct {
967  u32 flags;
968  u8 reserved[4];
969  u64 stage;
970  u64 sampling_number;
972 
973 /// HidSixAxisSensorUserCalibrationStateAtomicStorage
974 typedef struct {
975  u64 sampling_number;
978 
979 /// HidSixAxisSensorUserCalibrationStateLifo
980 typedef struct {
981  HidCommonLifoHeader header;
984 
985 /// HidAnalogStickCalibrationStateImpl
986 typedef struct {
987  u64 state;
988  u64 flags;
989  u64 stage;
990  u64 sampling_number;
992 
993 /// HidAnalogStickCalibrationStateImplAtomicStorage
994 typedef struct {
995  u64 sampling_number;
998 
999 /// HidAnalogStickCalibrationStateImplLifo
1000 typedef struct {
1001  HidCommonLifoHeader header;
1004 
1005 /// HidUniquePadConfig
1006 typedef struct {
1007  u32 type;
1008  u32 interface;
1009  u8 serial_number[0x10];
1010  u32 controller_number;
1011  bool is_active;
1012  u8 reserved[3];
1013  u64 sampling_number;
1015 
1016 /// HidUniquePadConfigAtomicStorage
1017 typedef struct {
1018  u64 sampling_number;
1019  HidUniquePadConfig config;
1021 
1022 /// HidUniquePadConfigLifo
1023 typedef struct {
1024  HidCommonLifoHeader header;
1027 
1028 /// HidUniquePadLifo
1029 typedef struct {
1030  HidUniquePadConfigLifo config_lifo;
1031  HidAnalogStickCalibrationStateImplLifo analog_stick_calib_lifo[2];
1032  HidSixAxisSensorUserCalibrationStateLifo sixaxis_calib_lifo;
1035 
1036 /// HidUniquePadSharedMemoryEntry
1037 typedef struct {
1038  HidUniquePadLifo lifo;
1039  u8 padding[0x220];
1041 
1042 /// HidUniquePadSharedMemoryFormat
1043 typedef struct {
1044  HidUniquePadSharedMemoryEntry entries[16];
1046 
1047 // End HidUniquePad
1048 
1049 // Begin HidNpad
1050 
1051 /// Npad colors.
1052 /// Color fields are zero when not set.
1053 typedef struct HidNpadControllerColor {
1054  u32 main; ///< RGBA Body Color
1055  u32 sub; ///< RGBA Buttons Color
1057 
1058 /// HidNpadFullKeyColorState
1060  u32 attribute; ///< \ref HidColorAttribute
1061  HidNpadControllerColor full_key; ///< \ref HidNpadControllerColor FullKey
1063 
1064 /// HidNpadJoyColorState
1065 typedef struct HidNpadJoyColorState {
1066  u32 attribute; ///< \ref HidColorAttribute
1067  HidNpadControllerColor left; ///< \ref HidNpadControllerColor Left
1068  HidNpadControllerColor right; ///< \ref HidNpadControllerColor Right
1070 
1071 /// HidNpadCommonState
1072 typedef struct HidNpadCommonState {
1073  u64 sampling_number; ///< SamplingNumber
1074  u64 buttons; ///< Bitfield of \ref HidNpadButton.
1077  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
1078  u32 reserved; ///< Reserved
1080 
1081 typedef HidNpadCommonState HidNpadFullKeyState; ///< State for ::HidNpadStyleTag_NpadFullKey.
1082 typedef HidNpadCommonState HidNpadHandheldState; ///< State for ::HidNpadStyleTag_NpadHandheld.
1083 typedef HidNpadCommonState HidNpadJoyDualState; ///< State for ::HidNpadStyleTag_NpadJoyDual.
1084 typedef HidNpadCommonState HidNpadJoyLeftState; ///< State for ::HidNpadStyleTag_NpadJoyLeft.
1085 typedef HidNpadCommonState HidNpadJoyRightState; ///< State for ::HidNpadStyleTag_NpadJoyRight.
1086 
1087 /// State for ::HidNpadStyleTag_NpadGc. Loaded from the same lifo as \ref HidNpadFullKeyState, with the additional trigger_l/trigger_r loaded from elsewhere.
1088 typedef struct HidNpadGcState {
1089  u64 sampling_number; ///< SamplingNumber
1090  u64 buttons; ///< Bitfield of \ref HidNpadButton.
1093  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
1094  u32 trigger_l; ///< L analog trigger. Valid range: 0x0-0x7FFF.
1095  u32 trigger_r; ///< R analog trigger. Valid range: 0x0-0x7FFF.
1096  u32 pad;
1097 } HidNpadGcState;
1098 
1099 typedef HidNpadCommonState HidNpadPalmaState; ///< State for ::HidNpadStyleTag_NpadPalma.
1100 
1101 /// State for ::HidNpadStyleTag_NpadLark. The base state is loaded from the same lifo as \ref HidNpadFullKeyState.
1102 typedef struct HidNpadLarkState {
1103  u64 sampling_number; ///< SamplingNumber
1104  u64 buttons; ///< Bitfield of \ref HidNpadButton.
1105  HidAnalogStickState analog_stick_l; ///< This is always zero.
1106  HidAnalogStickState analog_stick_r; ///< This is always zero.
1107  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
1108  HidNpadLarkType lark_type_l_and_main; ///< \ref HidNpadLarkType LarkTypeLAndMain
1110 
1111 /// State for ::HidNpadStyleTag_NpadHandheldLark. The base state is loaded from the same lifo as \ref HidNpadHandheldState.
1113  u64 sampling_number; ///< SamplingNumber
1114  u64 buttons; ///< Bitfield of \ref HidNpadButton.
1117  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
1118  HidNpadLarkType lark_type_l_and_main; ///< \ref HidNpadLarkType LarkTypeLAndMain
1119  HidNpadLarkType lark_type_r; ///< \ref HidNpadLarkType LarkTypeR
1120  u32 pad;
1122 
1123 /// State for ::HidNpadStyleTag_NpadLucia. The base state is loaded from the same lifo as \ref HidNpadFullKeyState.
1124 typedef struct HidNpadLuciaState {
1125  u64 sampling_number; ///< SamplingNumber
1126  u64 buttons; ///< Bitfield of \ref HidNpadButton.
1127  HidAnalogStickState analog_stick_l; ///< This is always zero.
1128  HidAnalogStickState analog_stick_r; ///< This is always zero.
1129  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
1130  HidNpadLuciaType lucia_type; ///< \ref HidNpadLuciaType
1132 
1133 typedef HidNpadCommonState HidNpadLagerState; ///< State for ::HidNpadStyleTag_NpadLager. Analog-sticks state are always zero.
1134 
1135 typedef HidNpadCommonState HidNpadSystemExtState; ///< State for ::HidNpadStyleTag_NpadSystemExt.
1136 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.
1137 
1138 /// HidNpadCommonStateAtomicStorage
1140  u64 sampling_number; ///< SamplingNumber
1141  HidNpadCommonState state;
1143 
1144 /// HidNpadCommonLifo
1145 typedef struct HidNpadCommonLifo {
1146  HidCommonLifoHeader header;
1147  HidNpadCommonStateAtomicStorage storage[17];
1149 
1150 /// HidNpadGcTriggerState
1151 typedef struct HidNpadGcTriggerState {
1152  u64 sampling_number; ///< SamplingNumber
1153  u32 trigger_l;
1154  u32 trigger_r;
1156 
1157 /// HidNpadGcTriggerStateAtomicStorage
1159  u64 sampling_number; ///< SamplingNumber
1160  HidNpadGcTriggerState state;
1162 
1163 /// HidNpadGcTriggerLifo
1164 typedef struct HidNpadGcTriggerLifo {
1165  HidCommonLifoHeader header;
1168 
1169 /// HidSixAxisSensorState
1170 typedef struct HidSixAxisSensorState {
1171  u64 delta_time; ///< DeltaTime
1172  u64 sampling_number; ///< SamplingNumber
1173  HidVector acceleration; ///< Acceleration
1174  HidVector angular_velocity; ///< AngularVelocity
1175  HidVector angle; ///< Angle
1177  u32 attributes; ///< Bitfield of \ref HidSixAxisSensorAttribute.
1178  u32 reserved; ///< Reserved
1180 
1181 /// HidSixAxisSensorStateAtomicStorage
1183  u64 sampling_number; ///< SamplingNumber
1184  HidSixAxisSensorState state;
1186 
1187 /// HidNpadSixAxisSensorLifo
1189  HidCommonLifoHeader header;
1192 
1193 /// NpadSystemProperties
1194 typedef struct {
1195  u64 is_charging : 3; ///< Use \ref hidGetNpadPowerInfoSingle / \ref hidGetNpadPowerInfoSplit instead of accessing this directly.
1196  u64 is_powered : 3; ///< Use \ref hidGetNpadPowerInfoSingle / \ref hidGetNpadPowerInfoSplit instead of accessing this directly.
1197 
1198  u64 bit6 : 1; ///< Unused
1199  u64 bit7 : 1; ///< Unused
1200  u64 bit8 : 1; ///< Unused
1201  u64 is_unsupported_button_pressed_on_npad_system : 1; ///< IsUnsupportedButtonPressedOnNpadSystem
1202  u64 is_unsupported_button_pressed_on_npad_system_ext : 1; ///< IsUnsupportedButtonPressedOnNpadSystemExt
1203 
1204  u64 is_abxy_button_oriented : 1; ///< IsAbxyButtonOriented
1205  u64 is_sl_sr_button_oriented : 1; ///< IsSlSrButtonOriented
1206  u64 is_plus_available : 1; ///< [4.0.0+] IsPlusAvailable
1207  u64 is_minus_available : 1; ///< [4.0.0+] IsMinusAvailable
1208  u64 is_directional_buttons_available : 1; ///< [8.0.0+] IsDirectionalButtonsAvailable
1209 
1210  u64 unused : 48; ///< Unused
1212 
1213 /// NpadSystemButtonProperties
1214 typedef struct {
1215  u32 is_unintended_home_button_input_protection_enabled : 1; ///< IsUnintendedHomeButtonInputProtectionEnabled
1217 
1218 /// HidPowerInfo (system)
1219 typedef struct {
1220  bool is_powered; ///< IsPowered
1221  bool is_charging; ///< IsCharging
1222  u8 reserved[6]; ///< Reserved
1223  u32 battery_level; ///< BatteryLevel, always 0-4.
1224 } HidPowerInfo;
1225 
1226 /// XcdDeviceHandle
1227 typedef struct XcdDeviceHandle {
1228  u64 handle;
1229 } XcdDeviceHandle;
1230 
1231 /// HidNfcXcdDeviceHandleStateImpl
1233  XcdDeviceHandle handle;
1234  u8 is_available;
1235  u8 is_activated;
1236  u8 reserved[6];
1237  u64 sampling_number; ///< SamplingNumber
1239 
1240 /// HidNfcXcdDeviceHandleStateImplAtomicStorage
1242  u64 sampling_number; ///< SamplingNumber
1243  HidNfcXcdDeviceHandleStateImpl state; ///< \ref HidNfcXcdDeviceHandleStateImpl
1245 
1246 /// HidNfcXcdDeviceHandleState
1248  HidCommonLifoHeader header;
1251 
1252 /// HidNpadInternalState
1253 typedef struct HidNpadInternalState {
1254  u32 style_set; ///< Bitfield of \ref HidNpadStyleTag.
1255  u32 joy_assignment_mode; ///< \ref HidNpadJoyAssignmentMode
1256  HidNpadFullKeyColorState full_key_color; ///< \ref HidNpadFullKeyColorState
1257  HidNpadJoyColorState joy_color; ///< \ref HidNpadJoyColorState
1258 
1266 
1273 
1274  u32 device_type; ///< Bitfield of \ref HidDeviceTypeBits.
1275  u32 reserved; ///< Reserved
1276  HidNpadSystemProperties system_properties;
1277  HidNpadSystemButtonProperties system_button_properties;
1278  u32 battery_level[3];
1279  union {
1280  struct { // [1.0.0-3.0.2]
1281  HidNfcXcdDeviceHandleState nfc_xcd_device_handle;
1282  };
1283 
1284  struct {
1285  u32 applet_footer_ui_attribute; ///< Bitfield of AppletFooterUiAttribute.
1286  u8 applet_footer_ui_type; ///< \ref HidAppletFooterUiType
1287  u8 reserved_x41AD[0x5B];
1288  };
1289  };
1290  u8 reserved_x4208[0x20]; ///< Mutex on pre-10.0.0.
1291  HidNpadGcTriggerLifo gc_trigger_lifo;
1292  u32 lark_type_l_and_main; ///< \ref HidNpadLarkType
1293  u32 lark_type_r; ///< \ref HidNpadLarkType
1294  u32 lucia_type; ///< \ref HidNpadLuciaType
1295  u32 lager_type; ///< \ref HidNpadLagerType
1297 
1298 /// HidNpadSharedMemoryEntry
1300  HidNpadInternalState internal_state;
1301  u8 pad[0xC10];
1303 
1304 /// HidNpadSharedMemoryFormat
1306  HidNpadSharedMemoryEntry entries[10];
1308 
1309 // End HidNpad
1310 
1311 // Begin HidGesture
1312 
1313 /// HidGesturePoint
1314 typedef struct HidGesturePoint {
1315  u32 x; ///< X
1316  u32 y; ///< Y
1317 } HidGesturePoint;
1318 
1319 /// HidGestureState
1320 typedef struct HidGestureState {
1321  u64 sampling_number; ///< SamplingNumber
1322  u64 context_number; ///< ContextNumber
1323  u32 type; ///< \ref HidGestureType
1324  u32 direction; ///< \ref HidGestureDirection
1325  u32 x; ///< X
1326  u32 y; ///< Y
1327  s32 delta_x; ///< DeltaX
1328  s32 delta_y; ///< DeltaY
1329  float velocity_x; ///< VelocityX
1330  float velocity_y; ///< VelocityY
1331  u32 attributes; ///< Bitfield of \ref HidGestureAttribute.
1332  float scale; ///< Scale
1333  float rotation_angle; ///< RotationAngle
1334  s32 point_count; ///< Number of entries in the points array.
1335  HidGesturePoint points[4]; ///< Array of \ref HidGesturePoint with the above count.
1336 } HidGestureState;
1337 
1338 /// HidGestureDummyStateAtomicStorage
1340  u64 sampling_number; ///< SamplingNumber
1341  HidGestureState state;
1343 
1344 /// HidGestureLifo
1345 typedef struct HidGestureLifo {
1346  HidCommonLifoHeader header;
1348 } HidGestureLifo;
1349 
1350 /// HidGestureSharedMemoryFormat
1352  HidGestureLifo lifo;
1353  u8 pad[0xF8];
1355 
1356 // End HidGesture
1357 
1358 /// HidConsoleSixAxisSensor
1359 typedef struct {
1360  u64 sampling_number; ///< SamplingNumber
1361  u8 is_seven_six_axis_sensor_at_rest; ///< IsSevenSixAxisSensorAtRest
1362  u8 pad[0x3]; ///< Padding
1363  float verticalization_error; ///< VerticalizationError
1364  UtilFloat3 gyro_bias; ///< GyroBias
1365  u8 pad2[0x4]; ///< Padding
1367 
1368 /// HidSharedMemory
1369 typedef struct HidSharedMemory {
1374  union {
1375  HidBasicXpadSharedMemoryFormat basic_xpad; ///< [1.0.0-9.2.0] BasicXpad
1376  HidDigitizerSharedMemoryFormat digitizer; ///< [10.0.0+] Digitizer
1377  };
1378  HidHomeButtonSharedMemoryFormat home_button;
1379  HidSleepButtonSharedMemoryFormat sleep_button;
1380  HidCaptureButtonSharedMemoryFormat capture_button;
1381  HidInputDetectorSharedMemoryFormat input_detector;
1382  HidUniquePadSharedMemoryFormat unique_pad; ///< [1.0.0-4.1.0] UniquePad
1385  HidConsoleSixAxisSensor console_six_axis_sensor; ///< [5.0.0+] ConsoleSixAxisSensor
1386  u8 unk_x3C220[0x3DE0];
1387 } HidSharedMemory;
1388 
1389 /// HidSevenSixAxisSensorState
1390 typedef struct {
1391  u64 timestamp0;
1392  u64 sampling_number;
1393 
1394  u64 unk_x10;
1395  float unk_x18[10];
1397 
1398 /// HidSevenSixAxisSensorStateEntry
1399 typedef struct {
1400  u64 sampling_number;
1401  u64 unused;
1404 
1405 /// HidSevenSixAxisSensorStates
1406 typedef struct {
1407  HidCommonLifoHeader header;
1408  HidSevenSixAxisSensorStateEntry storage[0x21];
1410 
1411 /// HidSixAxisSensorHandle
1412 typedef union HidSixAxisSensorHandle {
1413  u32 type_value; ///< TypeValue
1414  struct {
1415  u32 npad_style_index : 8; ///< NpadStyleIndex
1416  u32 player_number : 8; ///< PlayerNumber
1417  u32 device_idx : 8; ///< DeviceIdx
1418  u32 pad : 8; ///< Padding
1419  };
1421 
1422 /// HidVibrationDeviceHandle
1424  u32 type_value; ///< TypeValue
1425  struct {
1426  u32 npad_style_index : 8; ///< NpadStyleIndex
1427  u32 player_number : 8; ///< PlayerNumber
1428  u32 device_idx : 8; ///< DeviceIdx
1429  u32 pad : 8; ///< Padding
1430  };
1432 
1433 /// HidVibrationDeviceInfo
1434 typedef struct HidVibrationDeviceInfo {
1435  u32 type; ///< \ref HidVibrationDeviceType
1436  u32 position; ///< \ref HidVibrationDevicePosition
1438 
1439 /// HidVibrationValue
1440 typedef struct HidVibrationValue {
1441  float amp_low; ///< Low Band amplitude. 1.0f: Max amplitude.
1442  float freq_low; ///< Low Band frequency in Hz.
1443  float amp_high; ///< High Band amplitude. 1.0f: Max amplitude.
1444  float freq_high; ///< High Band frequency in Hz.
1446 
1447 /// PalmaConnectionHandle
1449  u64 handle; ///< Handle
1451 
1452 /// PalmaOperationInfo
1453 typedef struct HidPalmaOperationInfo {
1454  u32 type; ///< \ref HidPalmaOperationType
1455  Result res; ///< Result
1456  u8 data[0x140]; ///< Data
1458 
1459 /// PalmaApplicationSectionAccessBuffer
1461  u8 data[0x100]; ///< Application data.
1463 
1464 /// PalmaActivityEntry
1465 typedef struct HidPalmaActivityEntry {
1466  u16 rgb_led_pattern_index; ///< RgbLedPatternIndex
1467  u16 pad; ///< Padding
1468  u32 wave_set; ///< \ref HidPalmaWaveSet
1469  u16 wave_index; ///< WaveIndex
1471 
1472 /// Initialize hid. Called automatically during app startup.
1474 
1475 /// Exit hid. Called automatically during app exit.
1476 void hidExit(void);
1477 
1478 /// Gets the Service object for the actual hid service session.
1480 
1481 /// Gets the address of the SharedMemory.
1483 
1484 ///@name TouchScreen
1485 ///@{
1486 
1487 /// Initialize TouchScreen. Must be called when TouchScreen is being used. Used automatically by \ref hidScanInput when required.
1489 
1490 /**
1491  * @brief Gets \ref HidTouchScreenState.
1492  * @param[out] states Output array of \ref HidTouchScreenState.
1493  * @param[in] count Size of the states array in entries.
1494  * @return Total output entries.
1495  */
1496 size_t hidGetTouchScreenStates(HidTouchScreenState *states, size_t count);
1497 
1498 ///@}
1499 
1500 ///@name Mouse
1501 ///@{
1502 
1503 /// Initialize Mouse. Must be called when Mouse is being used. Used automatically by \ref hidScanInput when required.
1505 
1506 /**
1507  * @brief Gets \ref HidMouseState.
1508  * @param[out] states Output array of \ref HidMouseState.
1509  * @param[in] count Size of the states array in entries.
1510  * @return Total output entries.
1511  */
1512 size_t hidGetMouseStates(HidMouseState *states, size_t count);
1513 
1514 ///@}
1515 
1516 ///@name Keyboard
1517 ///@{
1518 
1519 /// Initialize Keyboard. Must be called when Keyboard is being used. Used automatically by \ref hidScanInput when required.
1521 
1522 /**
1523  * @brief Gets \ref HidKeyboardState.
1524  * @param[out] states Output array of \ref HidKeyboardState.
1525  * @param[in] count Size of the states array in entries.
1526  * @return Total output entries.
1527  */
1528 size_t hidGetKeyboardStates(HidKeyboardState *states, size_t count);
1529 
1530 /**
1531  * @brief Gets the state of a key in a \ref HidKeyboardState.
1532  * @param[in] state \ref HidKeyboardState.
1533  * @param[in] key \ref HidKeyboardKey.
1534  * @return true if the key is pressed, false if not.
1535  */
1537  return (state->keys[key / 64] & (1UL << (key & 63))) != 0;
1538 }
1539 
1540 ///@}
1541 
1542 ///@name HomeButton
1543 ///@{
1544 
1545 /**
1546  * @brief Gets \ref HidHomeButtonState.
1547  * @note Home button shmem must be activated with \ref hidsysActivateHomeButton
1548  * @param[out] states Output array of \ref HidHomeButtonState.
1549  * @param[in] count Size of the states array in entries.
1550  * @return Total output entries.
1551  */
1552 size_t hidGetHomeButtonStates(HidHomeButtonState *states, size_t count);
1553 
1554 ///@}
1555 
1556 ///@name SleepButton
1557 ///@{
1558 
1559 /**
1560  * @brief Gets \ref HidSleepButtonState.
1561  * @note Sleep button shmem must be activated with \ref hidsysActivateSleepButton
1562  * @param[out] states Output array of \ref HidSleepButtonState.
1563  * @param[in] count Size of the states array in entries.
1564  * @return Total output entries.
1565  */
1566 size_t hidGetSleepButtonStates(HidSleepButtonState *states, size_t count);
1567 
1568 ///@}
1569 
1570 ///@name CaptureButton
1571 ///@{
1572 
1573 /**
1574  * @brief Gets \ref HidCaptureButtonState.
1575  * @note Capture button shmem must be activated with \ref hidsysActivateCaptureButton
1576  * @param[out] states Output array of \ref HidCaptureButtonState.
1577  * @param[in] count Size of the states array in entries.
1578  * @return Total output entries.
1579  */
1580 size_t hidGetCaptureButtonStates(HidCaptureButtonState *states, size_t count);
1581 
1582 ///@}
1583 
1584 ///@name Npad
1585 ///@{
1586 
1587 /// Initialize Npad. Must be called when Npad is being used. Used automatically by \ref hidScanInput when required.
1589 
1590 /**
1591  * @brief Gets the StyleSet for the specified Npad.
1592  * @param[in] id \ref HidNpadIdType
1593  * @return Bitfield of \ref HidNpadStyleTag.
1594  */
1596 
1597 /**
1598  * @brief Gets the \ref HidNpadJoyAssignmentMode for the specified Npad.
1599  * @param[in] id \ref HidNpadIdType
1600  * @return \ref HidNpadJoyAssignmentMode
1601  */
1603 
1604 /**
1605  * @brief Gets the main \ref HidNpadControllerColor for the specified Npad.
1606  * @param[in] id \ref HidNpadIdType
1607  * @param[out] color \ref HidNpadControllerColor
1608  */
1610 
1611 /**
1612  * @brief Gets the left/right \ref HidNpadControllerColor for the specified Npad (Joy-Con pair in dual mode).
1613  * @param[in] id \ref HidNpadIdType
1614  * @param[out] color_left \ref HidNpadControllerColor
1615  * @param[out] color_right \ref HidNpadControllerColor
1616  */
1618 
1619 /**
1620  * @brief Gets the DeviceType for the specified Npad.
1621  * @param[in] id \ref HidNpadIdType
1622  * @return Bitfield of \ref HidDeviceTypeBits.
1623  */
1625 
1626 /**
1627  * @brief Gets the \ref HidNpadSystemProperties for the specified Npad.
1628  * @param[in] id \ref HidNpadIdType
1629  * @param[out] out \ref HidNpadSystemProperties
1630  */
1632 
1633 /**
1634  * @brief Gets the \ref HidNpadSystemButtonProperties for the specified Npad.
1635  * @param[in] id \ref HidNpadIdType
1636  * @param[out] out \ref HidNpadSystemButtonProperties
1637  */
1639 
1640 /**
1641  * @brief Gets the main \ref HidPowerInfo for the specified Npad.
1642  * @param[in] id \ref HidNpadIdType
1643  * @param[out] info \ref HidPowerInfo
1644  */
1646 
1647 /**
1648  * @brief Gets the left/right \ref HidPowerInfo for the specified Npad (Joy-Con pair in dual mode).
1649  * @param[in] id \ref HidNpadIdType
1650  * @param[out] info_left \ref HidPowerInfo
1651  * @param[out] info_right \ref HidPowerInfo
1652  */
1654 
1655 /**
1656  * @brief Gets the AppletFooterUiAttributesSet for the specified Npad.
1657  * @note Only available on [9.0.0+].
1658  * @param[in] id \ref HidNpadIdType
1659  * @return Bitfield of AppletFooterUiAttribute (system).
1660  */
1662 
1663 /**
1664  * @brief Gets \ref HidAppletFooterUiType for the specified Npad.
1665  * @note Only available on [9.0.0+].
1666  * @param[in] id \ref HidNpadIdType
1667  * @return \ref HidAppletFooterUiType
1668  */
1670 
1671 /**
1672  * @brief Gets \ref HidNpadLagerType for the specified Npad.
1673  * @param[in] id \ref HidNpadIdType
1674  * @return \ref HidNpadLagerType
1675  */
1677 
1678 /**
1679  * @brief Gets \ref HidNpadFullKeyState.
1680  * @param[out] states Output array of \ref HidNpadFullKeyState.
1681  * @param[in] count Size of the states array in entries.
1682  * @return Total output entries.
1683  */
1685 
1686 /**
1687  * @brief Gets \ref HidNpadHandheldState.
1688  * @param[out] states Output array of \ref HidNpadHandheldState.
1689  * @param[in] count Size of the states array in entries.
1690  * @return Total output entries.
1691  */
1693 
1694 /**
1695  * @brief Gets \ref HidNpadJoyDualState.
1696  * @param[out] states Output array of \ref HidNpadJoyDualState.
1697  * @param[in] count Size of the states array in entries.
1698  * @return Total output entries.
1699  */
1701 
1702 /**
1703  * @brief Gets \ref HidNpadJoyLeftState.
1704  * @param[out] states Output array of \ref HidNpadJoyLeftState.
1705  * @param[in] count Size of the states array in entries.
1706  * @return Total output entries.
1707  */
1709 
1710 /**
1711  * @brief Gets \ref HidNpadJoyRightState.
1712  * @param[out] states Output array of \ref HidNpadJoyRightState.
1713  * @param[in] count Size of the states array in entries.
1714  * @return Total output entries.
1715  */
1717 
1718 /**
1719  * @brief Gets \ref HidNpadGcState.
1720  * @param[out] states Output array of \ref HidNpadGcState.
1721  * @param[in] count Size of the states array in entries.
1722  * @return Total output entries.
1723  */
1724 size_t hidGetNpadStatesGc(HidNpadIdType id, HidNpadGcState *states, size_t count);
1725 
1726 /**
1727  * @brief Gets \ref HidNpadPalmaState.
1728  * @param[out] states Output array of \ref HidNpadPalmaState.
1729  * @param[in] count Size of the states array in entries.
1730  * @return Total output entries.
1731  */
1732 size_t hidGetNpadStatesPalma(HidNpadIdType id, HidNpadPalmaState *states, size_t count);
1733 
1734 /**
1735  * @brief Gets \ref HidNpadLarkState.
1736  * @param[out] states Output array of \ref HidNpadLarkState.
1737  * @param[in] count Size of the states array in entries.
1738  * @return Total output entries.
1739  */
1740 size_t hidGetNpadStatesLark(HidNpadIdType id, HidNpadLarkState *states, size_t count);
1741 
1742 /**
1743  * @brief Gets \ref HidNpadHandheldLarkState.
1744  * @param[out] states Output array of \ref HidNpadHandheldLarkState.
1745  * @param[in] count Size of the states array in entries.
1746  * @return Total output entries.
1747  */
1749 
1750 /**
1751  * @brief Gets \ref HidNpadLuciaState.
1752  * @param[out] states Output array of \ref HidNpadLuciaState.
1753  * @param[in] count Size of the states array in entries.
1754  * @return Total output entries.
1755  */
1756 size_t hidGetNpadStatesLucia(HidNpadIdType id, HidNpadLuciaState *states, size_t count);
1757 
1758 /**
1759  * @brief Gets \ref HidNpadLagerState.
1760  * @param[out] states Output array of \ref HidNpadLagerState.
1761  * @param[in] count Size of the states array in entries.
1762  * @return Total output entries.
1763  */
1764 size_t hidGetNpadStatesLager(HidNpadIdType id, HidNpadLagerState *states, size_t count);
1765 
1766 /**
1767  * @brief Gets \ref HidNpadSystemExtState.
1768  * @param[out] states Output array of \ref HidNpadSystemExtState.
1769  * @param[in] count Size of the states array in entries.
1770  * @return Total output entries.
1771  */
1773 
1774 /**
1775  * @brief Gets \ref HidNpadSystemState.
1776  * @param[out] states Output array of \ref HidNpadSystemState.
1777  * @param[in] count Size of the states array in entries.
1778  * @return Total output entries.
1779  */
1780 size_t hidGetNpadStatesSystem(HidNpadIdType id, HidNpadSystemState *states, size_t count);
1781 
1782 /**
1783  * @brief Gets \ref HidSixAxisSensorState for the specified handle.
1784  * @param[in] handle \ref HidSixAxisSensorHandle
1785  * @param[out] states Output array of \ref HidSixAxisSensorState.
1786  * @param[in] count Size of the states array in entries.
1787  * @return Total output entries.
1788  */
1790 
1791 ///@}
1792 
1793 ///@name Gesture
1794 ///@{
1795 
1796 /// Initialize Gesture. Must be called when Gesture is being used.
1798 
1799 /**
1800  * @brief Gets \ref HidGestureState.
1801  * @param[out] states Output array of \ref HidGestureState.
1802  * @param[in] count Size of the states array in entries.
1803  * @return Total output entries.
1804  */
1805 size_t hidGetGestureStates(HidGestureState *states, size_t count);
1806 
1807 ///@}
1808 
1809 /**
1810  * @brief SendKeyboardLockKeyEvent
1811  * @note Same as \ref hidsysSendKeyboardLockKeyEvent.
1812  * @note Only available on [6.0.0+].
1813  * @param[in] events Bitfield of \ref HidKeyboardLockKeyEvent.
1814  */
1816 
1817 /**
1818  * @brief Gets SixAxisSensorHandles.
1819  * @note Only ::HidNpadStyleTag_NpadJoyDual supports total_handles==2.
1820  * @param[out] handles Output array of \ref HidSixAxisSensorHandle.
1821  * @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.
1822  * @param[in] id \ref HidNpadIdType
1823  * @param[in] style \ref HidNpadStyleTag
1824  */
1826 
1827 /**
1828  * @brief Starts the SixAxisSensor for the specified handle.
1829  * @param[in] handle \ref HidSixAxisSensorHandle
1830  */
1832 
1833 /**
1834  * @brief Stops the SixAxisSensor for the specified handle.
1835  * @param[in] handle \ref HidSixAxisSensorHandle
1836  */
1838 
1839 /**
1840  * @brief IsSixAxisSensorFusionEnabled
1841  * @param[in] handle \ref HidSixAxisSensorHandle
1842  * @param[out] out Output flag.
1843  */
1845 
1846 /**
1847  * @brief EnableSixAxisSensorFusion
1848  * @param[in] handle \ref HidSixAxisSensorHandle
1849  * @param[in] flag Flag
1850  */
1852 
1853 /**
1854  * @brief SetSixAxisSensorFusionParameters
1855  * @param[in] handle \ref HidSixAxisSensorHandle
1856  * @param[in] unk0 Must be 0.0f-1.0f.
1857  * @param[in] unk1 Unknown
1858  */
1860 
1861 /**
1862  * @brief GetSixAxisSensorFusionParameters
1863  * @param[in] handle \ref HidSixAxisSensorHandle
1864  * @param[out] unk0 Unknown
1865  * @param[out] unk1 Unknown
1866  */
1868 
1869 /**
1870  * @brief ResetSixAxisSensorFusionParameters
1871  * @param[in] handle \ref HidSixAxisSensorHandle
1872  */
1874 
1875 /**
1876  * @brief Sets the ::HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle.
1877  * @param[in] handle \ref HidSixAxisSensorHandle
1878  * @param[in] mode \ref HidGyroscopeZeroDriftMode
1879  */
1881 
1882 /**
1883  * @brief Gets the ::HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle.
1884  * @param[in] handle \ref HidSixAxisSensorHandle
1885  * @param[out] mode \ref HidGyroscopeZeroDriftMode
1886  */
1888 
1889 /**
1890  * @brief Resets the ::HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle to ::HidGyroscopeZeroDriftMode_Standard.
1891  * @param[in] handle \ref HidSixAxisSensorHandle
1892  */
1894 
1895 /**
1896  * @brief IsSixAxisSensorAtRest
1897  * @param[in] handle \ref HidSixAxisSensorHandle
1898  * @param[out] out Output flag.
1899  */
1901 
1902 /**
1903  * @brief IsFirmwareUpdateAvailableForSixAxisSensor
1904  * @note Only available on [6.0.0+].
1905  * @param[in] handle \ref HidSixAxisSensorHandle
1906  * @param[out] out Output flag.
1907  */
1909 
1910 /**
1911  * @brief Sets which controller styles are supported.
1912  * @note This is automatically called with the needed styles in \ref hidScanInput when required.
1913  * @param[in] style_set Bitfield of \ref HidNpadStyleTag.
1914  */
1916 
1917 /**
1918  * @brief Gets which controller styles are supported.
1919  * @param[out] style_set Bitfield of \ref HidNpadStyleTag.
1920  */
1922 
1923 /**
1924  * @brief Sets which \ref HidNpadIdType are supported.
1925  * @note This is automatically called with HidNpadIdType_No{1-8} and HidNpadIdType_Handheld when required in \ref hidScanInput.
1926  * @param[in] ids Input array of \ref HidNpadIdType.
1927  * @param[in] count Total entries in the ids array. Must be <=10.
1928  */
1930 
1931 /**
1932  * @brief Gets an Event which is signaled when the \ref hidGetNpadStyleSet output is updated for the specified controller.
1933  * @note The Event must be closed by the user once finished with it.
1934  * @param[in] id \ref HidNpadIdType
1935  * @param[out] out_event Output Event.
1936  * @param[in] autoclear The autoclear for the Event.
1937 **/
1939 
1940 /**
1941  * @brief DisconnectNpad
1942  * @param[in] id \ref HidNpadIdType
1943  */
1945 
1946 /**
1947  * @brief GetPlayerLedPattern
1948  * @param[in] id \ref HidNpadIdType
1949  * @param[out] out Output value.
1950  */
1952 
1953 /**
1954  * @brief Sets the \ref HidNpadJoyHoldType.
1955  * @note Used automatically by \ref hidScanInput when required.
1956  * @param[in] type \ref HidNpadJoyHoldType
1957  */
1959 
1960 /**
1961  * @brief Gets the \ref HidNpadJoyHoldType.
1962  * @param[out] type \ref HidNpadJoyHoldType
1963  */
1965 
1966 /**
1967  * @brief This is the same as \ref hidSetNpadJoyAssignmentModeSingle, except ::HidNpadJoyDeviceType_Left is used for the type.
1968  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
1969  */
1971 
1972 /**
1973  * @brief This is the same as \ref hidSetNpadJoyAssignmentModeSingleWithDestination, except without the output params.
1974  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
1975  * @param[in] type \ref HidNpadJoyDeviceType
1976  */
1978 
1979 /**
1980  * @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).
1981  * @note Used automatically by \ref hidScanInput when required.
1982  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
1983  */
1985 
1986 /**
1987  * @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).
1988  * @brief To be successful, id0/id1 must correspond to controllers supporting styles HidNpadStyleTag_NpadJoyLeft/Right, or HidNpadStyleTag_NpadJoyRight/Left.
1989  * @brief If successful, the id of the resulting dual controller is set to id0.
1990  * @param[in] id0 \ref HidNpadIdType
1991  * @param[in] id1 \ref HidNpadIdType
1992  */
1994 
1995 /**
1996  * @brief StartLrAssignmentMode
1997  */
1999 
2000 /**
2001  * @brief StopLrAssignmentMode
2002  */
2004 
2005 /**
2006  * @brief Sets the \ref HidNpadHandheldActivationMode.
2007  * @param[in] mode \ref HidNpadHandheldActivationMode
2008  */
2010 
2011 /**
2012  * @brief Gets the \ref HidNpadHandheldActivationMode.
2013  * @param[out] out \ref HidNpadHandheldActivationMode
2014  */
2016 
2017 /**
2018  * @brief SwapNpadAssignment
2019  * @param[in] id0 \ref HidNpadIdType
2020  * @param[in] id1 \ref HidNpadIdType
2021  */
2023 
2024 /**
2025  * @brief EnableUnintendedHomeButtonInputProtection
2026  * @note To get the state of this, use \ref hidGetNpadSystemButtonProperties to access HidNpadSystemButtonProperties::is_unintended_home_button_input_protection_enabled.
2027  * @param[in] id \ref HidNpadIdType
2028  * @param[in] flag Whether UnintendedHomeButtonInputProtection is enabled.
2029  */
2031 
2032 /**
2033  * @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).
2034  * @note Only available on [5.0.0+].
2035  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
2036  * @param[in] type \ref HidNpadJoyDeviceType
2037  * @param[out] flag Whether the dest output is set.
2038  * @param[out] dest \ref HidNpadIdType
2039  */
2041 
2042 /**
2043  * @brief SetNpadAnalogStickUseCenterClamp
2044  * @note Only available on [6.1.0+].
2045  * @param[in] flag Flag
2046  */
2048 
2049 /**
2050  * @brief Assigns the button(s) which trigger the CaptureButton.
2051  * @note Only available on [8.0.0+].
2052  * @param[in] style \ref HidNpadStyleTag, exactly 1 bit must be set.
2053  * @param[in] buttons Bitfield of \ref HidNpadButton, multiple bits can be set.
2054  */
2056 
2057 /**
2058  * @brief ClearNpadCaptureButtonAssignment
2059  * @note Only available on [8.0.0+].
2060  */
2062 
2063 /**
2064  * @brief Gets and initializes vibration handles.
2065  * @note Only the following styles support total_handles 2: ::HidNpadStyleTag_NpadFullKey, ::HidNpadStyleTag_NpadHandheld, ::HidNpadStyleTag_NpadJoyDual, ::HidNpadStyleTag_NpadHandheldLark, ::HidNpadStyleTag_NpadSystem, ::HidNpadStyleTag_NpadSystemExt.
2066  * @param[out] handles Output array of \ref HidVibrationDeviceHandle.
2067  * @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.
2068  * @param[in] id \ref HidNpadIdType
2069  * @param[in] style \ref HidNpadStyleTag
2070  */
2072 
2073 /**
2074  * @brief Gets \ref HidVibrationDeviceInfo for the specified device.
2075  * @param[in] handle \ref HidVibrationDeviceHandle
2076  * @param[out] out \ref HidVibrationDeviceInfo
2077  */
2079 
2080 /**
2081  * @brief Sends the \ref HidVibrationDeviceHandle to the specified device.
2082  * @note With ::HidVibrationDeviceType_GcErm, use \ref hidSendVibrationGcErmCommand instead.
2083  * @param[in] handle \ref HidVibrationDeviceHandle
2084  * @param[in] value \ref HidVibrationValue
2085  */
2087 
2088 /**
2089  * @brief Gets the current \ref HidVibrationValue for the specified device.
2090  * @note With ::HidVibrationDeviceType_GcErm, use \ref hidGetActualVibrationGcErmCommand instead.
2091  * @param[in] handle \ref HidVibrationDeviceHandle
2092  * @param[out] out \ref HidVibrationValue
2093  */
2095 
2096 /**
2097  * @brief Sets whether vibration is allowed, this also affects the config displayed by System Settings.
2098  * @param[in] flag Flag
2099  */
2101 
2102 /**
2103  * @brief Gets whether vibration is allowed.
2104  * @param[out] flag Flag
2105  */
2107 
2108 /**
2109  * @brief Send vibration values[index] to handles[index].
2110  * @note With ::HidVibrationDeviceType_GcErm, use \ref hidSendVibrationGcErmCommand instead.
2111  * @param[in] handles Input array of \ref HidVibrationDeviceHandle.
2112  * @param[in] values Input array of \ref HidVibrationValue.
2113  * @param[in] count Total entries in the handles/values arrays.
2114  */
2116 
2117 /**
2118  * @brief Send \ref HidVibrationGcErmCommand to the specified device, for ::HidVibrationDeviceType_GcErm.
2119  * @note Only available on [4.0.0+].
2120  * @param[in] handle \ref HidVibrationDeviceHandle
2121  * @param[in] cmd \ref HidVibrationGcErmCommand
2122  */
2124 
2125 /**
2126  * @brief Get \ref HidVibrationGcErmCommand for the specified device, for ::HidVibrationDeviceType_GcErm.
2127  * @note Only available on [4.0.0+].
2128  * @param[in] handle \ref HidVibrationDeviceHandle
2129  * @param[out] out \ref HidVibrationGcErmCommand
2130  */
2132 
2133 /**
2134  * @brief Begins a forced-permitted vibration session.
2135  * @note Only available on [4.0.0+].
2136  */
2138 
2139 /**
2140  * @brief Ends the session started by \ref hidBeginPermitVibrationSession.
2141  * @note Only available on [4.0.0+].
2142  */
2144 
2145 /**
2146  * @brief Gets whether vibration is available with the specified device.
2147  * @note Only available on [7.0.0+].
2148  * @param[in] handle \ref HidVibrationDeviceHandle
2149  * @param[out] flag Flag
2150  */
2152 
2153 /**
2154  * @brief Starts the SevenSixAxisSensor.
2155  * @note Only available on [5.0.0+].
2156  */
2158 
2159 /**
2160  * @brief Stops the SevenSixAxisSensor.
2161  * @note Only available on [5.0.0+].
2162  */
2164 
2165 /**
2166  * @brief Initializes the SevenSixAxisSensor.
2167  * @note Only available on [5.0.0+].
2168  */
2170 
2171 /**
2172  * @brief Finalizes the SevenSixAxisSensor.
2173  * @note This must be called before \ref hidExit.
2174  * @note Only available on [5.0.0+].
2175  */
2177 
2178 /**
2179  * @brief Sets the SevenSixAxisSensor FusionStrength.
2180  * @note Only available on [5.0.0+].
2181  * @param[in] strength Strength
2182  */
2184 
2185 /**
2186  * @brief Gets the SevenSixAxisSensor FusionStrength.
2187  * @note Only available on [5.0.0+].
2188  * @param[out] strength Strength
2189  */
2191 
2192 /**
2193  * @brief Resets the timestamp for the SevenSixAxisSensor.
2194  * @note Only available on [6.0.0+].
2195  */
2197 
2198 /**
2199  * @brief GetSevenSixAxisSensorStates
2200  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
2201  * @param[out] states Output array of \ref HidSevenSixAxisSensorState.
2202  * @param[in] count Size of the states array in entries.
2203  * @param[out] total_out Total output entries.
2204  */
2205 Result hidGetSevenSixAxisSensorStates(HidSevenSixAxisSensorState *states, size_t count, size_t *total_out);
2206 
2207 /**
2208  * @brief IsSevenSixAxisSensorAtRest
2209  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
2210  * @param[out] out Output flag.
2211  */
2213 
2214 /**
2215  * @brief GetSensorFusionError
2216  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
2217  * @param[out] out Output data.
2218  */
2220 
2221 /**
2222  * @brief GetGyroBias
2223  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
2224  * @param[out] out \ref UtilFloat3
2225  */
2227 
2228 /**
2229  * @brief IsUsbFullKeyControllerEnabled
2230  * @note Only available on [3.0.0+].
2231  * @param[out] out Output flag.
2232  */
2234 
2235 /**
2236  * @brief EnableUsbFullKeyController
2237  * @note Only available on [3.0.0+].
2238  * @param[in] flag Flag
2239  */
2241 
2242 /**
2243  * @brief IsUsbFullKeyControllerConnected
2244  * @note Only available on [3.0.0+].
2245  * @param[in] id \ref HidNpadIdType
2246  * @param[out] out Output flag.
2247  */
2249 
2250 /**
2251  * @brief Gets the \ref HidNpadInterfaceType for the specified controller.
2252  * @note When available, \ref hidsysGetNpadInterfaceType should be used instead.
2253  * @note Only available on [4.0.0+].
2254  * @param[in] id \ref HidNpadIdType
2255  * @param[out] out \ref HidNpadInterfaceType
2256  */
2258 
2259 /**
2260  * @brief GetNpadOfHighestBatteryLevel
2261  * @note Only available on [10.0.0+].
2262  * @param[in] ids Input array of \ref HidNpadIdType, ::HidNpadIdType_Handheld is ignored.
2263  * @param[in] count Total entries in the ids array.
2264  * @param[out] out \ref HidNpadIdType
2265  */
2267 
2268 ///@name Palma, see ::HidNpadStyleTag_NpadPalma.
2269 ///@{
2270 
2271 /**
2272  * @brief GetPalmaConnectionHandle
2273  * @note Only available on [5.0.0+].
2274  * @param[in] id \ref HidNpadIdType
2275  * @param[out] out \ref HidPalmaConnectionHandle
2276  */
2278 
2279 /**
2280  * @brief InitializePalma
2281  * @note Only available on [5.0.0+].
2282  * @param[in] handle \ref HidPalmaConnectionHandle
2283  */
2285 
2286 /**
2287  * @brief Gets an Event which is signaled when data is available with \ref hidGetPalmaOperationInfo.
2288  * @note The Event must be closed by the user once finished with it.
2289  * @note Only available on [5.0.0+].
2290  * @param[in] handle \ref HidPalmaConnectionHandle
2291  * @param[out] out_event Output Event.
2292  * @param[in] autoclear The autoclear for the Event.
2293 **/
2295 
2296 /**
2297  * @brief Gets \ref HidPalmaOperationInfo for a completed operation.
2298  * @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.
2299  * @note Only available on [5.0.0+].
2300  * @param[in] handle \ref HidPalmaConnectionHandle
2301  * @param[out] out \ref HidPalmaOperationInfo
2302  */
2304 
2305 /**
2306  * @brief PlayPalmaActivity
2307  * @note See \ref hidGetPalmaOperationInfo.
2308  * @note Only available on [5.0.0+].
2309  * @param[in] handle \ref HidPalmaConnectionHandle
2310  * @param[in] val Input value.
2311  */
2313 
2314 /**
2315  * @brief SetPalmaFrModeType
2316  * @note See \ref hidGetPalmaOperationInfo.
2317  * @note Only available on [5.0.0+].
2318  * @param[in] handle \ref HidPalmaConnectionHandle
2319  * @param[in] type \ref HidPalmaFrModeType
2320  */
2322 
2323 /**
2324  * @brief ReadPalmaStep
2325  * @note See \ref hidGetPalmaOperationInfo.
2326  * @note \ref hidEnablePalmaStep should be used before this.
2327  * @note Only available on [5.0.0+].
2328  * @param[in] handle \ref HidPalmaConnectionHandle
2329  */
2331 
2332 /**
2333  * @brief EnablePalmaStep
2334  * @note See \ref hidGetPalmaOperationInfo.
2335  * @note Only available on [5.0.0+].
2336  * @param[in] handle \ref HidPalmaConnectionHandle
2337  * @param[in] flag Flag
2338  */
2340 
2341 /**
2342  * @brief ResetPalmaStep
2343  * @note See \ref hidGetPalmaOperationInfo.
2344  * @note Only available on [5.0.0+].
2345  * @param[in] handle \ref HidPalmaConnectionHandle
2346  */
2348 
2349 /**
2350  * @brief ReadPalmaApplicationSection
2351  * @note See \ref hidGetPalmaOperationInfo.
2352  * @note Only available on [5.0.0+].
2353  * @param[in] handle \ref HidPalmaConnectionHandle
2354  * @param[in] inval0 First input value.
2355  * @param[in] size This must be within the size of \ref HidPalmaApplicationSectionAccessBuffer.
2356  */
2358 
2359 /**
2360  * @brief WritePalmaApplicationSection
2361  * @note See \ref hidGetPalmaOperationInfo.
2362  * @note Only available on [5.0.0+].
2363  * @param[in] handle \ref HidPalmaConnectionHandle
2364  * @param[in] inval0 First input value.
2365  * @param[in] size Size of the data in \ref HidPalmaApplicationSectionAccessBuffer.
2366  * @param[in] buf \ref HidPalmaApplicationSectionAccessBuffer
2367  */
2369 
2370 /**
2371  * @brief ReadPalmaUniqueCode
2372  * @note See \ref hidGetPalmaOperationInfo.
2373  * @note Only available on [5.0.0+].
2374  * @param[in] handle \ref HidPalmaConnectionHandle
2375  */
2377 
2378 /**
2379  * @brief SetPalmaUniqueCodeInvalid
2380  * @note See \ref hidGetPalmaOperationInfo.
2381  * @note Only available on [5.0.0+].
2382  * @param[in] handle \ref HidPalmaConnectionHandle
2383  */
2385 
2386 /**
2387  * @brief WritePalmaActivityEntry
2388  * @note See \ref hidGetPalmaOperationInfo.
2389  * @note Only available on [5.0.0+].
2390  * @param[in] handle \ref HidPalmaConnectionHandle
2391  * @param[in] unk Unknown
2392  * @param[in] entry \ref HidPalmaActivityEntry
2393  */
2395 
2396 /**
2397  * @brief WritePalmaRgbLedPatternEntry
2398  * @note See \ref hidGetPalmaOperationInfo.
2399  * @note Only available on [5.0.0+].
2400  * @param[in] handle \ref HidPalmaConnectionHandle
2401  * @param[in] unk Unknown
2402  * @param[in] buffer Input buffer.
2403  * @param[in] size Input buffer size.
2404  */
2405 Result hidWritePalmaRgbLedPatternEntry(HidPalmaConnectionHandle handle, u16 unk, const void* buffer, size_t size);
2406 
2407 /**
2408  * @brief WritePalmaWaveEntry
2409  * @note See \ref hidGetPalmaOperationInfo.
2410  * @note Only available on [5.0.0+].
2411  * @param[in] handle \ref HidPalmaConnectionHandle
2412  * @param[in] wave_set \ref HidPalmaWaveSet
2413  * @param[in] unk Unknown
2414  * @param[in] buffer TransferMemory buffer, must be 0x1000-byte aligned.
2415  * @param[in] tmem_size TransferMemory buffer size, must be 0x1000-byte aligned.
2416  * @param[in] size Actual size of the data in the buffer.
2417  */
2418 Result hidWritePalmaWaveEntry(HidPalmaConnectionHandle handle, HidPalmaWaveSet wave_set, u16 unk, const void* buffer, size_t tmem_size, size_t size);
2419 
2420 /**
2421  * @brief SetPalmaDataBaseIdentificationVersion
2422  * @note See \ref hidGetPalmaOperationInfo.
2423  * @note Only available on [5.0.0+].
2424  * @param[in] handle \ref HidPalmaConnectionHandle
2425  * @param[in] version Version
2426  */
2428 
2429 /**
2430  * @brief GetPalmaDataBaseIdentificationVersion
2431  * @note See \ref hidGetPalmaOperationInfo.
2432  * @note Only available on [5.0.0+].
2433  * @param[in] handle \ref HidPalmaConnectionHandle
2434  */
2436 
2437 /**
2438  * @brief SuspendPalmaFeature
2439  * @note See \ref hidGetPalmaOperationInfo.
2440  * @note Only available on [5.0.0+].
2441  * @param[in] handle \ref HidPalmaConnectionHandle
2442  * @param[in] features Bitfield of \ref HidPalmaFeature.
2443  */
2445 
2446 /**
2447  * @brief ReadPalmaPlayLog
2448  * @note See \ref hidGetPalmaOperationInfo.
2449  * @note Only available on [5.1.0+].
2450  * @param[in] handle \ref HidPalmaConnectionHandle
2451  * @param[in] unk Unknown
2452  */
2454 
2455 /**
2456  * @brief ResetPalmaPlayLog
2457  * @note See \ref hidGetPalmaOperationInfo.
2458  * @note Only available on [5.1.0+].
2459  * @param[in] handle \ref HidPalmaConnectionHandle
2460  * @param[in] unk Unknown
2461  */
2463 
2464 /**
2465  * @brief Sets whether any Palma can connect.
2466  * @note Only available on [5.1.0+].
2467  * @param[in] flag Flag
2468  */
2470 
2471 /**
2472  * @brief Sets whether paired Palma can connect.
2473  * @note Only available on [5.1.0+].
2474  * @param[in] flag Flag
2475  */
2477 
2478 /**
2479  * @brief PairPalma
2480  * @note Only available on [5.1.0+].
2481  * @param[in] handle \ref HidPalmaConnectionHandle
2482  */
2484 
2485 /**
2486  * @brief CancelWritePalmaWaveEntry
2487  * @note Only available on [7.0.0+].
2488  * @param[in] handle \ref HidPalmaConnectionHandle
2489  */
2491 
2492 /**
2493  * @brief EnablePalmaBoostMode
2494  * @note Only available on [5.1.0+]. Uses cmd EnablePalmaBoostMode on [8.0.0+], otherwise cmd SetPalmaBoostMode is used.
2495  * @param[in] flag Flag
2496  */
2498 
2499 /**
2500  * @brief GetPalmaBluetoothAddress
2501  * @note Only available on [8.0.0+].
2502  * @param[in] handle \ref HidPalmaConnectionHandle
2503  * @param[out] out \ref BtdrvAddress
2504  */
2506 
2507 /**
2508  * @brief SetDisallowedPalmaConnection
2509  * @note Only available on [8.0.0+].
2510  * @param[in] addrs Input array of \ref BtdrvAddress.
2511  * @param[in] count Total entries in the addrs array.
2512  */
2514 
2515 ///@}
2516 
2517 /**
2518  * @brief SetNpadCommunicationMode
2519  * @note [2.0.0+] Stubbed, just returns 0.
2520  * @param[in] mode \ref HidNpadCommunicationMode
2521  */
2523 
2524 /**
2525  * @brief GetNpadCommunicationMode
2526  * @note [2.0.0+] Stubbed, always returns output mode ::HidNpadCommunicationMode_Default.
2527  * @param[out] out \ref HidNpadCommunicationMode
2528  */
2530 
2531 /**
2532  * @brief SetTouchScreenConfiguration
2533  * @note Only available on [9.0.0+].
2534  * @param[in] config \ref HidTouchScreenConfigurationForNx
2535  */
2537 
2538 /**
2539  * @brief IsFirmwareUpdateNeededForNotification
2540  * @note Only available on [9.0.0+].
2541  * @param[out] out Output flag.
2542  */
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:1136
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:1084
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.
size_t hidGetHomeButtonStates(HidHomeButtonState *states, size_t count)
Gets HidHomeButtonState.
HidNpadCommonState HidNpadJoyRightState
State for HidNpadStyleTag_NpadJoyRight.
Definition: hid.h:1085
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:1081
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
size_t hidGetCaptureButtonStates(HidCaptureButtonState *states, size_t count)
Gets HidCaptureButtonState.
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:1083
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:1099
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.
size_t hidGetSleepButtonStates(HidSleepButtonState *states, size_t count)
Gets HidSleepButtonState.
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:1082
static bool hidKeyboardStateGetKey(const HidKeyboardState *state, HidKeyboardKey key)
Gets the state of a key in a HidKeyboardState.
Definition: hid.h:1536
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:1135
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:1133
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
HidAnalogStickCalibrationStateImplAtomicStorage.
Definition: hid.h:994
HidAnalogStickCalibrationStateImplLifo.
Definition: hid.h:1000
HidAnalogStickCalibrationStateImpl.
Definition: hid.h:986
HidAnalogStickState.
Definition: hid.h:584
s32 x
X.
Definition: hid.h:585
s32 y
Y.
Definition: hid.h:586
HidBasicXpadLifo.
Definition: hid.h:776
HidBasicXpadSharedMemoryEntry.
Definition: hid.h:782
HidBasicXpadSharedMemoryFormat.
Definition: hid.h:788
HidBasicXpadStateAtomicStorage.
Definition: hid.h:770
HidBasicXpadState.
Definition: hid.h:761
HidCaptureButtonLifo.
Definition: hid.h:912
HidCaptureButtonSharedMemoryFormat.
Definition: hid.h:918
HidCaptureButtonStateAtomicStorage.
Definition: hid.h:906
HidCaptureButtonState.
Definition: hid.h:900
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:1359
float verticalization_error
VerticalizationError.
Definition: hid.h:1363
UtilFloat3 gyro_bias
GyroBias.
Definition: hid.h:1364
u8 is_seven_six_axis_sensor_at_rest
IsSevenSixAxisSensorAtRest.
Definition: hid.h:1361
u64 sampling_number
SamplingNumber.
Definition: hid.h:1360
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
HidDigitizerLifo.
Definition: hid.h:828
HidDigitizerSharedMemoryFormat.
Definition: hid.h:834
HidDigitizerStateAtomicStorage.
Definition: hid.h:822
HidDigitizerState.
Definition: hid.h:797
HidDirectionState.
Definition: hid.h:597
float direction[3][3]
3x3 matrix
Definition: hid.h:598
HidGestureDummyStateAtomicStorage.
Definition: hid.h:1339
u64 sampling_number
SamplingNumber.
Definition: hid.h:1340
HidGestureLifo.
Definition: hid.h:1345
HidGesturePoint.
Definition: hid.h:1314
u32 y
Y.
Definition: hid.h:1316
u32 x
X.
Definition: hid.h:1315
HidGestureSharedMemoryFormat.
Definition: hid.h:1351
HidGestureState.
Definition: hid.h:1320
float rotation_angle
RotationAngle.
Definition: hid.h:1333
float velocity_x
VelocityX.
Definition: hid.h:1329
u32 attributes
Bitfield of HidGestureAttribute.
Definition: hid.h:1331
u64 sampling_number
SamplingNumber.
Definition: hid.h:1321
float velocity_y
VelocityY.
Definition: hid.h:1330
u32 direction
HidGestureDirection
Definition: hid.h:1324
s32 point_count
Number of entries in the points array.
Definition: hid.h:1334
u32 y
Y.
Definition: hid.h:1326
float scale
Scale.
Definition: hid.h:1332
s32 delta_y
DeltaY.
Definition: hid.h:1328
u32 type
HidGestureType
Definition: hid.h:1323
s32 delta_x
DeltaX.
Definition: hid.h:1327
u64 context_number
ContextNumber.
Definition: hid.h:1322
HidGesturePoint points[4]
Array of HidGesturePoint with the above count.
Definition: hid.h:1335
u32 x
X.
Definition: hid.h:1325
HidHomeButtonLifo.
Definition: hid.h:856
HidHomeButtonSharedMemoryFormat.
Definition: hid.h:862
HidHomeButtonStateAtomicStorage.
Definition: hid.h:850
HidHomeButtonState.
Definition: hid.h:844
HidInputDetectorLifo.
Definition: hid.h:940
HidInputDetectorSharedMemoryEntry.
Definition: hid.h:946
HidInputDetectorSharedMemoryFormat.
Definition: hid.h:952
HidInputDetectorStateAtomicStorage.
Definition: hid.h:934
HidInputDetectorState.
Definition: hid.h:928
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:1241
u64 sampling_number
SamplingNumber.
Definition: hid.h:1242
HidNfcXcdDeviceHandleStateImpl state
HidNfcXcdDeviceHandleStateImpl
Definition: hid.h:1243
HidNfcXcdDeviceHandleStateImpl.
Definition: hid.h:1232
u64 sampling_number
SamplingNumber.
Definition: hid.h:1237
HidNfcXcdDeviceHandleState.
Definition: hid.h:1247
HidNpadCommonLifo.
Definition: hid.h:1145
HidNpadCommonStateAtomicStorage.
Definition: hid.h:1139
u64 sampling_number
SamplingNumber.
Definition: hid.h:1140
HidNpadCommonState.
Definition: hid.h:1072
u64 sampling_number
SamplingNumber.
Definition: hid.h:1073
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hid.h:1075
u32 reserved
Reserved.
Definition: hid.h:1078
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:1077
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hid.h:1076
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:1074
Npad colors.
Definition: hid.h:1053
u32 main
RGBA Body Color.
Definition: hid.h:1054
u32 sub
RGBA Buttons Color.
Definition: hid.h:1055
HidNpadFullKeyColorState.
Definition: hid.h:1059
HidNpadControllerColor full_key
HidNpadControllerColor FullKey
Definition: hid.h:1061
u32 attribute
HidColorAttribute
Definition: hid.h:1060
State for HidNpadStyleTag_NpadGc. Loaded from the same lifo as HidNpadFullKeyState,...
Definition: hid.h:1088
u64 sampling_number
SamplingNumber.
Definition: hid.h:1089
u32 trigger_l
L analog trigger. Valid range: 0x0-0x7FFF.
Definition: hid.h:1094
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hid.h:1092
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:1090
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:1093
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hid.h:1091
u32 trigger_r
R analog trigger. Valid range: 0x0-0x7FFF.
Definition: hid.h:1095
HidNpadGcTriggerLifo.
Definition: hid.h:1164
HidNpadGcTriggerStateAtomicStorage.
Definition: hid.h:1158
u64 sampling_number
SamplingNumber.
Definition: hid.h:1159
HidNpadGcTriggerState.
Definition: hid.h:1151
u64 sampling_number
SamplingNumber.
Definition: hid.h:1152
State for HidNpadStyleTag_NpadHandheldLark. The base state is loaded from the same lifo as HidNpadHan...
Definition: hid.h:1112
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:1114
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hid.h:1116
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hid.h:1115
u64 sampling_number
SamplingNumber.
Definition: hid.h:1113
HidNpadLarkType lark_type_r
HidNpadLarkType LarkTypeR
Definition: hid.h:1119
HidNpadLarkType lark_type_l_and_main
HidNpadLarkType LarkTypeLAndMain
Definition: hid.h:1118
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:1117
HidNpadInternalState.
Definition: hid.h:1253
u32 reserved
Reserved.
Definition: hid.h:1275
HidNpadSixAxisSensorLifo joy_dual_right_six_axis_sensor_lifo
JoyDualRightSixAxisSensorLifo.
Definition: hid.h:1270
u32 style_set
Bitfield of HidNpadStyleTag.
Definition: hid.h:1254
HidNpadCommonLifo joy_dual_lifo
JoyDualLifo.
Definition: hid.h:1261
HidNpadCommonLifo palma_lifo
PalmaLifo.
Definition: hid.h:1264
HidNpadJoyColorState joy_color
HidNpadJoyColorState
Definition: hid.h:1257
HidNpadFullKeyColorState full_key_color
HidNpadFullKeyColorState
Definition: hid.h:1256
HidNpadCommonLifo system_ext_lifo
SystemExtLifo.
Definition: hid.h:1265
u8 reserved_x4208[0x20]
Mutex on pre-10.0.0.
Definition: hid.h:1290
u8 applet_footer_ui_type
HidAppletFooterUiType
Definition: hid.h:1286
u32 joy_assignment_mode
HidNpadJoyAssignmentMode
Definition: hid.h:1255
u32 applet_footer_ui_attribute
Bitfield of AppletFooterUiAttribute.
Definition: hid.h:1285
u32 lager_type
HidNpadLagerType
Definition: hid.h:1295
HidNpadCommonLifo full_key_lifo
FullKeyLifo.
Definition: hid.h:1259
HidNpadCommonLifo handheld_lifo
HandheldLifo.
Definition: hid.h:1260
u32 lucia_type
HidNpadLuciaType
Definition: hid.h:1294
HidNpadSixAxisSensorLifo joy_left_six_axis_sensor_lifo
JoyLeftSixAxisSensorLifo.
Definition: hid.h:1271
HidNpadSixAxisSensorLifo full_key_six_axis_sensor_lifo
FullKeySixAxisSensorLifo.
Definition: hid.h:1267
u32 lark_type_l_and_main
HidNpadLarkType
Definition: hid.h:1292
HidNpadSixAxisSensorLifo handheld_six_axis_sensor_lifo
HandheldSixAxisSensorLifo.
Definition: hid.h:1268
u32 lark_type_r
HidNpadLarkType
Definition: hid.h:1293
HidNpadSixAxisSensorLifo joy_dual_left_six_axis_sensor_lifo
JoyDualLeftSixAxisSensorLifo.
Definition: hid.h:1269
HidNpadSixAxisSensorLifo joy_right_six_axis_sensor_lifo
JoyRightSixAxisSensorLifo.
Definition: hid.h:1272
HidNpadCommonLifo joy_right_lifo
JoyRightLifo.
Definition: hid.h:1263
HidNpadCommonLifo joy_left_lifo
JoyLeftLifo.
Definition: hid.h:1262
u32 device_type
Bitfield of HidDeviceTypeBits.
Definition: hid.h:1274
HidNpadJoyColorState.
Definition: hid.h:1065
u32 attribute
HidColorAttribute
Definition: hid.h:1066
HidNpadControllerColor left
HidNpadControllerColor Left
Definition: hid.h:1067
HidNpadControllerColor right
HidNpadControllerColor Right
Definition: hid.h:1068
State for HidNpadStyleTag_NpadLark. The base state is loaded from the same lifo as HidNpadFullKeyStat...
Definition: hid.h:1102
HidNpadLarkType lark_type_l_and_main
HidNpadLarkType LarkTypeLAndMain
Definition: hid.h:1108
u64 sampling_number
SamplingNumber.
Definition: hid.h:1103
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:1104
HidAnalogStickState analog_stick_l
This is always zero.
Definition: hid.h:1105
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:1107
HidAnalogStickState analog_stick_r
This is always zero.
Definition: hid.h:1106
State for HidNpadStyleTag_NpadLucia. The base state is loaded from the same lifo as HidNpadFullKeySta...
Definition: hid.h:1124
HidAnalogStickState analog_stick_r
This is always zero.
Definition: hid.h:1128
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:1129
HidAnalogStickState analog_stick_l
This is always zero.
Definition: hid.h:1127
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:1126
HidNpadLuciaType lucia_type
HidNpadLuciaType
Definition: hid.h:1130
u64 sampling_number
SamplingNumber.
Definition: hid.h:1125
HidNpadSharedMemoryEntry.
Definition: hid.h:1299
HidNpadSharedMemoryFormat.
Definition: hid.h:1305
HidNpadSixAxisSensorLifo.
Definition: hid.h:1188
NpadSystemButtonProperties.
Definition: hid.h:1214
u32 is_unintended_home_button_input_protection_enabled
IsUnintendedHomeButtonInputProtectionEnabled.
Definition: hid.h:1215
NpadSystemProperties.
Definition: hid.h:1194
u64 is_abxy_button_oriented
IsAbxyButtonOriented.
Definition: hid.h:1204
u64 is_directional_buttons_available
[8.0.0+] IsDirectionalButtonsAvailable
Definition: hid.h:1208
u64 bit6
Unused.
Definition: hid.h:1198
u64 bit8
Unused.
Definition: hid.h:1200
u64 is_plus_available
[4.0.0+] IsPlusAvailable
Definition: hid.h:1206
u64 is_powered
Use hidGetNpadPowerInfoSingle / hidGetNpadPowerInfoSplit instead of accessing this directly.
Definition: hid.h:1196
u64 is_charging
Use hidGetNpadPowerInfoSingle / hidGetNpadPowerInfoSplit instead of accessing this directly.
Definition: hid.h:1195
u64 is_unsupported_button_pressed_on_npad_system
IsUnsupportedButtonPressedOnNpadSystem.
Definition: hid.h:1201
u64 bit7
Unused.
Definition: hid.h:1199
u64 is_sl_sr_button_oriented
IsSlSrButtonOriented.
Definition: hid.h:1205
u64 unused
Unused.
Definition: hid.h:1210
u64 is_unsupported_button_pressed_on_npad_system_ext
IsUnsupportedButtonPressedOnNpadSystemExt.
Definition: hid.h:1202
u64 is_minus_available
[4.0.0+] IsMinusAvailable
Definition: hid.h:1207
PalmaActivityEntry.
Definition: hid.h:1465
u16 rgb_led_pattern_index
RgbLedPatternIndex.
Definition: hid.h:1466
u16 wave_index
WaveIndex.
Definition: hid.h:1469
u16 pad
Padding.
Definition: hid.h:1467
u32 wave_set
HidPalmaWaveSet
Definition: hid.h:1468
PalmaApplicationSectionAccessBuffer.
Definition: hid.h:1460
u8 data[0x100]
Application data.
Definition: hid.h:1461
PalmaConnectionHandle.
Definition: hid.h:1448
u64 handle
Handle.
Definition: hid.h:1449
PalmaOperationInfo.
Definition: hid.h:1453
Result res
Result.
Definition: hid.h:1455
u32 type
HidPalmaOperationType
Definition: hid.h:1454
u8 data[0x140]
Data.
Definition: hid.h:1456
HidPowerInfo (system)
Definition: hid.h:1219
bool is_charging
IsCharging.
Definition: hid.h:1221
u32 battery_level
BatteryLevel, always 0-4.
Definition: hid.h:1223
bool is_powered
IsPowered.
Definition: hid.h:1220
HidSevenSixAxisSensorStateEntry.
Definition: hid.h:1399
HidSevenSixAxisSensorState.
Definition: hid.h:1390
HidSevenSixAxisSensorStates.
Definition: hid.h:1406
HidSharedMemory.
Definition: hid.h:1369
HidConsoleSixAxisSensor console_six_axis_sensor
[5.0.0+] ConsoleSixAxisSensor
Definition: hid.h:1385
HidUniquePadSharedMemoryFormat unique_pad
[1.0.0-4.1.0] UniquePad
Definition: hid.h:1382
HidBasicXpadSharedMemoryFormat basic_xpad
[1.0.0-9.2.0] BasicXpad
Definition: hid.h:1375
HidDigitizerSharedMemoryFormat digitizer
[10.0.0+] Digitizer
Definition: hid.h:1376
HidSixAxisSensorStateAtomicStorage.
Definition: hid.h:1182
u64 sampling_number
SamplingNumber.
Definition: hid.h:1183
HidSixAxisSensorState.
Definition: hid.h:1170
u32 reserved
Reserved.
Definition: hid.h:1178
HidDirectionState direction
Direction.
Definition: hid.h:1176
u64 sampling_number
SamplingNumber.
Definition: hid.h:1172
HidVector angle
Angle.
Definition: hid.h:1175
u64 delta_time
DeltaTime.
Definition: hid.h:1171
u32 attributes
Bitfield of HidSixAxisSensorAttribute.
Definition: hid.h:1177
HidVector angular_velocity
AngularVelocity.
Definition: hid.h:1174
HidVector acceleration
Acceleration.
Definition: hid.h:1173
HidSixAxisSensorUserCalibrationStateAtomicStorage.
Definition: hid.h:974
HidSixAxisSensorUserCalibrationStateLifo.
Definition: hid.h:980
HidSixAxisSensorUserCalibrationState.
Definition: hid.h:966
HidSleepButtonLifo.
Definition: hid.h:884
HidSleepButtonSharedMemoryFormat.
Definition: hid.h:890
HidSleepButtonStateAtomicStorage.
Definition: hid.h:878
HidSleepButtonState.
Definition: hid.h:872
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
HidUniquePadConfigAtomicStorage.
Definition: hid.h:1017
HidUniquePadConfigLifo.
Definition: hid.h:1023
HidUniquePadConfigMutex.
Definition: hid.h:961
HidUniquePadConfig.
Definition: hid.h:1006
HidUniquePadLifo.
Definition: hid.h:1029
HidUniquePadSharedMemoryEntry.
Definition: hid.h:1037
HidUniquePadSharedMemoryFormat.
Definition: hid.h:1043
HidVector.
Definition: hid.h:590
HidVibrationDeviceInfo.
Definition: hid.h:1434
u32 type
HidVibrationDeviceType
Definition: hid.h:1435
u32 position
HidVibrationDevicePosition
Definition: hid.h:1436
HidVibrationValue.
Definition: hid.h:1440
float amp_low
Low Band amplitude. 1.0f: Max amplitude.
Definition: hid.h:1441
float freq_high
High Band frequency in Hz.
Definition: hid.h:1444
float freq_low
Low Band frequency in Hz.
Definition: hid.h:1442
float amp_high
High Band amplitude. 1.0f: Max amplitude.
Definition: hid.h:1443
Service object structure.
Definition: service.h:14
Definition: types.h:50
XcdDeviceHandle.
Definition: hid.h:1227
#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:1412
u32 device_idx
DeviceIdx.
Definition: hid.h:1417
u32 npad_style_index
NpadStyleIndex.
Definition: hid.h:1415
u32 type_value
TypeValue.
Definition: hid.h:1413
u32 player_number
PlayerNumber.
Definition: hid.h:1416
u32 pad
Padding.
Definition: hid.h:1418
HidVibrationDeviceHandle.
Definition: hid.h:1423
u32 type_value
TypeValue.
Definition: hid.h:1424
u32 npad_style_index
NpadStyleIndex.
Definition: hid.h:1426
u32 device_idx
DeviceIdx.
Definition: hid.h:1428
u32 pad
Padding.
Definition: hid.h:1429
u32 player_number
PlayerNumber.
Definition: hid.h:1427