libnx  v4.2.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_Npad10 = BIT(10),
240  HidNpadStyleTag_NpadSystemExt = BIT(29), ///< Generic external controller
241  HidNpadStyleTag_NpadSystem = BIT(30), ///< Generic controller
242 
243  HidNpadStyleSet_NpadFullCtrl = HidNpadStyleTag_NpadFullKey | HidNpadStyleTag_NpadHandheld | HidNpadStyleTag_NpadJoyDual, ///< Style set comprising Npad styles containing the full set of controls {FullKey, Handheld, JoyDual}
244  HidNpadStyleSet_NpadStandard = HidNpadStyleSet_NpadFullCtrl | HidNpadStyleTag_NpadJoyLeft | HidNpadStyleTag_NpadJoyRight, ///< Style set comprising all standard Npad styles {FullKey, Handheld, JoyDual, JoyLeft, JoyRight}
246 
247 /// HidColorAttribute
248 typedef enum {
249  HidColorAttribute_Ok = 0, ///< Ok
250  HidColorAttribute_ReadError = 1, ///< ReadError
251  HidColorAttribute_NoController = 2, ///< NoController
253 
254 /// HidNpadButton
255 typedef enum {
256  HidNpadButton_A = BIT(0), ///< A button / Right face button
257  HidNpadButton_B = BIT(1), ///< B button / Down face button
258  HidNpadButton_X = BIT(2), ///< X button / Up face button
259  HidNpadButton_Y = BIT(3), ///< Y button / Left face button
260  HidNpadButton_StickL = BIT(4), ///< Left Stick button
261  HidNpadButton_StickR = BIT(5), ///< Right Stick button
262  HidNpadButton_L = BIT(6), ///< L button
263  HidNpadButton_R = BIT(7), ///< R button
264  HidNpadButton_ZL = BIT(8), ///< ZL button
265  HidNpadButton_ZR = BIT(9), ///< ZR button
266  HidNpadButton_Plus = BIT(10), ///< Plus button
267  HidNpadButton_Minus = BIT(11), ///< Minus button
268  HidNpadButton_Left = BIT(12), ///< D-Pad Left button
269  HidNpadButton_Up = BIT(13), ///< D-Pad Up button
270  HidNpadButton_Right = BIT(14), ///< D-Pad Right button
271  HidNpadButton_Down = BIT(15), ///< D-Pad Down button
272  HidNpadButton_StickLLeft = BIT(16), ///< Left Stick pseudo-button when moved Left
273  HidNpadButton_StickLUp = BIT(17), ///< Left Stick pseudo-button when moved Up
274  HidNpadButton_StickLRight = BIT(18), ///< Left Stick pseudo-button when moved Right
275  HidNpadButton_StickLDown = BIT(19), ///< Left Stick pseudo-button when moved Down
276  HidNpadButton_StickRLeft = BIT(20), ///< Right Stick pseudo-button when moved Left
277  HidNpadButton_StickRUp = BIT(21), ///< Right Stick pseudo-button when moved Up
278  HidNpadButton_StickRRight = BIT(22), ///< Right Stick pseudo-button when moved Right
279  HidNpadButton_StickRDown = BIT(23), ///< Right Stick pseudo-button when moved Left
280  HidNpadButton_LeftSL = BIT(24), ///< SL button on Left Joy-Con
281  HidNpadButton_LeftSR = BIT(25), ///< SR button on Left Joy-Con
282  HidNpadButton_RightSL = BIT(26), ///< SL button on Right Joy-Con
283  HidNpadButton_RightSR = BIT(27), ///< SR button on Right Joy-Con
284  HidNpadButton_Palma = BIT(28), ///< Top button on Poké Ball Plus (Palma) controller
285  HidNpadButton_29 = BIT(29),
286  HidNpadButton_HandheldLeftB = BIT(30), ///< B button on Left NES/HVC controller in Handheld mode
287 
288  HidNpadButton_AnyLeft = HidNpadButton_Left | HidNpadButton_StickLLeft | HidNpadButton_StickRLeft, ///< Bitmask containing all buttons that are considered Left (D-Pad, Sticks)
289  HidNpadButton_AnyUp = HidNpadButton_Up | HidNpadButton_StickLUp | HidNpadButton_StickRUp, ///< Bitmask containing all buttons that are considered Up (D-Pad, Sticks)
290  HidNpadButton_AnyRight = HidNpadButton_Right | HidNpadButton_StickLRight | HidNpadButton_StickRRight, ///< Bitmask containing all buttons that are considered Right (D-Pad, Sticks)
291  HidNpadButton_AnyDown = HidNpadButton_Down | HidNpadButton_StickLDown | HidNpadButton_StickRDown, ///< Bitmask containing all buttons that are considered Down (D-Pad, Sticks)
292  HidNpadButton_AnySL = HidNpadButton_LeftSL | HidNpadButton_RightSL, ///< Bitmask containing SL buttons on both Joy-Cons (Left/Right)
293  HidNpadButton_AnySR = HidNpadButton_LeftSR | HidNpadButton_RightSR, ///< Bitmask containing SR buttons on both Joy-Cons (Left/Right)
294 } HidNpadButton;
295 
296 /// HidDebugPadAttribute
297 typedef enum {
298  HidDebugPadAttribute_IsConnected = BIT(0), ///< IsConnected
300 
301 /// HidTouchAttribute
302 typedef enum {
303  HidTouchAttribute_Start = BIT(0), ///< Start
304  HidTouchAttribute_End = BIT(1), ///< End
306 
307 /// HidMouseAttribute
308 typedef enum {
309  HidMouseAttribute_Transferable = BIT(0), ///< Transferable
310  HidMouseAttribute_IsConnected = BIT(1), ///< IsConnected
312 
313 /// HidNpadAttribute
314 typedef enum {
315  HidNpadAttribute_IsConnected = BIT(0), ///< IsConnected
316  HidNpadAttribute_IsWired = BIT(1), ///< IsWired
317  HidNpadAttribute_IsLeftConnected = BIT(2), ///< IsLeftConnected
318  HidNpadAttribute_IsLeftWired = BIT(3), ///< IsLeftWired
319  HidNpadAttribute_IsRightConnected = BIT(4), ///< IsRightConnected
320  HidNpadAttribute_IsRightWired = BIT(5), ///< IsRightWired
322 
323 /// HidSixAxisSensorAttribute
324 typedef enum {
328 
329 /// HidGestureAttribute
330 typedef enum {
331  HidGestureAttribute_IsNewTouch = BIT(4), ///< IsNewTouch
332  HidGestureAttribute_IsDoubleTap = BIT(8), ///< IsDoubleTap
334 
335 /// HidGestureDirection
336 typedef enum {
343 
344 /// HidGestureType
345 typedef enum {
346  HidGestureType_Idle = 0, ///< Idle
347  HidGestureType_Complete = 1, ///< Complete
348  HidGestureType_Cancel = 2, ///< Cancel
349  HidGestureType_Touch = 3, ///< Touch
350  HidGestureType_Press = 4, ///< Press
351  HidGestureType_Tap = 5, ///< Tap
352  HidGestureType_Pan = 6, ///< Pan
353  HidGestureType_Swipe = 7, ///< Swipe
354  HidGestureType_Pinch = 8, ///< Pinch
355  HidGestureType_Rotate = 9, ///< Rotate
357 
358 /// GyroscopeZeroDriftMode
359 typedef enum {
364 
365 /// NpadJoyHoldType
366 typedef enum {
367  HidNpadJoyHoldType_Vertical = 0, ///< Default / Joy-Con held vertically.
368  HidNpadJoyHoldType_Horizontal = 1, ///< Joy-Con held horizontally.
370 
371 /// NpadJoyDeviceType
372 typedef enum {
376 
377 /// This controls how many Joy-Cons must be attached for handheld-mode to be activated.
378 typedef enum {
379  HidNpadHandheldActivationMode_Dual = 0, ///< Dual (2 Joy-Cons)
380  HidNpadHandheldActivationMode_Single = 1, ///< Single (1 Joy-Con)
381  HidNpadHandheldActivationMode_None = 2, ///< None (0 Joy-Cons)
383 
384 /// NpadJoyAssignmentMode
385 typedef enum {
386  HidNpadJoyAssignmentMode_Dual = 0, ///< Dual (Set by \ref hidSetNpadJoyAssignmentModeDual)
387  HidNpadJoyAssignmentMode_Single = 1, ///< Single (Set by hidSetNpadJoyAssignmentModeSingle*())
389 
390 /// NpadCommunicationMode
391 typedef enum {
397 
398 /// DeviceType (system)
399 typedef enum {
400  HidDeviceTypeBits_FullKey = BIT(0), ///< Pro Controller and Gc controller.
401  HidDeviceTypeBits_Unknown1 = BIT(1), ///< Unknown.
402  HidDeviceTypeBits_HandheldLeft = BIT(2), ///< Joy-Con/Famicom/NES left controller in handheld mode.
403  HidDeviceTypeBits_HandheldRight = BIT(3), ///< Joy-Con/Famicom/NES right controller in handheld mode.
404  HidDeviceTypeBits_JoyLeft = BIT(4), ///< Joy-Con left controller.
405  HidDeviceTypeBits_JoyRight = BIT(5), ///< Joy-Con right controller.
406  HidDeviceTypeBits_Palma = BIT(6), ///< Poké Ball Plus controller.
407  HidDeviceTypeBits_LarkLeftHVC = BIT(7), ///< Famicom left controller.
408  HidDeviceTypeBits_LarkRightHVC = BIT(8), ///< Famicom right controller (with microphone).
409  HidDeviceTypeBits_LarkLeftNES = BIT(9), ///< NES left controller.
410  HidDeviceTypeBits_LarkRightNES = BIT(10), ///< NES right controller.
411  HidDeviceTypeBits_SystemExt = BIT(15), ///< Generic external controller.
412  HidDeviceTypeBits_System = BIT(31), ///< Generic controller.
414 
415 /// Internal DeviceType for [9.0.0+]. Converted to/from the pre-9.0.0 version of this by the hiddbg funcs.
416 typedef enum {
417  HidDeviceType_JoyRight1 = 1, ///< ::HidDeviceTypeBits_JoyRight
418  HidDeviceType_JoyLeft2 = 2, ///< ::HidDeviceTypeBits_JoyLeft
419  HidDeviceType_FullKey3 = 3, ///< ::HidDeviceTypeBits_FullKey
420  HidDeviceType_JoyLeft4 = 4, ///< ::HidDeviceTypeBits_JoyLeft
421  HidDeviceType_JoyRight5 = 5, ///< ::HidDeviceTypeBits_JoyRight
422  HidDeviceType_FullKey6 = 6, ///< ::HidDeviceTypeBits_FullKey
423  HidDeviceType_LarkLeftHVC = 7, ///< ::HidDeviceTypeBits_LarkLeftHVC
424  HidDeviceType_LarkRightHVC = 8, ///< ::HidDeviceTypeBits_LarkRightHVC
425  HidDeviceType_LarkLeftNES = 9, ///< ::HidDeviceTypeBits_LarkLeftNES
426  HidDeviceType_LarkRightNES = 10, ///< ::HidDeviceTypeBits_LarkRightNES
427  HidDeviceType_Palma = 12, ///< [9.0.0+] ::HidDeviceTypeBits_Palma
428  HidDeviceType_FullKey13 = 13, ///< ::HidDeviceTypeBits_FullKey
429  HidDeviceType_FullKey15 = 15, ///< ::HidDeviceTypeBits_FullKey
430  HidDeviceType_System19 = 19, ///< ::HidDeviceTypeBits_System with \ref HidNpadStyleTag |= ::HidNpadStyleTag_NpadFullKey.
431  HidDeviceType_System20 = 20, ///< ::HidDeviceTypeBits_System with \ref HidNpadStyleTag |= ::HidNpadStyleTag_NpadJoyDual.
432  HidDeviceType_System21 = 21, ///< ::HidDeviceTypeBits_System with \ref HidNpadStyleTag |= ::HidNpadStyleTag_NpadJoyDual.
433 } HidDeviceType;
434 
435 /// AppletFooterUiType (system)
436 typedef enum {
438  HidAppletFooterUiType_HandheldNone = 1, ///< HandheldNone
439  HidAppletFooterUiType_HandheldJoyConLeftOnly = 2, ///< HandheldJoyConLeftOnly
440  HidAppletFooterUiType_HandheldJoyConRightOnly = 3, ///< HandheldJoyConRightOnly
441  HidAppletFooterUiType_HandheldJoyConLeftJoyConRight = 4, ///< HandheldJoyConLeftJoyConRight
443  HidAppletFooterUiType_JoyDualLeftOnly = 6, ///< JoyDualLeftOnly
444  HidAppletFooterUiType_JoyDualRightOnly = 7, ///< JoyDualRightOnly
445  HidAppletFooterUiType_JoyLeftHorizontal = 8, ///< JoyLeftHorizontal
446  HidAppletFooterUiType_JoyLeftVertical = 9, ///< JoyLeftVertical
447  HidAppletFooterUiType_JoyRightHorizontal = 10, ///< JoyRightHorizontal
448  HidAppletFooterUiType_JoyRightVertical = 11, ///< JoyRightVertical
449  HidAppletFooterUiType_SwitchProController = 12, ///< SwitchProController
450  HidAppletFooterUiType_CompatibleProController = 13, ///< CompatibleProController
451  HidAppletFooterUiType_CompatibleJoyCon = 14, ///< CompatibleJoyCon
452  HidAppletFooterUiType_LarkHvc1 = 15, ///< LarkHvc1
453  HidAppletFooterUiType_LarkHvc2 = 16, ///< LarkHvc2
454  HidAppletFooterUiType_LarkNesLeft = 17, ///< LarkNesLeft
455  HidAppletFooterUiType_LarkNesRight = 18, ///< LarkNesRight
457  HidAppletFooterUiType_Verification = 20, ///< Verification
459 
460 /// NpadInterfaceType (system)
461 typedef enum {
462  HidNpadInterfaceType_Bluetooth = 1, ///< Bluetooth.
465  HidNpadInterfaceType_Unknown4 = 4, ///< Unknown.
467 
468 /// XcdInterfaceType
469 typedef enum {
470  XcdInterfaceType_Bluetooth = BIT(0),
471  XcdInterfaceType_Uart = BIT(1),
472  XcdInterfaceType_Usb = BIT(2),
473  XcdInterfaceType_FieldSet = BIT(7),
475 
476 /// NpadLarkType
477 typedef enum {
478  HidNpadLarkType_Invalid = 0, ///< Invalid
479  HidNpadLarkType_H1 = 1, ///< H1
480  HidNpadLarkType_H2 = 2, ///< H2
481  HidNpadLarkType_NL = 3, ///< NL
482  HidNpadLarkType_NR = 4, ///< NR
484 
485 /// NpadLuciaType
486 typedef enum {
487  HidNpadLuciaType_Invalid = 0, ///< Invalid
488  HidNpadLuciaType_J = 1, ///< J
489  HidNpadLuciaType_E = 2, ///< E
490  HidNpadLuciaType_U = 3, ///< U
492 
493 /// Type values for HidVibrationDeviceInfo::type.
494 typedef enum {
496  HidVibrationDeviceType_LinearResonantActuator = 1, ///< LinearResonantActuator
497  HidVibrationDeviceType_GcErm = 2, ///< GcErm (::HidNpadStyleTag_NpadGc)
499 
500 /// VibrationDevicePosition
501 typedef enum {
506 
507 /// VibrationGcErmCommand
508 typedef enum {
509  HidVibrationGcErmCommand_Stop = 0, ///< Stops the vibration with a decay phase.
510  HidVibrationGcErmCommand_Start = 1, ///< Starts the vibration.
511  HidVibrationGcErmCommand_StopHard = 2, ///< Stops the vibration immediately, with no decay phase.
513 
514 /// PalmaOperationType
515 typedef enum {
516  HidPalmaOperationType_PlayActivity = 0, ///< PlayActivity
517  HidPalmaOperationType_SetFrModeType = 1, ///< SetFrModeType
519  HidPalmaOperationType_EnableStep = 3, ///< EnableStep
521  HidPalmaOperationType_ReadApplicationSection = 5, ///< ReadApplicationSection
522  HidPalmaOperationType_WriteApplicationSection = 6, ///< WriteApplicationSection
523  HidPalmaOperationType_ReadUniqueCode = 7, ///< ReadUniqueCode
524  HidPalmaOperationType_SetUniqueCodeInvalid = 8, ///< SetUniqueCodeInvalid
525  HidPalmaOperationType_WriteActivityEntry = 9, ///< WriteActivityEntry
526  HidPalmaOperationType_WriteRgbLedPatternEntry = 10, ///< WriteRgbLedPatternEntry
527  HidPalmaOperationType_WriteWaveEntry = 11, ///< WriteWaveEntry
528  HidPalmaOperationType_ReadDataBaseIdentificationVersion = 12, ///< ReadDataBaseIdentificationVersion
529  HidPalmaOperationType_WriteDataBaseIdentificationVersion = 13, ///< WriteDataBaseIdentificationVersion
530  HidPalmaOperationType_SuspendFeature = 14, ///< SuspendFeature
531  HidPalmaOperationType_ReadPlayLog = 15, ///< [5.1.0+] ReadPlayLog
532  HidPalmaOperationType_ResetPlayLog = 16, ///< [5.1.0+] ResetPlayLog
534 
535 /// PalmaFrModeType
536 typedef enum {
541  HidPalmaFrModeType_Downloaded = 4, ///< Downloaded
543 
544 /// PalmaWaveSet
545 typedef enum {
546  HidPalmaWaveSet_Small = 0, ///< Small
547  HidPalmaWaveSet_Medium = 1, ///< Medium
548  HidPalmaWaveSet_Large = 2, ///< Large
550 
551 /// PalmaFeature
552 typedef enum {
553  HidPalmaFeature_FrMode = BIT(0), ///< FrMode
554  HidPalmaFeature_RumbleFeedback = BIT(1), ///< RumbleFeedback
555  HidPalmaFeature_Step = BIT(2), ///< Step
556  HidPalmaFeature_MuteSwitch = BIT(3), ///< MuteSwitch
558 
559 /// HidAnalogStickState
560 typedef struct HidAnalogStickState {
561  s32 x; ///< X
562  s32 y; ///< Y
564 
565 /// HidVector
566 typedef struct HidVector {
567  float x;
568  float y;
569  float z;
570 } HidVector;
571 
572 /// HidDirectionState
573 typedef struct HidDirectionState {
574  float direction[3][3]; ///< 3x3 matrix
576 
577 #define JOYSTICK_MAX (0x7FFF)
578 #define JOYSTICK_MIN (-0x7FFF)
579 
580 // End enums and output structs
581 
582 /// HidCommonLifoHeader
583 typedef struct HidCommonLifoHeader {
584  u64 unused; ///< Unused
585  u64 buffer_count; ///< BufferCount
586  u64 tail; ///< Tail
587  u64 count; ///< Count
589 
590 // Begin HidDebugPad
591 
592 /// HidDebugPadState
593 typedef struct HidDebugPadState {
594  u64 sampling_number; ///< SamplingNumber
595  u32 attributes; ///< Bitfield of \ref HidDebugPadAttribute.
596  u32 buttons; ///< Bitfield of \ref HidDebugPadButton.
600 
601 /// HidDebugPadStateAtomicStorage
603  u64 sampling_number; ///< SamplingNumber
604  HidDebugPadState state; ///< \ref HidDebugPadState
606 
607 /// HidDebugPadLifo
608 typedef struct HidDebugPadLifo {
609  HidCommonLifoHeader header; ///< \ref HidCommonLifoHeader
610  HidDebugPadStateAtomicStorage storage[17]; ///< \ref HidDebugPadStateAtomicStorage
612 
613 /// HidDebugPadSharedMemoryFormat
615  HidDebugPadLifo lifo;
616  u8 padding[0x138];
618 
619 // End HidDebugPad
620 
621 // Begin HidTouchScreen
622 
623 /// HidTouchState
624 typedef struct HidTouchState {
625  u64 delta_time; ///< DeltaTime
626  u32 attributes; ///< Bitfield of \ref HidTouchAttribute.
627  u32 finger_id; ///< FingerId
628  u32 x; ///< X
629  u32 y; ///< Y
630  u32 diameter_x; ///< DiameterX
631  u32 diameter_y; ///< DiameterY
632  u32 rotation_angle; ///< RotationAngle
633  u32 reserved; ///< Reserved
634 } HidTouchState;
635 
636 /// HidTouchScreenState
637 typedef struct HidTouchScreenState {
638  u64 sampling_number; ///< SamplingNumber
639  s32 count; ///< Number of entries in the touches array.
640  u32 reserved; ///< Reserved
641  HidTouchState touches[16]; ///< Array of \ref HidTouchState, with the above count.
643 
644 /// HidTouchScreenStateAtomicStorage
646  u64 sampling_number; ///< SamplingNumber
647  HidTouchScreenState state; ///< \ref HidTouchScreenState
649 
650 /// HidTouchScreenLifo
651 typedef struct HidTouchScreenLifo {
652  HidCommonLifoHeader header; ///< \ref HidCommonLifoHeader
653  HidTouchScreenStateAtomicStorage storage[17]; ///< \ref HidTouchScreenStateAtomicStorage
655 
656 /// HidTouchScreenSharedMemoryFormat
658  HidTouchScreenLifo lifo;
659  u8 padding[0x3c8];
661 
662 /// HidTouchScreenConfigurationForNx
663 typedef struct {
664  u8 mode; ///< \ref HidTouchScreenModeForNx
665  u8 reserved[0xF]; ///< Reserved
667 
668 // End HidTouchScreen
669 
670 // Begin HidMouse
671 
672 /// HidMouseState
673 typedef struct HidMouseState {
674  u64 sampling_number; ///< SamplingNumber
675  s32 x; ///< X
676  s32 y; ///< Y
677  s32 delta_x; ///< DeltaX
678  s32 delta_y; ///< DeltaY
679  s32 wheel_delta_x; ///< WheelDeltaX
680  s32 wheel_delta_y; ///< WheelDeltaY
681  u32 buttons; ///< Bitfield of \ref HidMouseButton.
682  u32 attributes; ///< Bitfield of \ref HidMouseAttribute.
683 } HidMouseState;
684 
685 /// HidMouseStateAtomicStorage
687  u64 sampling_number; ///< SamplingNumber
688  HidMouseState state;
690 
691 /// HidMouseLifo
692 typedef struct HidMouseLifo {
693  HidCommonLifoHeader header;
694  HidMouseStateAtomicStorage storage[17];
695 } HidMouseLifo;
696 
697 /// HidMouseSharedMemoryFormat
699  HidMouseLifo lifo;
700  u8 padding[0xB0];
702 
703 // End HidMouse
704 
705 // Begin HidKeyboard
706 
707 /// HidKeyboardState
708 typedef struct HidKeyboardState {
709  u64 sampling_number; ///< SamplingNumber
710  u64 modifiers; ///< Bitfield of \ref HidKeyboardModifier.
711  u64 keys[4];
713 
714 /// HidKeyboardStateAtomicStorage
716  u64 sampling_number; ///< SamplingNumber
717  HidKeyboardState state;
719 
720 /// HidKeyboardLifo
721 typedef struct HidKeyboardLifo {
722  HidCommonLifoHeader header;
723  HidKeyboardStateAtomicStorage storage[17];
725 
726 /// HidKeyboardSharedMemoryFormat
728  HidKeyboardLifo lifo;
729  u8 padding[0x28];
731 
732 // End HidKeyboard
733 
734 // Begin HidNpad
735 
736 /// Npad colors.
737 /// Color fields are zero when not set.
738 typedef struct HidNpadControllerColor {
739  u32 main; ///< RGBA Body Color
740  u32 sub; ///< RGBA Buttons Color
742 
743 /// HidNpadFullKeyColorState
744 typedef struct HidNpadFullKeyColorState {
745  u32 attribute; ///< \ref HidColorAttribute
746  HidNpadControllerColor full_key; ///< \ref HidNpadControllerColor FullKey
748 
749 /// HidNpadJoyColorState
750 typedef struct HidNpadJoyColorState {
751  u32 attribute; ///< \ref HidColorAttribute
752  HidNpadControllerColor left; ///< \ref HidNpadControllerColor Left
753  HidNpadControllerColor right; ///< \ref HidNpadControllerColor Right
755 
756 /// HidNpadCommonState
757 typedef struct HidNpadCommonState {
758  u64 sampling_number; ///< SamplingNumber
759  u64 buttons; ///< Bitfield of \ref HidNpadButton.
762  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
763  u32 reserved; ///< Reserved
765 
766 typedef HidNpadCommonState HidNpadFullKeyState; ///< State for ::HidNpadStyleTag_NpadFullKey.
767 typedef HidNpadCommonState HidNpadHandheldState; ///< State for ::HidNpadStyleTag_NpadHandheld.
768 typedef HidNpadCommonState HidNpadJoyDualState; ///< State for ::HidNpadStyleTag_NpadJoyDual.
769 typedef HidNpadCommonState HidNpadJoyLeftState; ///< State for ::HidNpadStyleTag_NpadJoyLeft.
770 typedef HidNpadCommonState HidNpadJoyRightState; ///< State for ::HidNpadStyleTag_NpadJoyRight.
771 
772 /// State for ::HidNpadStyleTag_NpadGc. Loaded from the same lifo as \ref HidNpadFullKeyState, with the additional trigger_l/trigger_r loaded from elsewhere.
773 typedef struct HidNpadGcState {
774  u64 sampling_number; ///< SamplingNumber
775  u64 buttons; ///< Bitfield of \ref HidNpadButton.
778  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
779  u32 trigger_l; ///< L analog trigger. Valid range: 0x0-0x7FFF.
780  u32 trigger_r; ///< R analog trigger. Valid range: 0x0-0x7FFF.
781  u32 pad;
783 
784 typedef HidNpadCommonState HidNpadPalmaState; ///< State for ::HidNpadStyleTag_NpadPalma.
785 
786 /// State for ::HidNpadStyleTag_NpadLark. The base state is loaded from the same lifo as \ref HidNpadFullKeyState.
787 typedef struct HidNpadLarkState {
788  u64 sampling_number; ///< SamplingNumber
789  u64 buttons; ///< Bitfield of \ref HidNpadButton.
790  HidAnalogStickState analog_stick_l; ///< This is always zero.
791  HidAnalogStickState analog_stick_r; ///< This is always zero.
792  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
793  HidNpadLarkType lark_type_l_and_main; ///< \ref HidNpadLarkType LarkTypeLAndMain
795 
796 /// State for ::HidNpadStyleTag_NpadHandheldLark. The base state is loaded from the same lifo as \ref HidNpadHandheldState.
797 typedef struct HidNpadHandheldLarkState {
798  u64 sampling_number; ///< SamplingNumber
799  u64 buttons; ///< Bitfield of \ref HidNpadButton.
802  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
803  HidNpadLarkType lark_type_l_and_main; ///< \ref HidNpadLarkType LarkTypeLAndMain
804  HidNpadLarkType lark_type_r; ///< \ref HidNpadLarkType LarkTypeR
805  u32 pad;
807 
808 /// State for ::HidNpadStyleTag_NpadLucia. The base state is loaded from the same lifo as \ref HidNpadFullKeyState.
809 typedef struct HidNpadLuciaState {
810  u64 sampling_number; ///< SamplingNumber
811  u64 buttons; ///< Bitfield of \ref HidNpadButton.
812  HidAnalogStickState analog_stick_l; ///< This is always zero.
813  HidAnalogStickState analog_stick_r; ///< This is always zero.
814  u32 attributes; ///< Bitfield of \ref HidNpadAttribute.
815  HidNpadLuciaType lucia_type; ///< \ref HidNpadLuciaType
817 
818 typedef HidNpadCommonState HidNpadSystemExtState; ///< State for ::HidNpadStyleTag_NpadSystemExt.
819 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.
820 
821 /// HidNpadCommonStateAtomicStorage
823  u64 sampling_number; ///< SamplingNumber
824  HidNpadCommonState state;
826 
827 /// HidNpadCommonLifo
828 typedef struct HidNpadCommonLifo {
829  HidCommonLifoHeader header;
832 
833 /// HidNpadGcTriggerState
834 typedef struct HidNpadGcTriggerState {
835  u64 sampling_number; ///< SamplingNumber
836  u32 trigger_l;
837  u32 trigger_r;
839 
840 /// HidNpadGcTriggerStateAtomicStorage
842  u64 sampling_number; ///< SamplingNumber
843  HidNpadGcTriggerState state;
845 
846 /// HidNpadGcTriggerLifo
847 typedef struct HidNpadGcTriggerLifo {
848  HidCommonLifoHeader header;
851 
852 /// HidSixAxisSensorState
853 typedef struct HidSixAxisSensorState {
854  u64 delta_time; ///< DeltaTime
855  u64 sampling_number; ///< SamplingNumber
856  HidVector acceleration; ///< Acceleration
857  HidVector angular_velocity; ///< AngularVelocity
858  HidVector angle; ///< Angle
859  HidDirectionState direction; ///< Direction
860  u32 attributes; ///< Bitfield of \ref HidSixAxisSensorAttribute.
861  u32 reserved; ///< Reserved
863 
864 /// HidSixAxisSensorStateAtomicStorage
866  u64 sampling_number; ///< SamplingNumber
867  HidSixAxisSensorState state;
869 
870 /// HidNpadSixAxisSensorLifo
871 typedef struct HidNpadSixAxisSensorLifo {
872  HidCommonLifoHeader header;
875 
876 /// NpadSystemProperties
877 typedef struct {
878  u64 is_charging : 3; ///< Use \ref hidGetNpadPowerInfoSingle / \ref hidGetNpadPowerInfoSplit instead of accessing this directly.
879  u64 is_powered : 3; ///< Use \ref hidGetNpadPowerInfoSingle / \ref hidGetNpadPowerInfoSplit instead of accessing this directly.
880 
881  u64 bit6 : 1; ///< Unused
882  u64 bit7 : 1; ///< Unused
883  u64 bit8 : 1; ///< Unused
884  u64 is_unsupported_button_pressed_on_npad_system : 1; ///< IsUnsupportedButtonPressedOnNpadSystem
885  u64 is_unsupported_button_pressed_on_npad_system_ext : 1; ///< IsUnsupportedButtonPressedOnNpadSystemExt
886 
887  u64 is_abxy_button_oriented : 1; ///< IsAbxyButtonOriented
888  u64 is_sl_sr_button_oriented : 1; ///< IsSlSrButtonOriented
889  u64 is_plus_available : 1; ///< [4.0.0+] IsPlusAvailable
890  u64 is_minus_available : 1; ///< [4.0.0+] IsMinusAvailable
891  u64 is_directional_buttons_available : 1; ///< [8.0.0+] IsDirectionalButtonsAvailable
892 
893  u64 unused : 48; ///< Unused
895 
896 /// NpadSystemButtonProperties
897 typedef struct {
898  u32 is_unintended_home_button_input_protection_enabled : 1; ///< IsUnintendedHomeButtonInputProtectionEnabled
900 
901 /// HidPowerInfo (system)
902 typedef struct {
903  bool is_powered; ///< IsPowered
904  bool is_charging; ///< IsCharging
905  u8 reserved[6]; ///< Reserved
906  u32 battery_level; ///< BatteryLevel, always 0-4.
907 } HidPowerInfo;
908 
909 /// XcdDeviceHandle
910 typedef struct XcdDeviceHandle {
911  u64 handle;
913 
914 /// HidNfcXcdDeviceHandleStateImpl
916  XcdDeviceHandle handle;
917  u8 is_available;
918  u8 is_activated;
919  u8 reserved[6];
920  u64 sampling_number; ///< SamplingNumber
922 
923 /// HidNfcXcdDeviceHandleStateImplAtomicStorage
925  u64 sampling_number; ///< SamplingNumber
926  HidNfcXcdDeviceHandleStateImpl state; ///< \ref HidNfcXcdDeviceHandleStateImpl
928 
929 /// HidNfcXcdDeviceHandleState
931  HidCommonLifoHeader header;
934 
935 /// HidNpadInternalState
936 typedef struct HidNpadInternalState {
937  u32 style_set; ///< Bitfield of \ref HidNpadStyleTag.
938  u32 joy_assignment_mode; ///< \ref HidNpadJoyAssignmentMode
939  HidNpadFullKeyColorState full_key_color; ///< \ref HidNpadFullKeyColorState
940  HidNpadJoyColorState joy_color; ///< \ref HidNpadJoyColorState
941 
943  HidNpadCommonLifo handheld_lifo; ///< HandheldLifo
948  HidNpadCommonLifo system_ext_lifo; ///< SystemExtLifo
949 
956 
957  u32 device_type; ///< Bitfield of \ref HidDeviceTypeBits.
958  u32 reserved; ///< Reserved
959  HidNpadSystemProperties system_properties;
960  HidNpadSystemButtonProperties system_button_properties;
961  u32 battery_level[3];
962  union {
963  struct { // [1.0.0-3.0.2]
964  HidNfcXcdDeviceHandleState nfc_xcd_device_handle;
965  };
966 
967  struct {
968  u32 applet_footer_ui_attribute; ///< Bitfield of AppletFooterUiAttribute.
969  u8 applet_footer_ui_type; ///< \ref HidAppletFooterUiType
970  u8 reserved_x41AD[0x5B];
971  };
972  };
973  u8 reserved_x4208[0x20]; ///< Mutex on pre-10.0.0.
974  HidNpadGcTriggerLifo gc_trigger_lifo;
975  u32 lark_type_l_and_main; ///< \ref HidNpadLarkType
976  u32 lark_type_r; ///< \ref HidNpadLarkType
977  u32 lucia_type; ///< \ref HidNpadLuciaType
978  u32 unk_x43EC;
980 
981 /// HidNpadSharedMemoryEntry
982 typedef struct HidNpadSharedMemoryEntry {
983  HidNpadInternalState internal_state;
984  u8 pad[0xC10];
986 
987 /// HidNpadSharedMemoryFormat
989  HidNpadSharedMemoryEntry entries[10];
991 
992 // End HidNpad
993 
994 // Begin HidGesture
995 
996 /// HidGesturePoint
997 typedef struct HidGesturePoint {
998  u32 x; ///< X
999  u32 y; ///< Y
1000 } HidGesturePoint;
1001 
1002 /// HidGestureState
1003 typedef struct HidGestureState {
1004  u64 sampling_number; ///< SamplingNumber
1005  u64 context_number; ///< ContextNumber
1006  u32 type; ///< \ref HidGestureType
1007  u32 direction; ///< \ref HidGestureDirection
1008  u32 x; ///< X
1009  u32 y; ///< Y
1010  s32 delta_x; ///< DeltaX
1011  s32 delta_y; ///< DeltaY
1012  float velocity_x; ///< VelocityX
1013  float velocity_y; ///< VelocityY
1014  u32 attributes; ///< Bitfield of \ref HidGestureAttribute.
1015  float scale; ///< Scale
1016  float rotation_angle; ///< RotationAngle
1017  s32 point_count; ///< Number of entries in the points array.
1018  HidGesturePoint points[4]; ///< Array of \ref HidGesturePoint with the above count.
1019 } HidGestureState;
1020 
1021 /// HidGestureDummyStateAtomicStorage
1023  u64 sampling_number; ///< SamplingNumber
1024  HidGestureState state;
1026 
1027 /// HidGestureLifo
1028 typedef struct HidGestureLifo {
1029  HidCommonLifoHeader header;
1031 } HidGestureLifo;
1032 
1033 /// HidGestureSharedMemoryFormat
1035  HidGestureLifo lifo;
1036  u8 pad[0xF8];
1038 
1039 // End HidGesture
1040 
1041 /// HidConsoleSixAxisSensor
1042 typedef struct {
1043  u64 sampling_number; ///< SamplingNumber
1044  u8 is_seven_six_axis_sensor_at_rest; ///< IsSevenSixAxisSensorAtRest
1045  u8 pad[0x3]; ///< Padding
1046  float verticalization_error; ///< VerticalizationError
1047  UtilFloat3 gyro_bias; ///< GyroBias
1048  u8 pad2[0x4]; ///< Padding
1050 
1051 /// HidSharedMemory
1052 typedef struct HidSharedMemory {
1057  u8 digitizer[0x1000]; ///< [10.0.0+] Digitizer [1.0.0-9.2.0] BasicXpad
1058  u8 home_button[0x200];
1059  u8 sleep_button[0x200];
1060  u8 capture_button[0x200];
1061  u8 input_detector[0x800];
1062  u8 unique_pad[0x4000]; ///< [1.0.0-4.1.0] UniquePad
1065  HidConsoleSixAxisSensor console_six_axis_sensor; ///< [5.0.0+] ConsoleSixAxisSensor
1066  u8 unk_x3C220[0x3DE0];
1067 } HidSharedMemory;
1068 
1069 /// HidSevenSixAxisSensorState
1070 typedef struct {
1071  u64 timestamp0;
1072  u64 sampling_number;
1073 
1074  u64 unk_x10;
1075  float unk_x18[10];
1077 
1078 /// HidSevenSixAxisSensorStateEntry
1079 typedef struct {
1080  u64 sampling_number;
1081  u64 unused;
1084 
1085 /// HidSevenSixAxisSensorStates
1086 typedef struct {
1087  HidCommonLifoHeader header;
1088  HidSevenSixAxisSensorStateEntry storage[0x21];
1090 
1091 /// HidSixAxisSensorHandle
1092 typedef union HidSixAxisSensorHandle {
1093  u32 type_value; ///< TypeValue
1094  struct {
1095  u32 npad_style_index : 8; ///< NpadStyleIndex
1096  u32 player_number : 8; ///< PlayerNumber
1097  u32 device_idx : 8; ///< DeviceIdx
1098  u32 pad : 8; ///< Padding
1099  };
1101 
1102 /// HidVibrationDeviceHandle
1104  u32 type_value; ///< TypeValue
1105  struct {
1106  u32 npad_style_index : 8; ///< NpadStyleIndex
1107  u32 player_number : 8; ///< PlayerNumber
1108  u32 device_idx : 8; ///< DeviceIdx
1109  u32 pad : 8; ///< Padding
1110  };
1112 
1113 /// HidVibrationDeviceInfo
1114 typedef struct HidVibrationDeviceInfo {
1115  u32 type; ///< \ref HidVibrationDeviceType
1116  u32 position; ///< \ref HidVibrationDevicePosition
1118 
1119 /// HidVibrationValue
1120 typedef struct HidVibrationValue {
1121  float amp_low; ///< Low Band amplitude. 1.0f: Max amplitude.
1122  float freq_low; ///< Low Band frequency in Hz.
1123  float amp_high; ///< High Band amplitude. 1.0f: Max amplitude.
1124  float freq_high; ///< High Band frequency in Hz.
1126 
1127 /// PalmaConnectionHandle
1129  u64 handle; ///< Handle
1131 
1132 /// PalmaOperationInfo
1133 typedef struct HidPalmaOperationInfo {
1134  u32 type; ///< \ref HidPalmaOperationType
1135  Result res; ///< Result
1136  u8 data[0x140]; ///< Data
1138 
1139 /// PalmaApplicationSectionAccessBuffer
1141  u8 data[0x100]; ///< Application data.
1143 
1144 /// PalmaActivityEntry
1145 typedef struct HidPalmaActivityEntry {
1146  u16 rgb_led_pattern_index; ///< RgbLedPatternIndex
1147  u16 pad; ///< Padding
1148  u32 wave_set; ///< \ref HidPalmaWaveSet
1149  u16 wave_index; ///< WaveIndex
1151 
1152 /// Initialize hid. Called automatically during app startup.
1153 Result hidInitialize(void);
1154 
1155 /// Exit hid. Called automatically during app exit.
1156 void hidExit(void);
1157 
1158 /// Gets the Service object for the actual hid service session.
1160 
1161 /// Gets the address of the SharedMemory.
1162 void* hidGetSharedmemAddr(void);
1163 
1164 ///@name TouchScreen
1165 ///@{
1166 
1167 /// Initialize TouchScreen. Must be called when TouchScreen is being used. Used automatically by \ref hidScanInput when required.
1168 void hidInitializeTouchScreen(void);
1169 
1170 /**
1171  * @brief Gets \ref HidTouchScreenState.
1172  * @param[out] states Output array of \ref HidTouchScreenState.
1173  * @param[in] count Size of the states array in entries.
1174  * @return Total output entries.
1175  */
1176 size_t hidGetTouchScreenStates(HidTouchScreenState *states, size_t count);
1177 
1178 ///@}
1179 
1180 ///@name Mouse
1181 ///@{
1182 
1183 /// Initialize Mouse. Must be called when Mouse is being used. Used automatically by \ref hidScanInput when required.
1184 void hidInitializeMouse(void);
1185 
1186 /**
1187  * @brief Gets \ref HidMouseState.
1188  * @param[out] states Output array of \ref HidMouseState.
1189  * @param[in] count Size of the states array in entries.
1190  * @return Total output entries.
1191  */
1192 size_t hidGetMouseStates(HidMouseState *states, size_t count);
1193 
1194 ///@}
1195 
1196 ///@name Keyboard
1197 ///@{
1198 
1199 /// Initialize Keyboard. Must be called when Keyboard is being used. Used automatically by \ref hidScanInput when required.
1200 void hidInitializeKeyboard(void);
1201 
1202 /**
1203  * @brief Gets \ref HidKeyboardState.
1204  * @param[out] states Output array of \ref HidKeyboardState.
1205  * @param[in] count Size of the states array in entries.
1206  * @return Total output entries.
1207  */
1208 size_t hidGetKeyboardStates(HidKeyboardState *states, size_t count);
1209 
1210 /**
1211  * @brief Gets the state of a key in a \ref HidKeyboardState.
1212  * @param[in] state \ref HidKeyboardState.
1213  * @param[in] key \ref HidKeyboardKey.
1214  * @return true if the key is pressed, false if not.
1215  */
1217  return (state->keys[key / 64] & (1UL << (key & 63))) != 0;
1218 }
1219 
1220 ///@}
1221 
1222 ///@name Npad
1223 ///@{
1224 
1225 /// Initialize Npad. Must be called when Npad is being used. Used automatically by \ref hidScanInput when required.
1226 void hidInitializeNpad(void);
1227 
1228 /**
1229  * @brief Gets the StyleSet for the specified Npad.
1230  * @param[in] id \ref HidNpadIdType
1231  * @return Bitfield of \ref HidNpadStyleTag.
1232  */
1234 
1235 /**
1236  * @brief Gets the \ref HidNpadJoyAssignmentMode for the specified Npad.
1237  * @param[in] id \ref HidNpadIdType
1238  * @return \ref HidNpadJoyAssignmentMode
1239  */
1241 
1242 /**
1243  * @brief Gets the main \ref HidNpadControllerColor for the specified Npad.
1244  * @param[in] id \ref HidNpadIdType
1245  * @param[out] color \ref HidNpadControllerColor
1246  */
1248 
1249 /**
1250  * @brief Gets the left/right \ref HidNpadControllerColor for the specified Npad (Joy-Con pair in dual mode).
1251  * @param[in] id \ref HidNpadIdType
1252  * @param[out] color_left \ref HidNpadControllerColor
1253  * @param[out] color_right \ref HidNpadControllerColor
1254  */
1256 
1257 /**
1258  * @brief Gets the DeviceType for the specified Npad.
1259  * @param[in] id \ref HidNpadIdType
1260  * @return Bitfield of \ref HidDeviceTypeBits.
1261  */
1263 
1264 /**
1265  * @brief Gets the \ref HidNpadSystemProperties for the specified Npad.
1266  * @param[in] id \ref HidNpadIdType
1267  * @param[out] out \ref HidNpadSystemProperties
1268  */
1270 
1271 /**
1272  * @brief Gets the \ref HidNpadSystemButtonProperties for the specified Npad.
1273  * @param[in] id \ref HidNpadIdType
1274  * @param[out] out \ref HidNpadSystemButtonProperties
1275  */
1277 
1278 /**
1279  * @brief Gets the main \ref HidPowerInfo for the specified Npad.
1280  * @param[in] id \ref HidNpadIdType
1281  * @param[out] info \ref HidPowerInfo
1282  */
1284 
1285 /**
1286  * @brief Gets the left/right \ref HidPowerInfo for the specified Npad (Joy-Con pair in dual mode).
1287  * @param[in] id \ref HidNpadIdType
1288  * @param[out] info_left \ref HidPowerInfo
1289  * @param[out] info_right \ref HidPowerInfo
1290  */
1291 void hidGetNpadPowerInfoSplit(HidNpadIdType id, HidPowerInfo *info_left, HidPowerInfo *info_right);
1292 
1293 /**
1294  * @brief Gets the AppletFooterUiAttributesSet for the specified Npad.
1295  * @note Only available on [9.0.0+].
1296  * @param[in] id \ref HidNpadIdType
1297  * @return Bitfield of AppletFooterUiAttribute (system).
1298  */
1300 
1301 /**
1302  * @brief Gets \ref HidAppletFooterUiType for the specified Npad.
1303  * @note Only available on [9.0.0+].
1304  * @param[in] id \ref HidNpadIdType
1305  * @return \ref HidAppletFooterUiType
1306  */
1308 
1309 /**
1310  * @brief Gets \ref HidNpadFullKeyState.
1311  * @param[out] states Output array of \ref HidNpadFullKeyState.
1312  * @param[in] count Size of the states array in entries.
1313  * @return Total output entries.
1314  */
1315 size_t hidGetNpadStatesFullKey(HidNpadIdType id, HidNpadFullKeyState *states, size_t count);
1316 
1317 /**
1318  * @brief Gets \ref HidNpadHandheldState.
1319  * @param[out] states Output array of \ref HidNpadHandheldState.
1320  * @param[in] count Size of the states array in entries.
1321  * @return Total output entries.
1322  */
1323 size_t hidGetNpadStatesHandheld(HidNpadIdType id, HidNpadHandheldState *states, size_t count);
1324 
1325 /**
1326  * @brief Gets \ref HidNpadJoyDualState.
1327  * @param[out] states Output array of \ref HidNpadJoyDualState.
1328  * @param[in] count Size of the states array in entries.
1329  * @return Total output entries.
1330  */
1331 size_t hidGetNpadStatesJoyDual(HidNpadIdType id, HidNpadJoyDualState *states, size_t count);
1332 
1333 /**
1334  * @brief Gets \ref HidNpadJoyLeftState.
1335  * @param[out] states Output array of \ref HidNpadJoyLeftState.
1336  * @param[in] count Size of the states array in entries.
1337  * @return Total output entries.
1338  */
1339 size_t hidGetNpadStatesJoyLeft(HidNpadIdType id, HidNpadJoyLeftState *states, size_t count);
1340 
1341 /**
1342  * @brief Gets \ref HidNpadJoyRightState.
1343  * @param[out] states Output array of \ref HidNpadJoyRightState.
1344  * @param[in] count Size of the states array in entries.
1345  * @return Total output entries.
1346  */
1347 size_t hidGetNpadStatesJoyRight(HidNpadIdType id, HidNpadJoyRightState *states, size_t count);
1348 
1349 /**
1350  * @brief Gets \ref HidNpadGcState.
1351  * @param[out] states Output array of \ref HidNpadGcState.
1352  * @param[in] count Size of the states array in entries.
1353  * @return Total output entries.
1354  */
1355 size_t hidGetNpadStatesGc(HidNpadIdType id, HidNpadGcState *states, size_t count);
1356 
1357 /**
1358  * @brief Gets \ref HidNpadPalmaState.
1359  * @param[out] states Output array of \ref HidNpadPalmaState.
1360  * @param[in] count Size of the states array in entries.
1361  * @return Total output entries.
1362  */
1363 size_t hidGetNpadStatesPalma(HidNpadIdType id, HidNpadPalmaState *states, size_t count);
1364 
1365 /**
1366  * @brief Gets \ref HidNpadLarkState.
1367  * @param[out] states Output array of \ref HidNpadLarkState.
1368  * @param[in] count Size of the states array in entries.
1369  * @return Total output entries.
1370  */
1371 size_t hidGetNpadStatesLark(HidNpadIdType id, HidNpadLarkState *states, size_t count);
1372 
1373 /**
1374  * @brief Gets \ref HidNpadHandheldLarkState.
1375  * @param[out] states Output array of \ref HidNpadHandheldLarkState.
1376  * @param[in] count Size of the states array in entries.
1377  * @return Total output entries.
1378  */
1379 size_t hidGetNpadStatesHandheldLark(HidNpadIdType id, HidNpadHandheldLarkState *states, size_t count);
1380 
1381 /**
1382  * @brief Gets \ref HidNpadLuciaState.
1383  * @param[out] states Output array of \ref HidNpadLuciaState.
1384  * @param[in] count Size of the states array in entries.
1385  * @return Total output entries.
1386  */
1387 size_t hidGetNpadStatesLucia(HidNpadIdType id, HidNpadLuciaState *states, size_t count);
1388 
1389 /**
1390  * @brief Gets \ref HidNpadSystemExtState.
1391  * @param[out] states Output array of \ref HidNpadSystemExtState.
1392  * @param[in] count Size of the states array in entries.
1393  * @return Total output entries.
1394  */
1395 size_t hidGetNpadStatesSystemExt(HidNpadIdType id, HidNpadSystemExtState *states, size_t count);
1396 
1397 /**
1398  * @brief Gets \ref HidNpadSystemState.
1399  * @param[out] states Output array of \ref HidNpadSystemState.
1400  * @param[in] count Size of the states array in entries.
1401  * @return Total output entries.
1402  */
1403 size_t hidGetNpadStatesSystem(HidNpadIdType id, HidNpadSystemState *states, size_t count);
1404 
1405 /**
1406  * @brief Gets \ref HidSixAxisSensorState for the specified handle.
1407  * @param[in] handle \ref HidSixAxisSensorHandle
1408  * @param[out] states Output array of \ref HidSixAxisSensorState.
1409  * @param[in] count Size of the states array in entries.
1410  * @return Total output entries.
1411  */
1412 size_t hidGetSixAxisSensorStates(HidSixAxisSensorHandle handle, HidSixAxisSensorState *states, size_t count);
1413 
1414 ///@}
1415 
1416 ///@name Gesture
1417 ///@{
1418 
1419 /// Initialize Gesture. Must be called when Gesture is being used.
1420 void hidInitializeGesture(void);
1421 
1422 /**
1423  * @brief Gets \ref HidGestureState.
1424  * @param[out] states Output array of \ref HidGestureState.
1425  * @param[in] count Size of the states array in entries.
1426  * @return Total output entries.
1427  */
1428 size_t hidGetGestureStates(HidGestureState *states, size_t count);
1429 
1430 ///@}
1431 
1432 /**
1433  * @brief SendKeyboardLockKeyEvent
1434  * @note Same as \ref hidsysSendKeyboardLockKeyEvent.
1435  * @note Only available on [6.0.0+].
1436  * @param[in] events Bitfield of \ref HidKeyboardLockKeyEvent.
1437  */
1439 
1440 /**
1441  * @brief Gets SixAxisSensorHandles.
1442  * @note Only ::HidNpadStyleTag_NpadJoyDual supports total_handles==2.
1443  * @param[out] handles Output array of \ref HidSixAxisSensorHandle.
1444  * @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.
1445  * @param[in] id \ref HidNpadIdType
1446  * @param[in] style \ref HidNpadStyleTag
1447  */
1449 
1450 /**
1451  * @brief Starts the SixAxisSensor for the specified handle.
1452  * @param[in] handle \ref HidSixAxisSensorHandle
1453  */
1455 
1456 /**
1457  * @brief Stops the SixAxisSensor for the specified handle.
1458  * @param[in] handle \ref HidSixAxisSensorHandle
1459  */
1461 
1462 /**
1463  * @brief IsSixAxisSensorFusionEnabled
1464  * @param[in] handle \ref HidSixAxisSensorHandle
1465  * @param[out] out Output flag.
1466  */
1468 
1469 /**
1470  * @brief EnableSixAxisSensorFusion
1471  * @param[in] handle \ref HidSixAxisSensorHandle
1472  * @param[in] flag Flag
1473  */
1475 
1476 /**
1477  * @brief SetSixAxisSensorFusionParameters
1478  * @param[in] handle \ref HidSixAxisSensorHandle
1479  * @param[in] unk0 Must be 0.0f-1.0f.
1480  * @param[in] unk1 Unknown
1481  */
1482 Result hidSetSixAxisSensorFusionParameters(HidSixAxisSensorHandle handle, float unk0, float unk1);
1483 
1484 /**
1485  * @brief GetSixAxisSensorFusionParameters
1486  * @param[in] handle \ref HidSixAxisSensorHandle
1487  * @param[out] unk0 Unknown
1488  * @param[out] unk1 Unknown
1489  */
1490 Result hidGetSixAxisSensorFusionParameters(HidSixAxisSensorHandle handle, float *unk0, float *unk1);
1491 
1492 /**
1493  * @brief ResetSixAxisSensorFusionParameters
1494  * @param[in] handle \ref HidSixAxisSensorHandle
1495  */
1497 
1498 /**
1499  * @brief Sets the ::HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle.
1500  * @param[in] handle \ref HidSixAxisSensorHandle
1501  * @param[in] mode \ref HidGyroscopeZeroDriftMode
1502  */
1504 
1505 /**
1506  * @brief Gets the ::HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle.
1507  * @param[in] handle \ref HidSixAxisSensorHandle
1508  * @param[out] mode \ref HidGyroscopeZeroDriftMode
1509  */
1511 
1512 /**
1513  * @brief Resets the ::HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle to ::HidGyroscopeZeroDriftMode_Standard.
1514  * @param[in] handle \ref HidSixAxisSensorHandle
1515  */
1517 
1518 /**
1519  * @brief IsSixAxisSensorAtRest
1520  * @param[in] handle \ref HidSixAxisSensorHandle
1521  * @param[out] out Output flag.
1522  */
1524 
1525 /**
1526  * @brief IsFirmwareUpdateAvailableForSixAxisSensor
1527  * @note Only available on [6.0.0+].
1528  * @param[in] handle \ref HidSixAxisSensorHandle
1529  * @param[out] out Output flag.
1530  */
1532 
1533 /**
1534  * @brief Sets which controller styles are supported.
1535  * @note This is automatically called with the needed styles in \ref hidScanInput when required.
1536  * @param[in] style_set Bitfield of \ref HidNpadStyleTag.
1537  */
1539 
1540 /**
1541  * @brief Gets which controller styles are supported.
1542  * @param[out] style_set Bitfield of \ref HidNpadStyleTag.
1543  */
1545 
1546 /**
1547  * @brief Sets which \ref HidNpadIdType are supported.
1548  * @note This is automatically called with HidNpadIdType_No{1-8} and HidNpadIdType_Handheld when required in \ref hidScanInput.
1549  * @param[in] ids Input array of \ref HidNpadIdType.
1550  * @param[in] count Total entries in the ids array. Must be <=10.
1551  */
1552 Result hidSetSupportedNpadIdType(const HidNpadIdType *ids, size_t count);
1553 
1554 /**
1555  * @brief Gets an Event which is signaled when the \ref hidGetNpadStyleSet output is updated for the specified controller.
1556  * @note The Event must be closed by the user once finished with it.
1557  * @param[in] id \ref HidNpadIdType
1558  * @param[out] out_event Output Event.
1559  * @param[in] autoclear The autoclear for the Event.
1560 **/
1561 Result hidAcquireNpadStyleSetUpdateEventHandle(HidNpadIdType id, Event* out_event, bool autoclear);
1562 
1563 /**
1564  * @brief DisconnectNpad
1565  * @param[in] id \ref HidNpadIdType
1566  */
1568 
1569 /**
1570  * @brief GetPlayerLedPattern
1571  * @param[in] id \ref HidNpadIdType
1572  * @param[out] out Output value.
1573  */
1575 
1576 /**
1577  * @brief Sets the \ref HidNpadJoyHoldType.
1578  * @note Used automatically by \ref hidScanInput when required.
1579  * @param[in] type \ref HidNpadJoyHoldType
1580  */
1582 
1583 /**
1584  * @brief Gets the \ref HidNpadJoyHoldType.
1585  * @param[out] type \ref HidNpadJoyHoldType
1586  */
1588 
1589 /**
1590  * @brief This is the same as \ref hidSetNpadJoyAssignmentModeSingle, except ::HidNpadJoyDeviceType_Left is used for the type.
1591  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
1592  */
1594 
1595 /**
1596  * @brief This is the same as \ref hidSetNpadJoyAssignmentModeSingleWithDestination, except without the output params.
1597  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
1598  * @param[in] type \ref HidNpadJoyDeviceType
1599  */
1601 
1602 /**
1603  * @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).
1604  * @note Used automatically by \ref hidScanInput when required.
1605  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
1606  */
1608 
1609 /**
1610  * @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).
1611  * @brief To be successful, id0/id1 must correspond to controllers supporting styles HidNpadStyleTag_NpadJoyLeft/Right, or HidNpadStyleTag_NpadJoyRight/Left.
1612  * @brief If successful, the id of the resulting dual controller is set to id0.
1613  * @param[in] id0 \ref HidNpadIdType
1614  * @param[in] id1 \ref HidNpadIdType
1615  */
1617 
1618 /**
1619  * @brief StartLrAssignmentMode
1620  */
1622 
1623 /**
1624  * @brief StopLrAssignmentMode
1625  */
1627 
1628 /**
1629  * @brief Sets the \ref HidNpadHandheldActivationMode.
1630  * @param[in] mode \ref HidNpadHandheldActivationMode
1631  */
1633 
1634 /**
1635  * @brief Gets the \ref HidNpadHandheldActivationMode.
1636  * @param[out] out \ref HidNpadHandheldActivationMode
1637  */
1639 
1640 /**
1641  * @brief SwapNpadAssignment
1642  * @param[in] id0 \ref HidNpadIdType
1643  * @param[in] id1 \ref HidNpadIdType
1644  */
1646 
1647 /**
1648  * @brief EnableUnintendedHomeButtonInputProtection
1649  * @note To get the state of this, use \ref hidGetNpadSystemButtonProperties to access HidNpadSystemButtonProperties::is_unintended_home_button_input_protection_enabled.
1650  * @param[in] id \ref HidNpadIdType
1651  * @param[in] flag Whether UnintendedHomeButtonInputProtection is enabled.
1652  */
1654 
1655 /**
1656  * @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).
1657  * @note Only available on [5.0.0+].
1658  * @param[in] id \ref HidNpadIdType, must be HidNpadIdType_No*.
1659  * @param[in] type \ref HidNpadJoyDeviceType
1660  * @param[out] flag Whether the dest output is set.
1661  * @param[out] dest \ref HidNpadIdType
1662  */
1664 
1665 /**
1666  * @brief SetNpadAnalogStickUseCenterClamp
1667  * @note Only available on [6.1.0+].
1668  * @param[in] flag Flag
1669  */
1671 
1672 /**
1673  * @brief Assigns the button(s) which trigger the CaptureButton.
1674  * @note Only available on [8.0.0+].
1675  * @param[in] style \ref HidNpadStyleTag, exactly 1 bit must be set.
1676  * @param[in] buttons Bitfield of \ref HidNpadButton, multiple bits can be set.
1677  */
1679 
1680 /**
1681  * @brief ClearNpadCaptureButtonAssignment
1682  * @note Only available on [8.0.0+].
1683  */
1685 
1686 /**
1687  * @brief Gets and initializes vibration handles.
1688  * @note Only the following styles support total_handles 2: ::HidNpadStyleTag_NpadFullKey, ::HidNpadStyleTag_NpadHandheld, ::HidNpadStyleTag_NpadJoyDual, ::HidNpadStyleTag_NpadHandheldLark, ::HidNpadStyleTag_NpadSystem, ::HidNpadStyleTag_NpadSystemExt.
1689  * @param[out] handles Output array of \ref HidVibrationDeviceHandle.
1690  * @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.
1691  * @param[in] id \ref HidNpadIdType
1692  * @param[in] style \ref HidNpadStyleTag
1693  */
1695 
1696 /**
1697  * @brief Gets \ref HidVibrationDeviceInfo for the specified device.
1698  * @param[in] handle \ref HidVibrationDeviceHandle
1699  * @param[out] out \ref HidVibrationDeviceInfo
1700  */
1702 
1703 /**
1704  * @brief Sends the \ref HidVibrationDeviceHandle to the specified device.
1705  * @note With ::HidVibrationDeviceType_GcErm, use \ref hidSendVibrationGcErmCommand instead.
1706  * @param[in] handle \ref HidVibrationDeviceHandle
1707  * @param[in] value \ref HidVibrationValue
1708  */
1710 
1711 /**
1712  * @brief Gets the current \ref HidVibrationValue for the specified device.
1713  * @note With ::HidVibrationDeviceType_GcErm, use \ref hidGetActualVibrationGcErmCommand instead.
1714  * @param[in] handle \ref HidVibrationDeviceHandle
1715  * @param[out] out \ref HidVibrationValue
1716  */
1718 
1719 /**
1720  * @brief Sets whether vibration is allowed, this also affects the config displayed by System Settings.
1721  * @param[in] flag Flag
1722  */
1723 Result hidPermitVibration(bool flag);
1724 
1725 /**
1726  * @brief Gets whether vibration is allowed.
1727  * @param[out] flag Flag
1728  */
1729 Result hidIsVibrationPermitted(bool *flag);
1730 
1731 /**
1732  * @brief Send vibration values[index] to handles[index].
1733  * @note With ::HidVibrationDeviceType_GcErm, use \ref hidSendVibrationGcErmCommand instead.
1734  * @param[in] handles Input array of \ref HidVibrationDeviceHandle.
1735  * @param[in] values Input array of \ref HidVibrationValue.
1736  * @param[in] count Total entries in the handles/values arrays.
1737  */
1738 Result hidSendVibrationValues(const HidVibrationDeviceHandle *handles, const HidVibrationValue *values, s32 count);
1739 
1740 /**
1741  * @brief Send \ref HidVibrationGcErmCommand to the specified device, for ::HidVibrationDeviceType_GcErm.
1742  * @note Only available on [4.0.0+].
1743  * @param[in] handle \ref HidVibrationDeviceHandle
1744  * @param[in] cmd \ref HidVibrationGcErmCommand
1745  */
1747 
1748 /**
1749  * @brief Get \ref HidVibrationGcErmCommand for the specified device, for ::HidVibrationDeviceType_GcErm.
1750  * @note Only available on [4.0.0+].
1751  * @param[in] handle \ref HidVibrationDeviceHandle
1752  * @param[out] out \ref HidVibrationGcErmCommand
1753  */
1755 
1756 /**
1757  * @brief Begins a forced-permitted vibration session.
1758  * @note Only available on [4.0.0+].
1759  */
1761 
1762 /**
1763  * @brief Ends the session started by \ref hidBeginPermitVibrationSession.
1764  * @note Only available on [4.0.0+].
1765  */
1767 
1768 /**
1769  * @brief Gets whether vibration is available with the specified device.
1770  * @note Only available on [7.0.0+].
1771  * @param[in] handle \ref HidVibrationDeviceHandle
1772  * @param[out] flag Flag
1773  */
1775 
1776 /**
1777  * @brief Starts the SevenSixAxisSensor.
1778  * @note Only available on [5.0.0+].
1779  */
1781 
1782 /**
1783  * @brief Stops the SevenSixAxisSensor.
1784  * @note Only available on [5.0.0+].
1785  */
1787 
1788 /**
1789  * @brief Initializes the SevenSixAxisSensor.
1790  * @note Only available on [5.0.0+].
1791  */
1793 
1794 /**
1795  * @brief Finalizes the SevenSixAxisSensor.
1796  * @note This must be called before \ref hidExit.
1797  * @note Only available on [5.0.0+].
1798  */
1800 
1801 /**
1802  * @brief Sets the SevenSixAxisSensor FusionStrength.
1803  * @note Only available on [5.0.0+].
1804  * @param[in] strength Strength
1805  */
1807 
1808 /**
1809  * @brief Gets the SevenSixAxisSensor FusionStrength.
1810  * @note Only available on [5.0.0+].
1811  * @param[out] strength Strength
1812  */
1814 
1815 /**
1816  * @brief Resets the timestamp for the SevenSixAxisSensor.
1817  * @note Only available on [6.0.0+].
1818  */
1820 
1821 /**
1822  * @brief GetSevenSixAxisSensorStates
1823  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
1824  * @param[out] states Output array of \ref HidSevenSixAxisSensorState.
1825  * @param[in] count Size of the states array in entries.
1826  * @param[out] total_out Total output entries.
1827  */
1828 Result hidGetSevenSixAxisSensorStates(HidSevenSixAxisSensorState *states, size_t count, size_t *total_out);
1829 
1830 /**
1831  * @brief IsSevenSixAxisSensorAtRest
1832  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
1833  * @param[out] out Output flag.
1834  */
1836 
1837 /**
1838  * @brief GetSensorFusionError
1839  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
1840  * @param[out] out Output data.
1841  */
1842 Result hidGetSensorFusionError(float *out);
1843 
1844 /**
1845  * @brief GetGyroBias
1846  * @note Only available when \ref hidInitializeSevenSixAxisSensor was previously used.
1847  * @param[out] out \ref UtilFloat3
1848  */
1850 
1851 /**
1852  * @brief IsUsbFullKeyControllerEnabled
1853  * @note Only available on [3.0.0+].
1854  * @param[out] out Output flag.
1855  */
1857 
1858 /**
1859  * @brief EnableUsbFullKeyController
1860  * @note Only available on [3.0.0+].
1861  * @param[in] flag Flag
1862  */
1864 
1865 /**
1866  * @brief IsUsbFullKeyControllerConnected
1867  * @note Only available on [3.0.0+].
1868  * @param[in] id \ref HidNpadIdType
1869  * @param[out] out Output flag.
1870  */
1872 
1873 /**
1874  * @brief Gets the \ref HidNpadInterfaceType for the specified controller.
1875  * @note When available, \ref hidsysGetNpadInterfaceType should be used instead.
1876  * @note Only available on [4.0.0+].
1877  * @param[in] id \ref HidNpadIdType
1878  * @param[out] out \ref HidNpadInterfaceType
1879  */
1881 
1882 /**
1883  * @brief GetNpadOfHighestBatteryLevel
1884  * @note Only available on [10.0.0+].
1885  * @param[in] ids Input array of \ref HidNpadIdType, ::HidNpadIdType_Handheld is ignored.
1886  * @param[in] count Total entries in the ids array.
1887  * @param[out] out \ref HidNpadIdType
1888  */
1889 Result hidGetNpadOfHighestBatteryLevel(const HidNpadIdType *ids, size_t count, HidNpadIdType *out);
1890 
1891 ///@name Palma, see ::HidNpadStyleTag_NpadPalma.
1892 ///@{
1893 
1894 /**
1895  * @brief GetPalmaConnectionHandle
1896  * @note Only available on [5.0.0+].
1897  * @param[in] id \ref HidNpadIdType
1898  * @param[out] out \ref HidPalmaConnectionHandle
1899  */
1901 
1902 /**
1903  * @brief InitializePalma
1904  * @note Only available on [5.0.0+].
1905  * @param[in] handle \ref HidPalmaConnectionHandle
1906  */
1908 
1909 /**
1910  * @brief Gets an Event which is signaled when data is available with \ref hidGetPalmaOperationInfo.
1911  * @note The Event must be closed by the user once finished with it.
1912  * @note Only available on [5.0.0+].
1913  * @param[in] handle \ref HidPalmaConnectionHandle
1914  * @param[out] out_event Output Event.
1915  * @param[in] autoclear The autoclear for the Event.
1916 **/
1918 
1919 /**
1920  * @brief Gets \ref HidPalmaOperationInfo for a completed operation.
1921  * @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.
1922  * @note Only available on [5.0.0+].
1923  * @param[in] handle \ref HidPalmaConnectionHandle
1924  * @param[out] out \ref HidPalmaOperationInfo
1925  */
1927 
1928 /**
1929  * @brief PlayPalmaActivity
1930  * @note See \ref hidGetPalmaOperationInfo.
1931  * @note Only available on [5.0.0+].
1932  * @param[in] handle \ref HidPalmaConnectionHandle
1933  * @param[in] val Input value.
1934  */
1936 
1937 /**
1938  * @brief SetPalmaFrModeType
1939  * @note See \ref hidGetPalmaOperationInfo.
1940  * @note Only available on [5.0.0+].
1941  * @param[in] handle \ref HidPalmaConnectionHandle
1942  * @param[in] type \ref HidPalmaFrModeType
1943  */
1945 
1946 /**
1947  * @brief ReadPalmaStep
1948  * @note See \ref hidGetPalmaOperationInfo.
1949  * @note \ref hidEnablePalmaStep should be used before this.
1950  * @note Only available on [5.0.0+].
1951  * @param[in] handle \ref HidPalmaConnectionHandle
1952  */
1954 
1955 /**
1956  * @brief EnablePalmaStep
1957  * @note See \ref hidGetPalmaOperationInfo.
1958  * @note Only available on [5.0.0+].
1959  * @param[in] handle \ref HidPalmaConnectionHandle
1960  * @param[in] flag Flag
1961  */
1963 
1964 /**
1965  * @brief ResetPalmaStep
1966  * @note See \ref hidGetPalmaOperationInfo.
1967  * @note Only available on [5.0.0+].
1968  * @param[in] handle \ref HidPalmaConnectionHandle
1969  */
1971 
1972 /**
1973  * @brief ReadPalmaApplicationSection
1974  * @note See \ref hidGetPalmaOperationInfo.
1975  * @note Only available on [5.0.0+].
1976  * @param[in] handle \ref HidPalmaConnectionHandle
1977  * @param[in] inval0 First input value.
1978  * @param[in] size This must be within the size of \ref HidPalmaApplicationSectionAccessBuffer.
1979  */
1981 
1982 /**
1983  * @brief WritePalmaApplicationSection
1984  * @note See \ref hidGetPalmaOperationInfo.
1985  * @note Only available on [5.0.0+].
1986  * @param[in] handle \ref HidPalmaConnectionHandle
1987  * @param[in] inval0 First input value.
1988  * @param[in] size Size of the data in \ref HidPalmaApplicationSectionAccessBuffer.
1989  * @param[in] buf \ref HidPalmaApplicationSectionAccessBuffer
1990  */
1992 
1993 /**
1994  * @brief ReadPalmaUniqueCode
1995  * @note See \ref hidGetPalmaOperationInfo.
1996  * @note Only available on [5.0.0+].
1997  * @param[in] handle \ref HidPalmaConnectionHandle
1998  */
2000 
2001 /**
2002  * @brief SetPalmaUniqueCodeInvalid
2003  * @note See \ref hidGetPalmaOperationInfo.
2004  * @note Only available on [5.0.0+].
2005  * @param[in] handle \ref HidPalmaConnectionHandle
2006  */
2008 
2009 /**
2010  * @brief WritePalmaActivityEntry
2011  * @note See \ref hidGetPalmaOperationInfo.
2012  * @note Only available on [5.0.0+].
2013  * @param[in] handle \ref HidPalmaConnectionHandle
2014  * @param[in] unk Unknown
2015  * @param[in] entry \ref HidPalmaActivityEntry
2016  */
2018 
2019 /**
2020  * @brief WritePalmaRgbLedPatternEntry
2021  * @note See \ref hidGetPalmaOperationInfo.
2022  * @note Only available on [5.0.0+].
2023  * @param[in] handle \ref HidPalmaConnectionHandle
2024  * @param[in] unk Unknown
2025  * @param[in] buffer Input buffer.
2026  * @param[in] size Input buffer size.
2027  */
2028 Result hidWritePalmaRgbLedPatternEntry(HidPalmaConnectionHandle handle, u16 unk, const void* buffer, size_t size);
2029 
2030 /**
2031  * @brief WritePalmaWaveEntry
2032  * @note See \ref hidGetPalmaOperationInfo.
2033  * @note Only available on [5.0.0+].
2034  * @param[in] handle \ref HidPalmaConnectionHandle
2035  * @param[in] wave_set \ref HidPalmaWaveSet
2036  * @param[in] unk Unknown
2037  * @param[in] buffer TransferMemory buffer, must be 0x1000-byte aligned.
2038  * @param[in] tmem_size TransferMemory buffer size, must be 0x1000-byte aligned.
2039  * @param[in] size Actual size of the data in the buffer.
2040  */
2041 Result hidWritePalmaWaveEntry(HidPalmaConnectionHandle handle, HidPalmaWaveSet wave_set, u16 unk, const void* buffer, size_t tmem_size, size_t size);
2042 
2043 /**
2044  * @brief SetPalmaDataBaseIdentificationVersion
2045  * @note See \ref hidGetPalmaOperationInfo.
2046  * @note Only available on [5.0.0+].
2047  * @param[in] handle \ref HidPalmaConnectionHandle
2048  * @param[in] version Version
2049  */
2051 
2052 /**
2053  * @brief GetPalmaDataBaseIdentificationVersion
2054  * @note See \ref hidGetPalmaOperationInfo.
2055  * @note Only available on [5.0.0+].
2056  * @param[in] handle \ref HidPalmaConnectionHandle
2057  */
2059 
2060 /**
2061  * @brief SuspendPalmaFeature
2062  * @note See \ref hidGetPalmaOperationInfo.
2063  * @note Only available on [5.0.0+].
2064  * @param[in] handle \ref HidPalmaConnectionHandle
2065  * @param[in] features Bitfield of \ref HidPalmaFeature.
2066  */
2068 
2069 /**
2070  * @brief ReadPalmaPlayLog
2071  * @note See \ref hidGetPalmaOperationInfo.
2072  * @note Only available on [5.1.0+].
2073  * @param[in] handle \ref HidPalmaConnectionHandle
2074  * @param[in] unk Unknown
2075  */
2077 
2078 /**
2079  * @brief ResetPalmaPlayLog
2080  * @note See \ref hidGetPalmaOperationInfo.
2081  * @note Only available on [5.1.0+].
2082  * @param[in] handle \ref HidPalmaConnectionHandle
2083  * @param[in] unk Unknown
2084  */
2086 
2087 /**
2088  * @brief Sets whether any Palma can connect.
2089  * @note Only available on [5.1.0+].
2090  * @param[in] flag Flag
2091  */
2093 
2094 /**
2095  * @brief Sets whether paired Palma can connect.
2096  * @note Only available on [5.1.0+].
2097  * @param[in] flag Flag
2098  */
2100 
2101 /**
2102  * @brief PairPalma
2103  * @note Only available on [5.1.0+].
2104  * @param[in] handle \ref HidPalmaConnectionHandle
2105  */
2107 
2108 /**
2109  * @brief CancelWritePalmaWaveEntry
2110  * @note Only available on [7.0.0+].
2111  * @param[in] handle \ref HidPalmaConnectionHandle
2112  */
2114 
2115 /**
2116  * @brief EnablePalmaBoostMode
2117  * @note Only available on [5.1.0+]. Uses cmd EnablePalmaBoostMode on [8.0.0+], otherwise cmd SetPalmaBoostMode is used.
2118  * @param[in] flag Flag
2119  */
2120 Result hidEnablePalmaBoostMode(bool flag);
2121 
2122 /**
2123  * @brief GetPalmaBluetoothAddress
2124  * @note Only available on [8.0.0+].
2125  * @param[in] handle \ref HidPalmaConnectionHandle
2126  * @param[out] out \ref BtdrvAddress
2127  */
2129 
2130 /**
2131  * @brief SetDisallowedPalmaConnection
2132  * @note Only available on [8.0.0+].
2133  * @param[in] addrs Input array of \ref BtdrvAddress.
2134  * @param[in] count Total entries in the addrs array.
2135  */
2137 
2138 ///@}
2139 
2140 /**
2141  * @brief SetNpadCommunicationMode
2142  * @note [2.0.0+] Stubbed, just returns 0.
2143  * @param[in] mode \ref HidNpadCommunicationMode
2144  */
2146 
2147 /**
2148  * @brief GetNpadCommunicationMode
2149  * @note [2.0.0+] Stubbed, always returns output mode ::HidNpadCommunicationMode_Default.
2150  * @param[out] out \ref HidNpadCommunicationMode
2151  */
2153 
2154 /**
2155  * @brief SetTouchScreenConfiguration
2156  * @note Only available on [9.0.0+].
2157  * @param[in] config \ref HidTouchScreenConfigurationForNx
2158  */
2160 
2161 /**
2162  * @brief IsFirmwareUpdateNeededForNotification
2163  * @note Only available on [9.0.0+].
2164  * @param[out] out Output flag.
2165  */
HidSixAxisSensorHandle
HidSixAxisSensorHandle.
Definition: hid.h:1092
HidGestureLifo
HidGestureLifo.
Definition: hid.h:1028
HidNpadButton_B
@ HidNpadButton_B
B button / Down face button.
Definition: hid.h:257
HidNpadIdType_No1
@ HidNpadIdType_No1
Player 1 controller.
Definition: hid.h:215
HidNpadLuciaType_J
@ HidNpadLuciaType_J
J.
Definition: hid.h:488
HidSixAxisSensorState::delta_time
u64 delta_time
DeltaTime.
Definition: hid.h:854
HidNpadInternalState::joy_left_lifo
HidNpadCommonLifo joy_left_lifo
JoyLeftLifo.
Definition: hid.h:945
hidInitializeNpad
void hidInitializeNpad(void)
Initialize Npad. Must be called when Npad is being used. Used automatically by hidScanInput when requ...
HidNpadAttribute_IsLeftWired
@ HidNpadAttribute_IsLeftWired
IsLeftWired.
Definition: hid.h:318
HidDebugPadButton_B
@ HidDebugPadButton_B
B button.
Definition: hid.h:19
HidNpadCommunicationMode
HidNpadCommunicationMode
NpadCommunicationMode.
Definition: hid.h:391
hidSendVibrationGcErmCommand
Result hidSendVibrationGcErmCommand(HidVibrationDeviceHandle handle, HidVibrationGcErmCommand cmd)
Send HidVibrationGcErmCommand to the specified device, for HidVibrationDeviceType_GcErm.
HidNpadStyleTag_NpadPalma
@ HidNpadStyleTag_NpadPalma
Poké Ball Plus controller.
Definition: hid.h:235
HidNpadJoyAssignmentMode
HidNpadJoyAssignmentMode
NpadJoyAssignmentMode.
Definition: hid.h:385
HidNpadLarkState::analog_stick_r
HidAnalogStickState analog_stick_r
This is always zero.
Definition: hid.h:791
HidNpadLarkState::buttons
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:789
HidPowerInfo
HidPowerInfo (system)
Definition: hid.h:902
HidNpadSystemProperties::bit6
u64 bit6
Unused.
Definition: hid.h:881
HidTouchState::y
u32 y
Y.
Definition: hid.h:629
HidNpadHandheldLarkState
State for HidNpadStyleTag_NpadHandheldLark. The base state is loaded from the same lifo as HidNpadHan...
Definition: hid.h:797
HidNpadStyleTag_NpadLark
@ HidNpadStyleTag_NpadLark
NES/Famicom controller.
Definition: hid.h:236
HidDebugPadButton_ZL
@ HidDebugPadButton_ZL
ZL button.
Definition: hid.h:24
HidAppletFooterUiType_JoyLeftVertical
@ HidAppletFooterUiType_JoyLeftVertical
JoyLeftVertical.
Definition: hid.h:446
HidTouchState::rotation_angle
u32 rotation_angle
RotationAngle.
Definition: hid.h:632
hidSetNpadJoyAssignmentModeSingleByDefault
Result hidSetNpadJoyAssignmentModeSingleByDefault(HidNpadIdType id)
This is the same as hidSetNpadJoyAssignmentModeSingle, except HidNpadJoyDeviceType_Left is used for t...
HidAppletFooterUiType_CompatibleProController
@ HidAppletFooterUiType_CompatibleProController
CompatibleProController.
Definition: hid.h:450
hidGetMouseStates
size_t hidGetMouseStates(HidMouseState *states, size_t count)
Gets HidMouseState.
hidGetPlayerLedPattern
Result hidGetPlayerLedPattern(HidNpadIdType id, u8 *out)
GetPlayerLedPattern.
HidNpadSystemProperties::is_plus_available
u64 is_plus_available
[4.0.0+] IsPlusAvailable
Definition: hid.h:889
HidNpadButton_AnyRight
@ HidNpadButton_AnyRight
Bitmask containing all buttons that are considered Right (D-Pad, Sticks)
Definition: hid.h:290
HidTouchState::diameter_y
u32 diameter_y
DiameterY.
Definition: hid.h:631
hidCancelWritePalmaWaveEntry
Result hidCancelWritePalmaWaveEntry(HidPalmaConnectionHandle handle)
CancelWritePalmaWaveEntry.
HidSixAxisSensorHandle::device_idx
u32 device_idx
DeviceIdx.
Definition: hid.h:1097
HidNpadGcState::attributes
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:778
HidKeyboardStateAtomicStorage
HidKeyboardStateAtomicStorage.
Definition: hid.h:715
hidDisconnectNpad
Result hidDisconnectNpad(HidNpadIdType id)
DisconnectNpad.
hidInitializePalma
Result hidInitializePalma(HidPalmaConnectionHandle handle)
InitializePalma.
HidNpadButton_StickRUp
@ HidNpadButton_StickRUp
Right Stick pseudo-button when moved Up.
Definition: hid.h:277
HidNfcXcdDeviceHandleStateImpl::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:920
HidCommonLifoHeader::count
u64 count
Count.
Definition: hid.h:587
HidGyroscopeZeroDriftMode_Standard
@ HidGyroscopeZeroDriftMode_Standard
Standard.
Definition: hid.h:361
HidVibrationGcErmCommand_Start
@ HidVibrationGcErmCommand_Start
Starts the vibration.
Definition: hid.h:510
hidSuspendPalmaFeature
Result hidSuspendPalmaFeature(HidPalmaConnectionHandle handle, u32 features)
SuspendPalmaFeature.
HidGestureAttribute_IsNewTouch
@ HidGestureAttribute_IsNewTouch
IsNewTouch.
Definition: hid.h:331
HidPalmaConnectionHandle
PalmaConnectionHandle.
Definition: hid.h:1128
hidEnablePalmaStep
Result hidEnablePalmaStep(HidPalmaConnectionHandle handle, bool flag)
EnablePalmaStep.
XcdInterfaceType
XcdInterfaceType
XcdInterfaceType.
Definition: hid.h:469
HidNpadInternalState::system_ext_lifo
HidNpadCommonLifo system_ext_lifo
SystemExtLifo.
Definition: hid.h:948
HidTouchState::delta_time
u64 delta_time
DeltaTime.
Definition: hid.h:625
HidNpadCommonState
HidNpadCommonState.
Definition: hid.h:757
HidNpadInternalState::reserved_x4208
u8 reserved_x4208[0x20]
Mutex on pre-10.0.0.
Definition: hid.h:973
HidTouchScreenModeForNx_Finger
@ HidTouchScreenModeForNx_Finger
Finger.
Definition: hid.h:37
HidAppletFooterUiType_LarkNesLeft
@ HidAppletFooterUiType_LarkNesLeft
LarkNesLeft.
Definition: hid.h:454
HidAppletFooterUiType_JoyRightVertical
@ HidAppletFooterUiType_JoyRightVertical
JoyRightVertical.
Definition: hid.h:448
HidNpadButton_StickR
@ HidNpadButton_StickR
Right Stick button.
Definition: hid.h:261
hidGetSixAxisSensorHandles
Result hidGetSixAxisSensorHandles(HidSixAxisSensorHandle *handles, s32 total_handles, HidNpadIdType id, HidNpadStyleTag style)
Gets SixAxisSensorHandles.
HidPalmaOperationType_SetFrModeType
@ HidPalmaOperationType_SetFrModeType
SetFrModeType.
Definition: hid.h:517
HidMouseState::buttons
u32 buttons
Bitfield of HidMouseButton.
Definition: hid.h:681
HidGestureDirection_Right
@ HidGestureDirection_Right
Right.
Definition: hid.h:340
hidGetNpadPowerInfoSplit
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).
HidAppletFooterUiType_JoyDualLeftOnly
@ HidAppletFooterUiType_JoyDualLeftOnly
JoyDualLeftOnly.
Definition: hid.h:443
HidGestureState::rotation_angle
float rotation_angle
RotationAngle.
Definition: hid.h:1016
UtilFloat3
Definition: types.h:50
HidVibrationDeviceHandle::type_value
u32 type_value
TypeValue.
Definition: hid.h:1104
HidGestureType_Rotate
@ HidGestureType_Rotate
Rotate.
Definition: hid.h:355
HidVibrationDeviceHandle::device_idx
u32 device_idx
DeviceIdx.
Definition: hid.h:1108
hidInitializeGesture
void hidInitializeGesture(void)
Initialize Gesture. Must be called when Gesture is being used.
HidKeyboardState
HidKeyboardState.
Definition: hid.h:708
HidConsoleSixAxisSensor::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:1043
hidAcquireNpadStyleSetUpdateEventHandle
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...
HidDeviceTypeBits_HandheldRight
@ HidDeviceTypeBits_HandheldRight
Joy-Con/Famicom/NES right controller in handheld mode.
Definition: hid.h:403
HidSixAxisSensorState::acceleration
HidVector acceleration
Acceleration.
Definition: hid.h:856
hidSetNpadAnalogStickUseCenterClamp
Result hidSetNpadAnalogStickUseCenterClamp(bool flag)
SetNpadAnalogStickUseCenterClamp.
HidPalmaFrModeType_Downloaded
@ HidPalmaFrModeType_Downloaded
Downloaded.
Definition: hid.h:541
HidPalmaOperationInfo::data
u8 data[0x140]
Data.
Definition: hid.h:1136
HidPalmaOperationType
HidPalmaOperationType
PalmaOperationType.
Definition: hid.h:515
HidDeviceTypeBits_JoyLeft
@ HidDeviceTypeBits_JoyLeft
Joy-Con left controller.
Definition: hid.h:404
HidMouseStateAtomicStorage
HidMouseStateAtomicStorage.
Definition: hid.h:686
HidDebugPadButton_Right
@ HidDebugPadButton_Right
D-Pad Right button.
Definition: hid.h:30
HidPalmaActivityEntry
PalmaActivityEntry.
Definition: hid.h:1145
hidIsFirmwareUpdateAvailableForSixAxisSensor
Result hidIsFirmwareUpdateAvailableForSixAxisSensor(HidSixAxisSensorHandle handle, bool *out)
IsFirmwareUpdateAvailableForSixAxisSensor.
HidNpadButton_A
@ HidNpadButton_A
A button / Right face button.
Definition: hid.h:256
HidNpadSharedMemoryEntry
HidNpadSharedMemoryEntry.
Definition: hid.h:982
hidSendVibrationValues
Result hidSendVibrationValues(const HidVibrationDeviceHandle *handles, const HidVibrationValue *values, s32 count)
Send vibration values[index] to handles[index].
HidDirectionState
HidDirectionState.
Definition: hid.h:573
HidNpadInternalState::handheld_lifo
HidNpadCommonLifo handheld_lifo
HandheldLifo.
Definition: hid.h:943
HidDeviceTypeBits
HidDeviceTypeBits
DeviceType (system)
Definition: hid.h:399
u8
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
NX_CONSTEXPR
#define NX_CONSTEXPR
Flags a function as constexpr in C++14 and above; or as (always) inline otherwise.
Definition: types.h:88
HidNpadInternalState::full_key_six_axis_sensor_lifo
HidNpadSixAxisSensorLifo full_key_six_axis_sensor_lifo
FullKeySixAxisSensorLifo.
Definition: hid.h:950
HidNpadButton_StickRLeft
@ HidNpadButton_StickRLeft
Right Stick pseudo-button when moved Left.
Definition: hid.h:276
HidNpadSystemExtState
HidNpadCommonState HidNpadSystemExtState
State for HidNpadStyleTag_NpadSystemExt.
Definition: hid.h:818
HidVibrationDeviceType_LinearResonantActuator
@ HidVibrationDeviceType_LinearResonantActuator
LinearResonantActuator.
Definition: hid.h:496
HidNpadLarkType
HidNpadLarkType
NpadLarkType.
Definition: hid.h:477
HidPalmaOperationType_PlayActivity
@ HidPalmaOperationType_PlayActivity
PlayActivity.
Definition: hid.h:516
HidGestureState::points
HidGesturePoint points[4]
Array of HidGesturePoint with the above count.
Definition: hid.h:1018
hidWritePalmaWaveEntry
Result hidWritePalmaWaveEntry(HidPalmaConnectionHandle handle, HidPalmaWaveSet wave_set, u16 unk, const void *buffer, size_t tmem_size, size_t size)
WritePalmaWaveEntry.
HidNpadLarkType_Invalid
@ HidNpadLarkType_Invalid
Invalid.
Definition: hid.h:478
HidDebugPadLifo::header
HidCommonLifoHeader header
HidCommonLifoHeader
Definition: hid.h:609
HidDeviceType_FullKey3
@ HidDeviceType_FullKey3
HidDeviceTypeBits_FullKey
Definition: hid.h:419
HidNpadInternalState::joy_right_lifo
HidNpadCommonLifo joy_right_lifo
JoyRightLifo.
Definition: hid.h:946
HidNpadAttribute_IsWired
@ HidNpadAttribute_IsWired
IsWired.
Definition: hid.h:316
hidSetNpadJoyAssignmentModeSingle
Result hidSetNpadJoyAssignmentModeSingle(HidNpadIdType id, HidNpadJoyDeviceType type)
This is the same as hidSetNpadJoyAssignmentModeSingleWithDestination, except without the output param...
HidNpadCommonState::analog_stick_l
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hid.h:760
HidGestureType_Pan
@ HidGestureType_Pan
Pan.
Definition: hid.h:352
Event
Kernel-mode event structure.
Definition: event.h:13
hidStopSevenSixAxisSensor
Result hidStopSevenSixAxisSensor(void)
Stops the SevenSixAxisSensor.
HidDeviceType_System19
@ HidDeviceType_System19
HidDeviceTypeBits_System with HidNpadStyleTag |= HidNpadStyleTag_NpadFullKey.
Definition: hid.h:430
HidGyroscopeZeroDriftMode_Tight
@ HidGyroscopeZeroDriftMode_Tight
Tight.
Definition: hid.h:362
hidStopSixAxisSensor
Result hidStopSixAxisSensor(HidSixAxisSensorHandle handle)
Stops the SixAxisSensor for the specified handle.
HidNpadLuciaState::attributes
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:814
HidDebugPadLifo
HidDebugPadLifo.
Definition: hid.h:608
HidTouchScreenModeForNx
HidTouchScreenModeForNx
HidTouchScreenModeForNx.
Definition: hid.h:35
HidGestureSharedMemoryFormat
HidGestureSharedMemoryFormat.
Definition: hid.h:1034
hidSetPalmaUniqueCodeInvalid
Result hidSetPalmaUniqueCodeInvalid(HidPalmaConnectionHandle handle)
SetPalmaUniqueCodeInvalid.
HidDebugPadButton_A
@ HidDebugPadButton_A
A button.
Definition: hid.h:18
HidVibrationValue::freq_high
float freq_high
High Band frequency in Hz.
Definition: hid.h:1124
hidEnablePalmaBoostMode
Result hidEnablePalmaBoostMode(bool flag)
EnablePalmaBoostMode.
HidNpadIdType_Other
@ HidNpadIdType_Other
Other controller.
Definition: hid.h:223
hidSetNpadJoyAssignmentModeSingleWithDestination
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*.
HidPalmaOperationType_ResetPlayLog
@ HidPalmaOperationType_ResetPlayLog
[5.1.0+] ResetPlayLog
Definition: hid.h:532
HidColorAttribute_Ok
@ HidColorAttribute_Ok
Ok.
Definition: hid.h:249
hidIsUsbFullKeyControllerEnabled
Result hidIsUsbFullKeyControllerEnabled(bool *out)
IsUsbFullKeyControllerEnabled.
HidNpadInternalState::lucia_type
u32 lucia_type
HidNpadLuciaType
Definition: hid.h:977
HidKeyboardLockKeyEvent_NumLockOn
@ HidKeyboardLockKeyEvent_NumLockOn
NumLockOn.
Definition: hid.h:202
HidAppletFooterUiType_JoyLeftHorizontal
@ HidAppletFooterUiType_JoyLeftHorizontal
JoyLeftHorizontal.
Definition: hid.h:445
hidSwapNpadAssignment
Result hidSwapNpadAssignment(HidNpadIdType id0, HidNpadIdType id1)
SwapNpadAssignment.
hidReadPalmaPlayLog
Result hidReadPalmaPlayLog(HidPalmaConnectionHandle handle, u16 unk)
ReadPalmaPlayLog.
HidNpadSystemButtonProperties::is_unintended_home_button_input_protection_enabled
u32 is_unintended_home_button_input_protection_enabled
IsUnintendedHomeButtonInputProtectionEnabled.
Definition: hid.h:898
HidNpadJoyLeftState
HidNpadCommonState HidNpadJoyLeftState
State for HidNpadStyleTag_NpadJoyLeft.
Definition: hid.h:769
HidDebugPadButton_Down
@ HidDebugPadButton_Down
D-Pad Down button.
Definition: hid.h:31
HidNpadJoyDeviceType
HidNpadJoyDeviceType
NpadJoyDeviceType.
Definition: hid.h:372
HidAppletFooterUiType_Lucia
@ HidAppletFooterUiType_Lucia
Lucia.
Definition: hid.h:456
HidDeviceType_LarkRightNES
@ HidDeviceType_LarkRightNES
HidDeviceTypeBits_LarkRightNES
Definition: hid.h:426
HidNpadInternalState::joy_left_six_axis_sensor_lifo
HidNpadSixAxisSensorLifo joy_left_six_axis_sensor_lifo
JoyLeftSixAxisSensorLifo.
Definition: hid.h:954
HidNpadIdType_Handheld
@ HidNpadIdType_Handheld
Handheld mode controls.
Definition: hid.h:224
HidNpadAttribute_IsRightWired
@ HidNpadAttribute_IsRightWired
IsRightWired.
Definition: hid.h:320
HidNpadSystemButtonProperties
NpadSystemButtonProperties.
Definition: hid.h:897
HidNpadInternalState::applet_footer_ui_attribute
u32 applet_footer_ui_attribute
Bitfield of AppletFooterUiAttribute.
Definition: hid.h:968
hidGetActualVibrationGcErmCommand
Result hidGetActualVibrationGcErmCommand(HidVibrationDeviceHandle handle, HidVibrationGcErmCommand *out)
Get HidVibrationGcErmCommand for the specified device, for HidVibrationDeviceType_GcErm.
HidPalmaFrModeType_B03
@ HidPalmaFrModeType_B03
B03.
Definition: hid.h:540
HidKeyboardLockKeyEvent_CapsLockOn
@ HidKeyboardLockKeyEvent_CapsLockOn
CapsLockOn.
Definition: hid.h:205
HidKeyboardLockKeyEvent_NumLockToggle
@ HidKeyboardLockKeyEvent_NumLockToggle
NumLockToggle.
Definition: hid.h:204
HidNpadButton_RightSL
@ HidNpadButton_RightSL
SL button on Right Joy-Con.
Definition: hid.h:282
HidVibrationGcErmCommand_Stop
@ HidVibrationGcErmCommand_Stop
Stops the vibration with a decay phase.
Definition: hid.h:509
HidNfcXcdDeviceHandleStateImpl
HidNfcXcdDeviceHandleStateImpl.
Definition: hid.h:915
HidNpadAttribute_IsRightConnected
@ HidNpadAttribute_IsRightConnected
IsRightConnected.
Definition: hid.h:319
hidResetSixAxisSensorFusionParameters
Result hidResetSixAxisSensorFusionParameters(HidSixAxisSensorHandle handle)
ResetSixAxisSensorFusionParameters.
HidNpadGcTriggerStateAtomicStorage::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:842
HidAppletFooterUiType_HandheldJoyConLeftOnly
@ HidAppletFooterUiType_HandheldJoyConLeftOnly
HandheldJoyConLeftOnly.
Definition: hid.h:439
HidPowerInfo::is_charging
bool is_charging
IsCharging.
Definition: hid.h:904
HidDebugPadButton_Left
@ HidDebugPadButton_Left
D-Pad Left button.
Definition: hid.h:28
HidSevenSixAxisSensorStateEntry
HidSevenSixAxisSensorStateEntry.
Definition: hid.h:1079
HidPalmaOperationType_ReadPlayLog
@ HidPalmaOperationType_ReadPlayLog
[5.1.0+] ReadPlayLog
Definition: hid.h:531
HidNpadJoyColorState
HidNpadJoyColorState.
Definition: hid.h:750
HidKeyboardStateAtomicStorage::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:716
HidGestureType_Complete
@ HidGestureType_Complete
Complete.
Definition: hid.h:347
hidGetNpadCommunicationMode
Result hidGetNpadCommunicationMode(HidNpadCommunicationMode *out)
GetNpadCommunicationMode.
HidCommonLifoHeader
HidCommonLifoHeader.
Definition: hid.h:583
HidTouchScreenModeForNx_Heat2
@ HidTouchScreenModeForNx_Heat2
Heat2.
Definition: hid.h:38
HidNpadButton_StickRDown
@ HidNpadButton_StickRDown
Right Stick pseudo-button when moved Left.
Definition: hid.h:279
HidSixAxisSensorStateAtomicStorage
HidSixAxisSensorStateAtomicStorage.
Definition: hid.h:865
HidNpadSystemProperties::is_charging
u64 is_charging
Use hidGetNpadPowerInfoSingle / hidGetNpadPowerInfoSplit instead of accessing this directly.
Definition: hid.h:878
HidConsoleSixAxisSensor::gyro_bias
UtilFloat3 gyro_bias
GyroBias.
Definition: hid.h:1047
HidMouseButton
HidMouseButton
HidMouseButton.
Definition: hid.h:42
HidNpadCommunicationMode_Default
@ HidNpadCommunicationMode_Default
Default.
Definition: hid.h:395
HidNpadInternalState::joy_color
HidNpadJoyColorState joy_color
HidNpadJoyColorState
Definition: hid.h:940
HidNpadControllerColor::sub
u32 sub
RGBA Buttons Color.
Definition: hid.h:740
HidDebugPadAttribute_IsConnected
@ HidDebugPadAttribute_IsConnected
IsConnected.
Definition: hid.h:298
HidGestureState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:1004
HidDebugPadButton_Up
@ HidDebugPadButton_Up
D-Pad Up button.
Definition: hid.h:29
HidNpadInternalState::lark_type_r
u32 lark_type_r
HidNpadLarkType
Definition: hid.h:976
HidGestureState::attributes
u32 attributes
Bitfield of HidGestureAttribute.
Definition: hid.h:1014
hidWritePalmaRgbLedPatternEntry
Result hidWritePalmaRgbLedPatternEntry(HidPalmaConnectionHandle handle, u16 unk, const void *buffer, size_t size)
WritePalmaRgbLedPatternEntry.
HidTouchAttribute
HidTouchAttribute
HidTouchAttribute.
Definition: hid.h:302
HidNpadPalmaState
HidNpadCommonState HidNpadPalmaState
State for HidNpadStyleTag_NpadPalma.
Definition: hid.h:784
HidGestureState::y
u32 y
Y.
Definition: hid.h:1009
HidNpadLuciaType_Invalid
@ HidNpadLuciaType_Invalid
Invalid.
Definition: hid.h:487
HidNpadGcState::analog_stick_r
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hid.h:777
HidDebugPadButton_R
@ HidDebugPadButton_R
R button.
Definition: hid.h:23
hidGetNpadControllerColorSingle
Result hidGetNpadControllerColorSingle(HidNpadIdType id, HidNpadControllerColor *color)
Gets the main HidNpadControllerColor for the specified Npad.
hidInitializeTouchScreen
void hidInitializeTouchScreen(void)
Initialize TouchScreen. Must be called when TouchScreen is being used. Used automatically by hidScanI...
hidResetGyroscopeZeroDriftMode
Result hidResetGyroscopeZeroDriftMode(HidSixAxisSensorHandle handle)
Resets the HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle to HidGyroscopeZeroDriftMo...
HidTouchScreenStateAtomicStorage::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:646
HidNpadButton_StickL
@ HidNpadButton_StickL
Left Stick button.
Definition: hid.h:260
HidNpadButton_Y
@ HidNpadButton_Y
Y button / Left face button.
Definition: hid.h:259
HidNpadFullKeyColorState::attribute
u32 attribute
HidColorAttribute
Definition: hid.h:745
HidNpadSystemProperties::is_unsupported_button_pressed_on_npad_system
u64 is_unsupported_button_pressed_on_npad_system
IsUnsupportedButtonPressedOnNpadSystem.
Definition: hid.h:884
s32
int32_t s32
32-bit signed integer.
Definition: types.h:27
HidGestureDirection
HidGestureDirection
HidGestureDirection.
Definition: hid.h:336
hidFinalizeSevenSixAxisSensor
Result hidFinalizeSevenSixAxisSensor(void)
Finalizes the SevenSixAxisSensor.
hidExit
void hidExit(void)
Exit hid. Called automatically during app exit.
HidNpadFullKeyColorState
HidNpadFullKeyColorState.
Definition: hid.h:744
HidGyroscopeZeroDriftMode_Loose
@ HidGyroscopeZeroDriftMode_Loose
Loose.
Definition: hid.h:360
HidNpadLuciaType_E
@ HidNpadLuciaType_E
E.
Definition: hid.h:489
hidGetPalmaConnectionHandle
Result hidGetPalmaConnectionHandle(HidNpadIdType id, HidPalmaConnectionHandle *out)
GetPalmaConnectionHandle.
HidNpadIdType_No6
@ HidNpadIdType_No6
Player 6 controller.
Definition: hid.h:220
hidResetSevenSixAxisSensorTimestamp
Result hidResetSevenSixAxisSensorTimestamp(void)
Resets the timestamp for the SevenSixAxisSensor.
HidNpadLarkType_NR
@ HidNpadLarkType_NR
NR.
Definition: hid.h:482
HidMouseState::delta_x
s32 delta_x
DeltaX.
Definition: hid.h:677
HidNpadGcState::trigger_l
u32 trigger_l
L analog trigger. Valid range: 0x0-0x7FFF.
Definition: hid.h:779
HidGesturePoint
HidGesturePoint.
Definition: hid.h:997
HidNpadSystemProperties::unused
u64 unused
Unused.
Definition: hid.h:893
HidNpadSystemProperties::bit8
u64 bit8
Unused.
Definition: hid.h:883
hidEnableSixAxisSensorFusion
Result hidEnableSixAxisSensorFusion(HidSixAxisSensorHandle handle, bool flag)
EnableSixAxisSensorFusion.
HidPalmaFrModeType_B02
@ HidPalmaFrModeType_B02
B02.
Definition: hid.h:539
hidSetNpadCaptureButtonAssignment
Result hidSetNpadCaptureButtonAssignment(HidNpadStyleTag style, u64 buttons)
Assigns the button(s) which trigger the CaptureButton.
HidPalmaOperationType_WriteApplicationSection
@ HidPalmaOperationType_WriteApplicationSection
WriteApplicationSection.
Definition: hid.h:522
hidKeyboardStateGetKey
static bool hidKeyboardStateGetKey(const HidKeyboardState *state, HidKeyboardKey key)
Gets the state of a key in a HidKeyboardState.
Definition: hid.h:1216
HidNpadAttribute
HidNpadAttribute
HidNpadAttribute.
Definition: hid.h:314
HidTouchScreenStateAtomicStorage
HidTouchScreenStateAtomicStorage.
Definition: hid.h:645
HidNpadSystemProperties::is_directional_buttons_available
u64 is_directional_buttons_available
[8.0.0+] IsDirectionalButtonsAvailable
Definition: hid.h:891
hidIsSixAxisSensorFusionEnabled
Result hidIsSixAxisSensorFusionEnabled(HidSixAxisSensorHandle handle, bool *out)
IsSixAxisSensorFusionEnabled.
HidDebugPadButton
HidDebugPadButton
HidDebugPadButton.
Definition: hid.h:17
HidPalmaOperationType_EnableStep
@ HidPalmaOperationType_EnableStep
EnableStep.
Definition: hid.h:519
HidSixAxisSensorState
HidSixAxisSensorState.
Definition: hid.h:853
HidDeviceTypeBits_LarkLeftHVC
@ HidDeviceTypeBits_LarkLeftHVC
Famicom left controller.
Definition: hid.h:407
HidNpadButton_Plus
@ HidNpadButton_Plus
Plus button.
Definition: hid.h:266
HidNpadLarkType_NL
@ HidNpadLarkType_NL
NL.
Definition: hid.h:481
HidColorAttribute
HidColorAttribute
HidColorAttribute.
Definition: hid.h:248
hidSetNpadCommunicationMode
Result hidSetNpadCommunicationMode(HidNpadCommunicationMode mode)
SetNpadCommunicationMode.
HidNpadLuciaState::analog_stick_r
HidAnalogStickState analog_stick_r
This is always zero.
Definition: hid.h:813
HidVibrationDevicePosition
HidVibrationDevicePosition
VibrationDevicePosition.
Definition: hid.h:501
HidNpadButton_StickRRight
@ HidNpadButton_StickRRight
Right Stick pseudo-button when moved Right.
Definition: hid.h:278
hidIsSevenSixAxisSensorAtRest
Result hidIsSevenSixAxisSensorAtRest(bool *out)
IsSevenSixAxisSensorAtRest.
HidNpadJoyHoldType_Vertical
@ HidNpadJoyHoldType_Vertical
Default / Joy-Con held vertically.
Definition: hid.h:367
HidVibrationDevicePosition_None
@ HidVibrationDevicePosition_None
None.
Definition: hid.h:502
HidGestureState::delta_x
s32 delta_x
DeltaX.
Definition: hid.h:1010
HidDebugPadButton_X
@ HidDebugPadButton_X
X button.
Definition: hid.h:20
HidNpadFullKeyState
HidNpadCommonState HidNpadFullKeyState
State for HidNpadStyleTag_NpadFullKey.
Definition: hid.h:766
HidMouseState::delta_y
s32 delta_y
DeltaY.
Definition: hid.h:678
HidNpadButton_StickLLeft
@ HidNpadButton_StickLLeft
Left Stick pseudo-button when moved Left.
Definition: hid.h:272
HidPalmaOperationType_WriteRgbLedPatternEntry
@ HidPalmaOperationType_WriteRgbLedPatternEntry
WriteRgbLedPatternEntry.
Definition: hid.h:526
HidDeviceType_JoyLeft4
@ HidDeviceType_JoyLeft4
HidDeviceTypeBits_JoyLeft
Definition: hid.h:420
HidDeviceType_System20
@ HidDeviceType_System20
HidDeviceTypeBits_System with HidNpadStyleTag |= HidNpadStyleTag_NpadJoyDual.
Definition: hid.h:431
HidAppletFooterUiType_LarkHvc2
@ HidAppletFooterUiType_LarkHvc2
LarkHvc2.
Definition: hid.h:453
HidSixAxisSensorState::angle
HidVector angle
Angle.
Definition: hid.h:858
hidSetNpadJoyHoldType
Result hidSetNpadJoyHoldType(HidNpadJoyHoldType type)
Sets the HidNpadJoyHoldType.
hidStartSixAxisSensor
Result hidStartSixAxisSensor(HidSixAxisSensorHandle handle)
Starts the SixAxisSensor for the specified handle.
hidEndPermitVibrationSession
Result hidEndPermitVibrationSession(void)
Ends the session started by hidBeginPermitVibrationSession.
HidNpadSharedMemoryFormat
HidNpadSharedMemoryFormat.
Definition: hid.h:988
hidGetNpadControllerColorSplit
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).
HidNpadButton_StickLUp
@ HidNpadButton_StickLUp
Left Stick pseudo-button when moved Up.
Definition: hid.h:273
HidNfcXcdDeviceHandleState
HidNfcXcdDeviceHandleState.
Definition: hid.h:930
HidNpadHandheldLarkState::analog_stick_l
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hid.h:800
HidNpadJoyColorState::attribute
u32 attribute
HidColorAttribute
Definition: hid.h:751
hidGetNpadStyleSet
u32 hidGetNpadStyleSet(HidNpadIdType id)
Gets the StyleSet for the specified Npad.
HidNpadIdType
HidNpadIdType
HID controller IDs.
Definition: hid.h:214
HidNpadJoyRightState
HidNpadCommonState HidNpadJoyRightState
State for HidNpadStyleTag_NpadJoyRight.
Definition: hid.h:770
HidNpadButton_LeftSL
@ HidNpadButton_LeftSL
SL button on Left Joy-Con.
Definition: hid.h:280
HidNpadLuciaState
State for HidNpadStyleTag_NpadLucia. The base state is loaded from the same lifo as HidNpadFullKeySta...
Definition: hid.h:809
HidGestureDummyStateAtomicStorage
HidGestureDummyStateAtomicStorage.
Definition: hid.h:1022
HidAppletFooterUiType_Verification
@ HidAppletFooterUiType_Verification
Verification.
Definition: hid.h:457
HidColorAttribute_NoController
@ HidColorAttribute_NoController
NoController.
Definition: hid.h:251
hidClearNpadCaptureButtonAssignment
Result hidClearNpadCaptureButtonAssignment(void)
ClearNpadCaptureButtonAssignment.
HidNpadCommonStateAtomicStorage::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:823
HidGestureDirection_Up
@ HidGestureDirection_Up
Up.
Definition: hid.h:339
hidPermitVibration
Result hidPermitVibration(bool flag)
Sets whether vibration is allowed, this also affects the config displayed by System Settings.
HidGestureDirection_Left
@ HidGestureDirection_Left
Left.
Definition: hid.h:338
hidPlayPalmaActivity
Result hidPlayPalmaActivity(HidPalmaConnectionHandle handle, u16 val)
PlayPalmaActivity.
HidKeyboardLockKeyEvent_ScrollLockOff
@ HidKeyboardLockKeyEvent_ScrollLockOff
ScrollLockOff.
Definition: hid.h:209
HidPalmaActivityEntry::rgb_led_pattern_index
u16 rgb_led_pattern_index
RgbLedPatternIndex.
Definition: hid.h:1146
HidTouchAttribute_End
@ HidTouchAttribute_End
End.
Definition: hid.h:304
HidMouseAttribute
HidMouseAttribute
HidMouseAttribute.
Definition: hid.h:308
HidTouchAttribute_Start
@ HidTouchAttribute_Start
Start.
Definition: hid.h:303
HidNpadJoyColorState::left
HidNpadControllerColor left
HidNpadControllerColor Left
Definition: hid.h:752
HidVibrationDevicePosition_Right
@ HidVibrationDevicePosition_Right
Right.
Definition: hid.h:504
HidNpadLuciaState::lucia_type
HidNpadLuciaType lucia_type
HidNpadLuciaType
Definition: hid.h:815
HidNpadCommonState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:758
HidPalmaWaveSet
HidPalmaWaveSet
PalmaWaveSet.
Definition: hid.h:545
HidNpadButton_Minus
@ HidNpadButton_Minus
Minus button.
Definition: hid.h:267
HidGestureState::delta_y
s32 delta_y
DeltaY.
Definition: hid.h:1011
HidNpadSystemProperties::is_sl_sr_button_oriented
u64 is_sl_sr_button_oriented
IsSlSrButtonOriented.
Definition: hid.h:888
HidTouchScreenState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:638
HidKeyboardState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:709
hidIsVibrationPermitted
Result hidIsVibrationPermitted(bool *flag)
Gets whether vibration is allowed.
HidCommonLifoHeader::unused
u64 unused
Unused.
Definition: hid.h:584
hidGetNpadStatesSystemExt
size_t hidGetNpadStatesSystemExt(HidNpadIdType id, HidNpadSystemExtState *states, size_t count)
Gets HidNpadSystemExtState.
HidNpadButton_HandheldLeftB
@ HidNpadButton_HandheldLeftB
B button on Left NES/HVC controller in Handheld mode.
Definition: hid.h:286
HidVibrationGcErmCommand
HidVibrationGcErmCommand
VibrationGcErmCommand.
Definition: hid.h:508
HidDeviceTypeBits_System
@ HidDeviceTypeBits_System
Generic controller.
Definition: hid.h:412
HidNpadButton
HidNpadButton
HidNpadButton.
Definition: hid.h:255
HidDeviceType_LarkLeftNES
@ HidDeviceType_LarkLeftNES
HidDeviceTypeBits_LarkLeftNES
Definition: hid.h:425
HidVibrationDeviceType_GcErm
@ HidVibrationDeviceType_GcErm
GcErm (HidNpadStyleTag_NpadGc)
Definition: hid.h:497
HidNfcXcdDeviceHandleStateImplAtomicStorage::state
HidNfcXcdDeviceHandleStateImpl state
HidNfcXcdDeviceHandleStateImpl
Definition: hid.h:926
HidNpadStyleTag_NpadFullKey
@ HidNpadStyleTag_NpadFullKey
Pro Controller.
Definition: hid.h:229
HidNpadLuciaState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:810
hidIsVibrationDeviceMounted
Result hidIsVibrationDeviceMounted(HidVibrationDeviceHandle handle, bool *flag)
Gets whether vibration is available with the specified device.
HidNpadHandheldLarkState::analog_stick_r
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hid.h:801
HidNpadJoyColorState::right
HidNpadControllerColor right
HidNpadControllerColor Right
Definition: hid.h:753
HidNpadLarkState
State for HidNpadStyleTag_NpadLark. The base state is loaded from the same lifo as HidNpadFullKeyStat...
Definition: hid.h:787
HidNpadAttribute_IsLeftConnected
@ HidNpadAttribute_IsLeftConnected
IsLeftConnected.
Definition: hid.h:317
HidNpadGcState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:774
hidSetSixAxisSensorFusionParameters
Result hidSetSixAxisSensorFusionParameters(HidSixAxisSensorHandle handle, float unk0, float unk1)
SetSixAxisSensorFusionParameters.
hidInitializeMouse
void hidInitializeMouse(void)
Initialize Mouse. Must be called when Mouse is being used. Used automatically by hidScanInput when re...
HidGestureState::point_count
s32 point_count
Number of entries in the points array.
Definition: hid.h:1017
hidSetPalmaFrModeType
Result hidSetPalmaFrModeType(HidPalmaConnectionHandle handle, HidPalmaFrModeType type)
SetPalmaFrModeType.
hidGetNpadPowerInfoSingle
void hidGetNpadPowerInfoSingle(HidNpadIdType id, HidPowerInfo *info)
Gets the main HidPowerInfo for the specified Npad.
hidGetPalmaOperationInfo
Result hidGetPalmaOperationInfo(HidPalmaConnectionHandle handle, HidPalmaOperationInfo *out)
Gets HidPalmaOperationInfo for a completed operation.
HidKeyboardLockKeyEvent_CapsLockToggle
@ HidKeyboardLockKeyEvent_CapsLockToggle
CapsLockToggle.
Definition: hid.h:207
HidAppletFooterUiType_HandheldJoyConLeftJoyConRight
@ HidAppletFooterUiType_HandheldJoyConLeftJoyConRight
HandheldJoyConLeftJoyConRight.
Definition: hid.h:441
HidNpadLuciaState::buttons
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:811
HidSixAxisSensorHandle::type_value
u32 type_value
TypeValue.
Definition: hid.h:1093
hidGetSevenSixAxisSensorFusionStrength
Result hidGetSevenSixAxisSensorFusionStrength(float *strength)
Gets the SevenSixAxisSensor FusionStrength.
HidNpadInternalState::lark_type_l_and_main
u32 lark_type_l_and_main
HidNpadLarkType
Definition: hid.h:975
HidNpadStyleTag_NpadHandheld
@ HidNpadStyleTag_NpadHandheld
Joy-Con controller in handheld mode.
Definition: hid.h:230
u32
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
HidNpadStyleTag_NpadHandheldLark
@ HidNpadStyleTag_NpadHandheldLark
NES/Famicom controller in handheld mode.
Definition: hid.h:237
HidNpadJoyDualState
HidNpadCommonState HidNpadJoyDualState
State for HidNpadStyleTag_NpadJoyDual.
Definition: hid.h:768
HidGestureType_Idle
@ HidGestureType_Idle
Idle.
Definition: hid.h:346
HidNpadButton_AnySR
@ HidNpadButton_AnySR
Bitmask containing SR buttons on both Joy-Cons (Left/Right)
Definition: hid.h:293
HidGestureState::x
u32 x
X.
Definition: hid.h:1008
HidGestureState::context_number
u64 context_number
ContextNumber.
Definition: hid.h:1005
HidNpadGcState
State for HidNpadStyleTag_NpadGc. Loaded from the same lifo as HidNpadFullKeyState,...
Definition: hid.h:773
HidGestureType_Touch
@ HidGestureType_Touch
Touch.
Definition: hid.h:349
HidNpadSystemState
HidNpadCommonState HidNpadSystemState
State for HidNpadStyleTag_NpadSystem. Analog-sticks state are always zero. Only the following button ...
Definition: hid.h:819
HidGestureState::scale
float scale
Scale.
Definition: hid.h:1015
HidNpadHandheldActivationMode_Dual
@ HidNpadHandheldActivationMode_Dual
Dual (2 Joy-Cons)
Definition: hid.h:379
HidVibrationDeviceHandle::pad
u32 pad
Padding.
Definition: hid.h:1109
hidGetNpadSystemProperties
void hidGetNpadSystemProperties(HidNpadIdType id, HidNpadSystemProperties *out)
Gets the HidNpadSystemProperties for the specified Npad.
HidVibrationValue::amp_low
float amp_low
Low Band amplitude. 1.0f: Max amplitude.
Definition: hid.h:1121
HidPalmaOperationType_SuspendFeature
@ HidPalmaOperationType_SuspendFeature
SuspendFeature.
Definition: hid.h:530
HidSixAxisSensorState::angular_velocity
HidVector angular_velocity
AngularVelocity.
Definition: hid.h:857
HidVibrationDeviceInfo::type
u32 type
HidVibrationDeviceType
Definition: hid.h:1115
HidNpadButton_Right
@ HidNpadButton_Right
D-Pad Right button.
Definition: hid.h:270
HidKeyboardLockKeyEvent_ScrollLockToggle
@ HidKeyboardLockKeyEvent_ScrollLockToggle
ScrollLockToggle.
Definition: hid.h:210
HidTouchScreenState::count
s32 count
Number of entries in the touches array.
Definition: hid.h:639
HidDebugPadLifo::storage
HidDebugPadStateAtomicStorage storage[17]
HidDebugPadStateAtomicStorage
Definition: hid.h:610
HidDeviceTypeBits_LarkRightNES
@ HidDeviceTypeBits_LarkRightNES
NES right controller.
Definition: hid.h:410
HidSixAxisSensorStateAtomicStorage::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:866
HidDeviceTypeBits_LarkRightHVC
@ HidDeviceTypeBits_LarkRightHVC
Famicom right controller (with microphone).
Definition: hid.h:408
HidNpadHandheldLarkState::attributes
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:802
HidNpadJoyHoldType_Horizontal
@ HidNpadJoyHoldType_Horizontal
Joy-Con held horizontally.
Definition: hid.h:368
hidGetNpadStatesHandheldLark
size_t hidGetNpadStatesHandheldLark(HidNpadIdType id, HidNpadHandheldLarkState *states, size_t count)
Gets HidNpadHandheldLarkState.
HidPalmaConnectionHandle::handle
u64 handle
Handle.
Definition: hid.h:1129
HidSharedMemory::digitizer
u8 digitizer[0x1000]
[10.0.0+] Digitizer [1.0.0-9.2.0] BasicXpad
Definition: hid.h:1057
HidNpadInternalState::full_key_color
HidNpadFullKeyColorState full_key_color
HidNpadFullKeyColorState
Definition: hid.h:939
HidNpadSystemProperties::is_unsupported_button_pressed_on_npad_system_ext
u64 is_unsupported_button_pressed_on_npad_system_ext
IsUnsupportedButtonPressedOnNpadSystemExt.
Definition: hid.h:885
HidTouchScreenState::touches
HidTouchState touches[16]
Array of HidTouchState, with the above count.
Definition: hid.h:641
HidNpadJoyAssignmentMode_Dual
@ HidNpadJoyAssignmentMode_Dual
Dual (Set by hidSetNpadJoyAssignmentModeDual)
Definition: hid.h:386
HidKeyboardLockKeyEvent_ScrollLockOn
@ HidKeyboardLockKeyEvent_ScrollLockOn
ScrollLockOn.
Definition: hid.h:208
HidPalmaWaveSet_Small
@ HidPalmaWaveSet_Small
Small.
Definition: hid.h:546
HidGestureDummyStateAtomicStorage::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:1023
HidNpadSystemProperties::is_minus_available
u64 is_minus_available
[4.0.0+] IsMinusAvailable
Definition: hid.h:890
HidNpadInternalState::applet_footer_ui_type
u8 applet_footer_ui_type
HidAppletFooterUiType
Definition: hid.h:969
HidNpadButton_Down
@ HidNpadButton_Down
D-Pad Down button.
Definition: hid.h:271
hidSetSupportedNpadIdType
Result hidSetSupportedNpadIdType(const HidNpadIdType *ids, size_t count)
Sets which HidNpadIdType are supported.
HidKeyboardSharedMemoryFormat
HidKeyboardSharedMemoryFormat.
Definition: hid.h:727
HidDebugPadStateAtomicStorage
HidDebugPadStateAtomicStorage.
Definition: hid.h:602
HidTouchScreenSharedMemoryFormat
HidTouchScreenSharedMemoryFormat.
Definition: hid.h:657
hidPairPalma
Result hidPairPalma(HidPalmaConnectionHandle handle)
PairPalma.
HidSixAxisSensorState::attributes
u32 attributes
Bitfield of HidSixAxisSensorAttribute.
Definition: hid.h:860
hidGetNpadStatesGc
size_t hidGetNpadStatesGc(HidNpadIdType id, HidNpadGcState *states, size_t count)
Gets HidNpadGcState.
HidGesturePoint::x
u32 x
X.
Definition: hid.h:998
HidAppletFooterUiType_JoyRightHorizontal
@ HidAppletFooterUiType_JoyRightHorizontal
JoyRightHorizontal.
Definition: hid.h:447
HidGestureState
HidGestureState.
Definition: hid.h:1003
HidNpadHandheldLarkState::lark_type_r
HidNpadLarkType lark_type_r
HidNpadLarkType LarkTypeR
Definition: hid.h:804
HidDebugPadStateAtomicStorage::state
HidDebugPadState state
HidDebugPadState
Definition: hid.h:604
HidTouchScreenState::reserved
u32 reserved
Reserved.
Definition: hid.h:640
HidNpadStyleSet_NpadFullCtrl
@ HidNpadStyleSet_NpadFullCtrl
Style set comprising Npad styles containing the full set of controls {FullKey, Handheld,...
Definition: hid.h:243
HidSevenSixAxisSensorState
HidSevenSixAxisSensorState.
Definition: hid.h:1070
HidAnalogStickState::y
s32 y
Y.
Definition: hid.h:562
HidPalmaOperationInfo::type
u32 type
HidPalmaOperationType
Definition: hid.h:1134
hidMergeSingleJoyAsDualJoy
Result hidMergeSingleJoyAsDualJoy(HidNpadIdType id0, HidNpadIdType id1)
Merge two single joy-cons into a dual-mode controller.
hidGetNpadStatesLark
size_t hidGetNpadStatesLark(HidNpadIdType id, HidNpadLarkState *states, size_t count)
Gets HidNpadLarkState.
HidNpadButton_X
@ HidNpadButton_X
X button / Up face button.
Definition: hid.h:258
HidAnalogStickState
HidAnalogStickState.
Definition: hid.h:560
HidAppletFooterUiType_LarkNesRight
@ HidAppletFooterUiType_LarkNesRight
LarkNesRight.
Definition: hid.h:455
hidGetSevenSixAxisSensorStates
Result hidGetSevenSixAxisSensorStates(HidSevenSixAxisSensorState *states, size_t count, size_t *total_out)
GetSevenSixAxisSensorStates.
u64
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
HidNpadHandheldActivationMode
HidNpadHandheldActivationMode
This controls how many Joy-Cons must be attached for handheld-mode to be activated.
Definition: hid.h:378
HidTouchScreenLifo
HidTouchScreenLifo.
Definition: hid.h:651
HidTouchScreenConfigurationForNx
HidTouchScreenConfigurationForNx.
Definition: hid.h:663
hidGetGestureStates
size_t hidGetGestureStates(HidGestureState *states, size_t count)
Gets HidGestureState.
hidStartSevenSixAxisSensor
Result hidStartSevenSixAxisSensor(void)
Starts the SevenSixAxisSensor.
HidNpadCommonState::reserved
u32 reserved
Reserved.
Definition: hid.h:763
hidGetSupportedNpadStyleSet
Result hidGetSupportedNpadStyleSet(u32 *style_set)
Gets which controller styles are supported.
HidMouseStateAtomicStorage::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:687
HidNpadHandheldLarkState::lark_type_l_and_main
HidNpadLarkType lark_type_l_and_main
HidNpadLarkType LarkTypeLAndMain
Definition: hid.h:803
HidNpadCommonState::analog_stick_r
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hid.h:761
HidTouchState
HidTouchState.
Definition: hid.h:624
HidSixAxisSensorHandle::pad
u32 pad
Padding.
Definition: hid.h:1098
hidBeginPermitVibrationSession
Result hidBeginPermitVibrationSession(void)
Begins a forced-permitted vibration session.
hidSendVibrationValue
Result hidSendVibrationValue(HidVibrationDeviceHandle handle, const HidVibrationValue *value)
Sends the HidVibrationDeviceHandle to the specified device.
HidDebugPadState::analog_stick_l
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hid.h:598
HidSixAxisSensorHandle::npad_style_index
u32 npad_style_index
NpadStyleIndex.
Definition: hid.h:1095
HidGestureAttribute
HidGestureAttribute
HidGestureAttribute.
Definition: hid.h:330
HidNpadHandheldLarkState::buttons
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:799
HidNpadStyleTag_NpadSystem
@ HidNpadStyleTag_NpadSystem
Generic controller.
Definition: hid.h:241
HidNpadHandheldActivationMode_None
@ HidNpadHandheldActivationMode_None
None (0 Joy-Cons)
Definition: hid.h:381
HidPalmaOperationType_WriteWaveEntry
@ HidPalmaOperationType_WriteWaveEntry
WriteWaveEntry.
Definition: hid.h:527
HidDebugPadState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:594
HidNpadSystemProperties
NpadSystemProperties.
Definition: hid.h:877
HidPalmaOperationType_WriteDataBaseIdentificationVersion
@ HidPalmaOperationType_WriteDataBaseIdentificationVersion
WriteDataBaseIdentificationVersion.
Definition: hid.h:529
HidNfcXcdDeviceHandleStateImplAtomicStorage
HidNfcXcdDeviceHandleStateImplAtomicStorage.
Definition: hid.h:924
HidPalmaActivityEntry::pad
u16 pad
Padding.
Definition: hid.h:1147
HidNpadJoyDeviceType_Right
@ HidNpadJoyDeviceType_Right
Right.
Definition: hid.h:374
hidGetNpadStatesJoyRight
size_t hidGetNpadStatesJoyRight(HidNpadIdType id, HidNpadJoyRightState *states, size_t count)
Gets HidNpadJoyRightState.
HidNpadButton_RightSR
@ HidNpadButton_RightSR
SR button on Right Joy-Con.
Definition: hid.h:283
HidPalmaOperationType_ResetStep
@ HidPalmaOperationType_ResetStep
ResetStep.
Definition: hid.h:520
hidGetNpadStatesSystem
size_t hidGetNpadStatesSystem(HidNpadIdType id, HidNpadSystemState *states, size_t count)
Gets HidNpadSystemState.
HidNpadStyleTag_NpadJoyDual
@ HidNpadStyleTag_NpadJoyDual
Joy-Con controller in dual mode.
Definition: hid.h:231
hidGetPalmaBluetoothAddress
Result hidGetPalmaBluetoothAddress(HidPalmaConnectionHandle handle, BtdrvAddress *out)
GetPalmaBluetoothAddress.
HidNpadStyleSet_NpadStandard
@ HidNpadStyleSet_NpadStandard
Style set comprising all standard Npad styles {FullKey, Handheld, JoyDual, JoyLeft,...
Definition: hid.h:244
HidDeviceType_FullKey6
@ HidDeviceType_FullKey6
HidDeviceTypeBits_FullKey
Definition: hid.h:422
HidNpadInterfaceType_USB
@ HidNpadInterfaceType_USB
USB.
Definition: hid.h:464
HidDeviceType_JoyRight5
@ HidDeviceType_JoyRight5
HidDeviceTypeBits_JoyRight
Definition: hid.h:421
hidInitializeSevenSixAxisSensor
Result hidInitializeSevenSixAxisSensor(void)
Initializes the SevenSixAxisSensor.
Result
u32 Result
Function error code result type.
Definition: types.h:44
HidVibrationDeviceHandle
HidVibrationDeviceHandle.
Definition: hid.h:1103
HidGestureType_Cancel
@ HidGestureType_Cancel
Cancel.
Definition: hid.h:348
HidNpadGcState::trigger_r
u32 trigger_r
R analog trigger. Valid range: 0x0-0x7FFF.
Definition: hid.h:780
hidInitializeKeyboard
void hidInitializeKeyboard(void)
Initialize Keyboard. Must be called when Keyboard is being used. Used automatically by hidScanInput w...
HidDeviceTypeBits_FullKey
@ HidDeviceTypeBits_FullKey
Pro Controller and Gc controller.
Definition: hid.h:400
HidDeviceTypeBits_JoyRight
@ HidDeviceTypeBits_JoyRight
Joy-Con right controller.
Definition: hid.h:405
HidNpadInternalState::handheld_six_axis_sensor_lifo
HidNpadSixAxisSensorLifo handheld_six_axis_sensor_lifo
HandheldSixAxisSensorLifo.
Definition: hid.h:951
HidDeviceType
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:416
HidKeyboardLockKeyEvent_NumLockOff
@ HidKeyboardLockKeyEvent_NumLockOff
NumLockOff.
Definition: hid.h:203
hidSetNpadHandheldActivationMode
Result hidSetNpadHandheldActivationMode(HidNpadHandheldActivationMode mode)
Sets the HidNpadHandheldActivationMode.
hidResetPalmaPlayLog
Result hidResetPalmaPlayLog(HidPalmaConnectionHandle handle, u16 unk)
ResetPalmaPlayLog.
HidNpadStyleTag_NpadLucia
@ HidNpadStyleTag_NpadLucia
SNES controller.
Definition: hid.h:238
hidGetNpadStatesJoyLeft
size_t hidGetNpadStatesJoyLeft(HidNpadIdType id, HidNpadJoyLeftState *states, size_t count)
Gets HidNpadJoyLeftState.
HidMouseState::attributes
u32 attributes
Bitfield of HidMouseAttribute.
Definition: hid.h:682
HidMouseState::x
s32 x
X.
Definition: hid.h:675
hidSetDisallowedPalmaConnection
Result hidSetDisallowedPalmaConnection(const BtdrvAddress *addrs, s32 count)
SetDisallowedPalmaConnection.
HidNpadInternalState::palma_lifo
HidNpadCommonLifo palma_lifo
PalmaLifo.
Definition: hid.h:947
HidNpadInternalState::full_key_lifo
HidNpadCommonLifo full_key_lifo
FullKeyLifo.
Definition: hid.h:942
HidVibrationDeviceType
HidVibrationDeviceType
Type values for HidVibrationDeviceInfo::type.
Definition: hid.h:494
HidNpadControllerColor::main
u32 main
RGBA Body Color.
Definition: hid.h:739
HidNpadButton_LeftSR
@ HidNpadButton_LeftSR
SR button on Left Joy-Con.
Definition: hid.h:281
hidReadPalmaUniqueCode
Result hidReadPalmaUniqueCode(HidPalmaConnectionHandle handle)
ReadPalmaUniqueCode.
HidNpadStyleTag_NpadGc
@ HidNpadStyleTag_NpadGc
GameCube controller.
Definition: hid.h:234
HidVibrationValue::amp_high
float amp_high
High Band amplitude. 1.0f: Max amplitude.
Definition: hid.h:1123
HidGestureType_Swipe
@ HidGestureType_Swipe
Swipe.
Definition: hid.h:353
HidNpadIdType_No5
@ HidNpadIdType_No5
Player 5 controller.
Definition: hid.h:219
HidPowerInfo::battery_level
u32 battery_level
BatteryLevel, always 0-4.
Definition: hid.h:906
HidTouchScreenModeForNx_UseSystemSetting
@ HidTouchScreenModeForNx_UseSystemSetting
UseSystemSetting.
Definition: hid.h:36
hidGetNpadStatesHandheld
size_t hidGetNpadStatesHandheld(HidNpadIdType id, HidNpadHandheldState *states, size_t count)
Gets HidNpadHandheldState.
HidAppletFooterUiType_SwitchProController
@ HidAppletFooterUiType_SwitchProController
SwitchProController.
Definition: hid.h:449
HidNpadButton_AnyDown
@ HidNpadButton_AnyDown
Bitmask containing all buttons that are considered Down (D-Pad, Sticks)
Definition: hid.h:291
hidGetNpadInterfaceType
Result hidGetNpadInterfaceType(HidNpadIdType id, u8 *out)
Gets the HidNpadInterfaceType for the specified controller.
HidNpadHandheldState
HidNpadCommonState HidNpadHandheldState
State for HidNpadStyleTag_NpadHandheld.
Definition: hid.h:767
hidGetNpadSystemButtonProperties
void hidGetNpadSystemButtonProperties(HidNpadIdType id, HidNpadSystemButtonProperties *out)
Gets the HidNpadSystemButtonProperties for the specified Npad.
HidDebugPadState::buttons
u32 buttons
Bitfield of HidDebugPadButton.
Definition: hid.h:596
HidPalmaActivityEntry::wave_index
u16 wave_index
WaveIndex.
Definition: hid.h:1149
HidNpadInterfaceType_Bluetooth
@ HidNpadInterfaceType_Bluetooth
Bluetooth.
Definition: hid.h:462
hidInitialize
Result hidInitialize(void)
Initialize hid. Called automatically during app startup.
HidNpadSystemProperties::is_powered
u64 is_powered
Use hidGetNpadPowerInfoSingle / hidGetNpadPowerInfoSplit instead of accessing this directly.
Definition: hid.h:879
hidIsFirmwareUpdateNeededForNotification
Result hidIsFirmwareUpdateNeededForNotification(bool *out)
IsFirmwareUpdateNeededForNotification.
HidSixAxisSensorState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:855
HidPalmaFrModeType_Off
@ HidPalmaFrModeType_Off
Off.
Definition: hid.h:537
HidSixAxisSensorAttribute_IsConnected
@ HidSixAxisSensorAttribute_IsConnected
IsConnected.
Definition: hid.h:325
HidVibrationValue
HidVibrationValue.
Definition: hid.h:1120
hidGetGyroBias
Result hidGetGyroBias(UtilFloat3 *out)
GetGyroBias.
HidPalmaOperationType_ReadDataBaseIdentificationVersion
@ HidPalmaOperationType_ReadDataBaseIdentificationVersion
ReadDataBaseIdentificationVersion.
Definition: hid.h:528
HidPalmaOperationType_ReadApplicationSection
@ HidPalmaOperationType_ReadApplicationSection
ReadApplicationSection.
Definition: hid.h:521
HidDebugPadAttribute
HidDebugPadAttribute
HidDebugPadAttribute.
Definition: hid.h:297
HidNpadButton_R
@ HidNpadButton_R
R button.
Definition: hid.h:263
HidNpadIdType_No3
@ HidNpadIdType_No3
Player 3 controller.
Definition: hid.h:217
HidNpadAttribute_IsConnected
@ HidNpadAttribute_IsConnected
IsConnected.
Definition: hid.h:315
HidVibrationDeviceInfo::position
u32 position
HidVibrationDevicePosition
Definition: hid.h:1116
HidDeviceType_Palma
@ HidDeviceType_Palma
[9.0.0+] HidDeviceTypeBits_Palma
Definition: hid.h:427
HidNpadLuciaType
HidNpadLuciaType
NpadLuciaType.
Definition: hid.h:486
HidVibrationGcErmCommand_StopHard
@ HidVibrationGcErmCommand_StopHard
Stops the vibration immediately, with no decay phase.
Definition: hid.h:511
HidDebugPadStateAtomicStorage::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:603
HidMouseState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:674
HidCommonLifoHeader::tail
u64 tail
Tail.
Definition: hid.h:586
HidConsoleSixAxisSensor::verticalization_error
float verticalization_error
VerticalizationError.
Definition: hid.h:1046
HidNpadIdType_No7
@ HidNpadIdType_No7
Player 7 controller.
Definition: hid.h:221
HidNpadGcState::analog_stick_l
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hid.h:776
HidGestureState::type
u32 type
HidGestureType
Definition: hid.h:1006
HidNpadCommonState::attributes
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:762
HidPalmaOperationType_ReadStep
@ HidPalmaOperationType_ReadStep
ReadStep.
Definition: hid.h:518
HidMouseSharedMemoryFormat
HidMouseSharedMemoryFormat.
Definition: hid.h:698
HidNpadInternalState::reserved
u32 reserved
Reserved.
Definition: hid.h:958
HidNpadButton_AnyLeft
@ HidNpadButton_AnyLeft
Bitmask containing all buttons that are considered Left (D-Pad, Sticks)
Definition: hid.h:288
hidStopLrAssignmentMode
Result hidStopLrAssignmentMode(void)
StopLrAssignmentMode.
hidSendKeyboardLockKeyEvent
Result hidSendKeyboardLockKeyEvent(u32 events)
SendKeyboardLockKeyEvent.
HidGestureType
HidGestureType
HidGestureType.
Definition: hid.h:345
HidPalmaOperationType_ReadUniqueCode
@ HidPalmaOperationType_ReadUniqueCode
ReadUniqueCode.
Definition: hid.h:523
hidGetKeyboardStates
size_t hidGetKeyboardStates(HidKeyboardState *states, size_t count)
Gets HidKeyboardState.
HidGesturePoint::y
u32 y
Y.
Definition: hid.h:999
HidNpadLuciaType_U
@ HidNpadLuciaType_U
U.
Definition: hid.h:490
HidNpadLarkState::lark_type_l_and_main
HidNpadLarkType lark_type_l_and_main
HidNpadLarkType LarkTypeLAndMain
Definition: hid.h:793
HidNpadSystemProperties::is_abxy_button_oriented
u64 is_abxy_button_oriented
IsAbxyButtonOriented.
Definition: hid.h:887
HidNpadInternalState::joy_dual_left_six_axis_sensor_lifo
HidNpadSixAxisSensorLifo joy_dual_left_six_axis_sensor_lifo
JoyDualLeftSixAxisSensorLifo.
Definition: hid.h:952
HidDebugPadState::attributes
u32 attributes
Bitfield of HidDebugPadAttribute.
Definition: hid.h:595
HidDebugPadState
HidDebugPadState.
Definition: hid.h:593
HidNpadButton_StickLDown
@ HidNpadButton_StickLDown
Left Stick pseudo-button when moved Down.
Definition: hid.h:275
HidAppletFooterUiType_CompatibleJoyCon
@ HidAppletFooterUiType_CompatibleJoyCon
CompatibleJoyCon.
Definition: hid.h:451
hidResetPalmaStep
Result hidResetPalmaStep(HidPalmaConnectionHandle handle)
ResetPalmaStep.
HidPalmaWaveSet_Large
@ HidPalmaWaveSet_Large
Large.
Definition: hid.h:548
hidIsUsbFullKeyControllerConnected
Result hidIsUsbFullKeyControllerConnected(HidNpadIdType id, bool *out)
IsUsbFullKeyControllerConnected.
HidNpadLarkState::analog_stick_l
HidAnalogStickState analog_stick_l
This is always zero.
Definition: hid.h:790
HidNpadInternalState::joy_right_six_axis_sensor_lifo
HidNpadSixAxisSensorLifo joy_right_six_axis_sensor_lifo
JoyRightSixAxisSensorLifo.
Definition: hid.h:955
HidTouchScreenLifo::header
HidCommonLifoHeader header
HidCommonLifoHeader
Definition: hid.h:652
HidTouchState::diameter_x
u32 diameter_x
DiameterX.
Definition: hid.h:630
HidNpadLuciaState::analog_stick_l
HidAnalogStickState analog_stick_l
This is always zero.
Definition: hid.h:812
HidNpadInterfaceType
HidNpadInterfaceType
NpadInterfaceType (system)
Definition: hid.h:461
HidKeyboardState::modifiers
u64 modifiers
Bitfield of HidKeyboardModifier.
Definition: hid.h:710
hidSetTouchScreenConfiguration
Result hidSetTouchScreenConfiguration(const HidTouchScreenConfigurationForNx *config)
SetTouchScreenConfiguration.
HidDebugPadSharedMemoryFormat
HidDebugPadSharedMemoryFormat.
Definition: hid.h:614
hidGetNpadDeviceType
u32 hidGetNpadDeviceType(HidNpadIdType id)
Gets the DeviceType for the specified Npad.
hidGetTouchScreenStates
size_t hidGetTouchScreenStates(HidTouchScreenState *states, size_t count)
Gets HidTouchScreenState.
HidSevenSixAxisSensorStates
HidSevenSixAxisSensorStates.
Definition: hid.h:1086
hidGetServiceSession
Service * hidGetServiceSession(void)
Gets the Service object for the actual hid service session.
HidMouseState
HidMouseState.
Definition: hid.h:673
hidSetNpadJoyAssignmentModeDual
Result hidSetNpadJoyAssignmentModeDual(HidNpadIdType id)
Use this if you want to use a pair of joy-cons as a single HidNpadIdType_No*.
HidTouchState::x
u32 x
X.
Definition: hid.h:628
HidGestureState::velocity_x
float velocity_x
VelocityX.
Definition: hid.h:1012
HidDebugPadButton_L
@ HidDebugPadButton_L
L button.
Definition: hid.h:22
HidDeviceType_FullKey13
@ HidDeviceType_FullKey13
HidDeviceTypeBits_FullKey
Definition: hid.h:428
HidNpadIdType_No4
@ HidNpadIdType_No4
Player 4 controller.
Definition: hid.h:218
HidNpadCommonState::buttons
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:759
HidPalmaOperationInfo
PalmaOperationInfo.
Definition: hid.h:1133
HidNpadStyleTag_NpadJoyLeft
@ HidNpadStyleTag_NpadJoyLeft
Joy-Con left controller in single mode.
Definition: hid.h:232
HidPalmaFeature_RumbleFeedback
@ HidPalmaFeature_RumbleFeedback
RumbleFeedback.
Definition: hid.h:554
hidGetNpadStatesFullKey
size_t hidGetNpadStatesFullKey(HidNpadIdType id, HidNpadFullKeyState *states, size_t count)
Gets HidNpadFullKeyState.
XcdDeviceHandle
XcdDeviceHandle.
Definition: hid.h:910
HidNpadIdType_No2
@ HidNpadIdType_No2
Player 2 controller.
Definition: hid.h:216
HidNpadButton_Up
@ HidNpadButton_Up
D-Pad Up button.
Definition: hid.h:269
hidSetSevenSixAxisSensorFusionStrength
Result hidSetSevenSixAxisSensorFusionStrength(float strength)
Sets the SevenSixAxisSensor FusionStrength.
hidGetVibrationDeviceInfo
Result hidGetVibrationDeviceInfo(HidVibrationDeviceHandle handle, HidVibrationDeviceInfo *out)
Gets HidVibrationDeviceInfo for the specified device.
hidGetNpadHandheldActivationMode
Result hidGetNpadHandheldActivationMode(HidNpadHandheldActivationMode *out)
Gets the HidNpadHandheldActivationMode.
hidGetAppletFooterUiAttributesSet
u32 hidGetAppletFooterUiAttributesSet(HidNpadIdType id)
Gets the AppletFooterUiAttributesSet for the specified Npad.
HidNpadButton_ZL
@ HidNpadButton_ZL
ZL button.
Definition: hid.h:264
HidDebugPadButton_Select
@ HidDebugPadButton_Select
Select button.
Definition: hid.h:27
HidDeviceType_LarkLeftHVC
@ HidDeviceType_LarkLeftHVC
HidDeviceTypeBits_LarkLeftHVC
Definition: hid.h:423
hidEnableUsbFullKeyController
Result hidEnableUsbFullKeyController(bool flag)
EnableUsbFullKeyController.
HidDirectionState::direction
float direction[3][3]
3x3 matrix
Definition: hid.h:574
HidConsoleSixAxisSensor::is_seven_six_axis_sensor_at_rest
u8 is_seven_six_axis_sensor_at_rest
IsSevenSixAxisSensorAtRest.
Definition: hid.h:1044
HidDeviceType_System21
@ HidDeviceType_System21
HidDeviceTypeBits_System with HidNpadStyleTag |= HidNpadStyleTag_NpadJoyDual.
Definition: hid.h:432
HidPalmaFeature_FrMode
@ HidPalmaFeature_FrMode
FrMode.
Definition: hid.h:553
HidPalmaFrModeType_B01
@ HidPalmaFrModeType_B01
B01.
Definition: hid.h:538
HidAnalogStickState::x
s32 x
X.
Definition: hid.h:561
HidAppletFooterUiType_None
@ HidAppletFooterUiType_None
None.
Definition: hid.h:437
HidNpadCommonStateAtomicStorage
HidNpadCommonStateAtomicStorage.
Definition: hid.h:822
HidGestureType_Tap
@ HidGestureType_Tap
Tap.
Definition: hid.h:351
HidNpadButton_ZR
@ HidNpadButton_ZR
ZR button.
Definition: hid.h:265
HidTouchScreenLifo::storage
HidTouchScreenStateAtomicStorage storage[17]
HidTouchScreenStateAtomicStorage
Definition: hid.h:653
hidAcquirePalmaOperationCompleteEvent
Result hidAcquirePalmaOperationCompleteEvent(HidPalmaConnectionHandle handle, Event *out_event, bool autoclear)
Gets an Event which is signaled when data is available with hidGetPalmaOperationInfo.
HidVibrationDeviceInfo
HidVibrationDeviceInfo.
Definition: hid.h:1114
HidSixAxisSensorState::reserved
u32 reserved
Reserved.
Definition: hid.h:861
HidNpadFullKeyColorState::full_key
HidNpadControllerColor full_key
HidNpadControllerColor FullKey
Definition: hid.h:746
HidPalmaFeature_MuteSwitch
@ HidPalmaFeature_MuteSwitch
MuteSwitch.
Definition: hid.h:556
HidNpadLarkState::attributes
u32 attributes
Bitfield of HidNpadAttribute.
Definition: hid.h:792
HidVibrationDeviceHandle::player_number
u32 player_number
PlayerNumber.
Definition: hid.h:1107
HidPalmaWaveSet_Medium
@ HidPalmaWaveSet_Medium
Medium.
Definition: hid.h:547
HidSixAxisSensorAttribute
HidSixAxisSensorAttribute
HidSixAxisSensorAttribute.
Definition: hid.h:324
HidVector
HidVector.
Definition: hid.h:566
HidNpadLarkType_H2
@ HidNpadLarkType_H2
H2.
Definition: hid.h:480
HidAppletFooterUiType_JoyDualRightOnly
@ HidAppletFooterUiType_JoyDualRightOnly
JoyDualRightOnly.
Definition: hid.h:444
HidConsoleSixAxisSensor
HidConsoleSixAxisSensor.
Definition: hid.h:1042
HidPalmaFeature
HidPalmaFeature
PalmaFeature.
Definition: hid.h:552
HidNpadJoyDeviceType_Left
@ HidNpadJoyDeviceType_Left
Left.
Definition: hid.h:373
HidTouchScreenStateAtomicStorage::state
HidTouchScreenState state
HidTouchScreenState
Definition: hid.h:647
hidSetIsPalmaAllConnectable
Result hidSetIsPalmaAllConnectable(bool flag)
Sets whether any Palma can connect.
hidReadPalmaStep
Result hidReadPalmaStep(HidPalmaConnectionHandle handle)
ReadPalmaStep.
HidNpadInternalState::joy_dual_right_six_axis_sensor_lifo
HidNpadSixAxisSensorLifo joy_dual_right_six_axis_sensor_lifo
JoyDualRightSixAxisSensorLifo.
Definition: hid.h:953
hidGetSensorFusionError
Result hidGetSensorFusionError(float *out)
GetSensorFusionError.
HidKeyboardLockKeyEvent_CapsLockOff
@ HidKeyboardLockKeyEvent_CapsLockOff
CapsLockOff.
Definition: hid.h:206
HidNpadHandheldLarkState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:798
BtdrvAddress
Address.
Definition: btdrv_types.h:161
HidNpadJoyAssignmentMode_Single
@ HidNpadJoyAssignmentMode_Single
Single (Set by hidSetNpadJoyAssignmentModeSingle*())
Definition: hid.h:387
HidDeviceType_LarkRightHVC
@ HidDeviceType_LarkRightHVC
HidDeviceTypeBits_LarkRightHVC
Definition: hid.h:424
HidDebugPadButton_ZR
@ HidDebugPadButton_ZR
ZR button.
Definition: hid.h:25
HidDeviceTypeBits_Palma
@ HidDeviceTypeBits_Palma
Poké Ball Plus controller.
Definition: hid.h:406
BIT
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:54
HidNpadInternalState::joy_assignment_mode
u32 joy_assignment_mode
HidNpadJoyAssignmentMode
Definition: hid.h:938
HidPalmaOperationType_WriteActivityEntry
@ HidPalmaOperationType_WriteActivityEntry
WriteActivityEntry.
Definition: hid.h:525
HidNpadButton_AnyUp
@ HidNpadButton_AnyUp
Bitmask containing all buttons that are considered Up (D-Pad, Sticks)
Definition: hid.h:289
HidMouseState::wheel_delta_y
s32 wheel_delta_y
WheelDeltaY.
Definition: hid.h:680
HidDebugPadButton_Start
@ HidDebugPadButton_Start
Start button.
Definition: hid.h:26
HidNpadGcTriggerState
HidNpadGcTriggerState.
Definition: hid.h:834
Service
Service object structure.
Definition: service.h:13
HidNpadButton_AnySL
@ HidNpadButton_AnySL
Bitmask containing SL buttons on both Joy-Cons (Left/Right)
Definition: hid.h:292
hidEnableUnintendedHomeButtonInputProtection
Result hidEnableUnintendedHomeButtonInputProtection(HidNpadIdType id, bool flag)
EnableUnintendedHomeButtonInputProtection.
HidDeviceType_FullKey15
@ HidDeviceType_FullKey15
HidDeviceTypeBits_FullKey
Definition: hid.h:429
HidNpadButton_StickLRight
@ HidNpadButton_StickLRight
Left Stick pseudo-button when moved Right.
Definition: hid.h:274
HidPalmaOperationInfo::res
Result res
Result.
Definition: hid.h:1135
HidNpadButton_Left
@ HidNpadButton_Left
D-Pad Left button.
Definition: hid.h:268
hidGetPalmaDataBaseIdentificationVersion
Result hidGetPalmaDataBaseIdentificationVersion(HidPalmaConnectionHandle handle)
GetPalmaDataBaseIdentificationVersion.
HidNpadStyleTag_NpadSystemExt
@ HidNpadStyleTag_NpadSystemExt
Generic external controller.
Definition: hid.h:240
HidDeviceTypeBits_SystemExt
@ HidDeviceTypeBits_SystemExt
Generic external controller.
Definition: hid.h:411
hidGetNpadStatesLucia
size_t hidGetNpadStatesLucia(HidNpadIdType id, HidNpadLuciaState *states, size_t count)
Gets HidNpadLuciaState.
HidPalmaFrModeType
HidPalmaFrModeType
PalmaFrModeType.
Definition: hid.h:536
HidGestureDirection_Down
@ HidGestureDirection_Down
Down.
Definition: hid.h:341
HidGyroscopeZeroDriftMode
HidGyroscopeZeroDriftMode
GyroscopeZeroDriftMode.
Definition: hid.h:359
HidPalmaActivityEntry::wave_set
u32 wave_set
HidPalmaWaveSet
Definition: hid.h:1148
HidKeyboardKey
HidKeyboardKey
HidKeyboardKey.
Definition: hid.h:51
HidTouchScreenState
HidTouchScreenState.
Definition: hid.h:637
HidDeviceType_JoyRight1
@ HidDeviceType_JoyRight1
HidDeviceTypeBits_JoyRight
Definition: hid.h:417
HidGestureDirection_None
@ HidGestureDirection_None
None.
Definition: hid.h:337
HidPalmaFeature_Step
@ HidPalmaFeature_Step
Step.
Definition: hid.h:555
hidReadPalmaApplicationSection
Result hidReadPalmaApplicationSection(HidPalmaConnectionHandle handle, s32 inval0, u64 size)
ReadPalmaApplicationSection.
HidDeviceTypeBits_HandheldLeft
@ HidDeviceTypeBits_HandheldLeft
Joy-Con/Famicom/NES left controller in handheld mode.
Definition: hid.h:402
HidNpadControllerColor
Npad colors.
Definition: hid.h:738
HidNpadInternalState
HidNpadInternalState.
Definition: hid.h:936
HidMouseState::y
s32 y
Y.
Definition: hid.h:676
HidVibrationDeviceHandle::npad_style_index
u32 npad_style_index
NpadStyleIndex.
Definition: hid.h:1106
hidIsSixAxisSensorAtRest
Result hidIsSixAxisSensorAtRest(HidSixAxisSensorHandle handle, bool *out)
IsSixAxisSensorAtRest.
HidSharedMemory::console_six_axis_sensor
HidConsoleSixAxisSensor console_six_axis_sensor
[5.0.0+] ConsoleSixAxisSensor
Definition: hid.h:1065
hidInitializeVibrationDevices
Result hidInitializeVibrationDevices(HidVibrationDeviceHandle *handles, s32 total_handles, HidNpadIdType id, HidNpadStyleTag style)
Gets and initializes vibration handles.
HidTouchScreenConfigurationForNx::mode
u8 mode
HidTouchScreenModeForNx
Definition: hid.h:664
HidNpadStyleTag
HidNpadStyleTag
HID controller styles.
Definition: hid.h:228
HidNpadLarkType_H1
@ HidNpadLarkType_H1
H1.
Definition: hid.h:479
HidNpadButton_L
@ HidNpadButton_L
L button.
Definition: hid.h:262
HidNpadLarkState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:788
HidSixAxisSensorAttribute_IsInterpolated
@ HidSixAxisSensorAttribute_IsInterpolated
IsInterpolated.
Definition: hid.h:326
HidGestureState::velocity_y
float velocity_y
VelocityY.
Definition: hid.h:1013
HidKeyboardLockKeyEvent
HidKeyboardLockKeyEvent
KeyboardLockKeyEvent.
Definition: hid.h:201
HidDebugPadState::analog_stick_r
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hid.h:597
HidMouseState::wheel_delta_x
s32 wheel_delta_x
WheelDeltaX.
Definition: hid.h:679
HidNpadHandheldActivationMode_Single
@ HidNpadHandheldActivationMode_Single
Single (1 Joy-Con)
Definition: hid.h:380
HidNpadCommonLifo
HidNpadCommonLifo.
Definition: hid.h:828
hidWritePalmaActivityEntry
Result hidWritePalmaActivityEntry(HidPalmaConnectionHandle handle, u16 unk, const HidPalmaActivityEntry *entry)
WritePalmaActivityEntry.
hidGetSixAxisSensorStates
size_t hidGetSixAxisSensorStates(HidSixAxisSensorHandle handle, HidSixAxisSensorState *states, size_t count)
Gets HidSixAxisSensorState for the specified handle.
HidNpadSixAxisSensorLifo
HidNpadSixAxisSensorLifo.
Definition: hid.h:871
hidGetNpadStatesPalma
size_t hidGetNpadStatesPalma(HidNpadIdType id, HidNpadPalmaState *states, size_t count)
Gets HidNpadPalmaState.
HidNpadInternalState::joy_dual_lifo
HidNpadCommonLifo joy_dual_lifo
JoyDualLifo.
Definition: hid.h:944
HidNpadGcTriggerLifo
HidNpadGcTriggerLifo.
Definition: hid.h:847
HidVibrationDevicePosition_Left
@ HidVibrationDevicePosition_Left
Left.
Definition: hid.h:503
hidGetNpadJoyAssignment
HidNpadJoyAssignmentMode hidGetNpadJoyAssignment(HidNpadIdType id)
Gets the HidNpadJoyAssignmentMode for the specified Npad.
HidNpadSystemProperties::bit7
u64 bit7
Unused.
Definition: hid.h:882
hidGetGyroscopeZeroDriftMode
Result hidGetGyroscopeZeroDriftMode(HidSixAxisSensorHandle handle, HidGyroscopeZeroDriftMode *mode)
Gets the HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle.
HidAppletFooterUiType_HandheldJoyConRightOnly
@ HidAppletFooterUiType_HandheldJoyConRightOnly
HandheldJoyConRightOnly.
Definition: hid.h:440
HidSixAxisSensorHandle::player_number
u32 player_number
PlayerNumber.
Definition: hid.h:1096
HidNpadInternalState::device_type
u32 device_type
Bitfield of HidDeviceTypeBits.
Definition: hid.h:957
hidSetIsPalmaPairedConnectable
Result hidSetIsPalmaPairedConnectable(bool flag)
Sets whether paired Palma can connect.
HidGestureType_Press
@ HidGestureType_Press
Press.
Definition: hid.h:350
HidNpadStyleTag_NpadJoyRight
@ HidNpadStyleTag_NpadJoyRight
Joy-Con right controller in single mode.
Definition: hid.h:233
HidDebugPadButton_Y
@ HidDebugPadButton_Y
Y button.
Definition: hid.h:21
HidDeviceTypeBits_Unknown1
@ HidDeviceTypeBits_Unknown1
Unknown.
Definition: hid.h:401
HidPalmaOperationType_SetUniqueCodeInvalid
@ HidPalmaOperationType_SetUniqueCodeInvalid
SetUniqueCodeInvalid.
Definition: hid.h:524
HidNpadInternalState::style_set
u32 style_set
Bitfield of HidNpadStyleTag.
Definition: hid.h:937
hidSetSupportedNpadStyleSet
Result hidSetSupportedNpadStyleSet(u32 style_set)
Sets which controller styles are supported.
hidGetNpadStatesJoyDual
size_t hidGetNpadStatesJoyDual(HidNpadIdType id, HidNpadJoyDualState *states, size_t count)
Gets HidNpadJoyDualState.
HidPalmaApplicationSectionAccessBuffer::data
u8 data[0x100]
Application data.
Definition: hid.h:1141
HidTouchState::finger_id
u32 finger_id
FingerId.
Definition: hid.h:627
HidTouchState::reserved
u32 reserved
Reserved.
Definition: hid.h:633
hidSetGyroscopeZeroDriftMode
Result hidSetGyroscopeZeroDriftMode(HidSixAxisSensorHandle handle, HidGyroscopeZeroDriftMode mode)
Sets the HidGyroscopeZeroDriftMode for the specified SixAxisSensorHandle.
HidNpadInterfaceType_Unknown4
@ HidNpadInterfaceType_Unknown4
Unknown.
Definition: hid.h:465
HidNfcXcdDeviceHandleStateImplAtomicStorage::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:925
HidNpadButton_Palma
@ HidNpadButton_Palma
Top button on Poké Ball Plus (Palma) controller.
Definition: hid.h:284
HidAppletFooterUiType_JoyDual
@ HidAppletFooterUiType_JoyDual
JoyDual.
Definition: hid.h:442
HidColorAttribute_ReadError
@ HidColorAttribute_ReadError
ReadError.
Definition: hid.h:250
hidGetNpadJoyHoldType
Result hidGetNpadJoyHoldType(HidNpadJoyHoldType *type)
Gets the HidNpadJoyHoldType.
HidNpadCommunicationMode_15ms
@ HidNpadCommunicationMode_15ms
15ms
Definition: hid.h:394
HidNpadGcTriggerState::sampling_number
u64 sampling_number
SamplingNumber.
Definition: hid.h:835
HidVibrationValue::freq_low
float freq_low
Low Band frequency in Hz.
Definition: hid.h:1122
HidKeyboardLifo
HidKeyboardLifo.
Definition: hid.h:721
HidNpadInterfaceType_Rail
@ HidNpadInterfaceType_Rail
Rail.
Definition: hid.h:463
hidGetSharedmemAddr
void * hidGetSharedmemAddr(void)
Gets the address of the SharedMemory.
HidNpadJoyHoldType
HidNpadJoyHoldType
NpadJoyHoldType.
Definition: hid.h:366
hidGetSixAxisSensorFusionParameters
Result hidGetSixAxisSensorFusionParameters(HidSixAxisSensorHandle handle, float *unk0, float *unk1)
GetSixAxisSensorFusionParameters.
HidGestureType_Pinch
@ HidGestureType_Pinch
Pinch.
Definition: hid.h:354
HidVibrationDeviceType_Unknown
@ HidVibrationDeviceType_Unknown
Unknown.
Definition: hid.h:495
HidDeviceType_JoyLeft2
@ HidDeviceType_JoyLeft2
HidDeviceTypeBits_JoyLeft
Definition: hid.h:418
hidWritePalmaApplicationSection
Result hidWritePalmaApplicationSection(HidPalmaConnectionHandle handle, s32 inval0, u64 size, const HidPalmaApplicationSectionAccessBuffer *buf)
WritePalmaApplicationSection.
u16
uint16_t u16
16-bit unsigned integer.
Definition: types.h:20
HidAppletFooterUiType_LarkHvc1
@ HidAppletFooterUiType_LarkHvc1
LarkHvc1.
Definition: hid.h:452
hidSetPalmaDataBaseIdentificationVersion
Result hidSetPalmaDataBaseIdentificationVersion(HidPalmaConnectionHandle handle, s32 version)
SetPalmaDataBaseIdentificationVersion.
HidNpadCommunicationMode_10ms
@ HidNpadCommunicationMode_10ms
10ms
Definition: hid.h:393
HidNpadGcState::buttons
u64 buttons
Bitfield of HidNpadButton.
Definition: hid.h:775
HidNpadCommunicationMode_5ms
@ HidNpadCommunicationMode_5ms
5ms
Definition: hid.h:392
hidStartLrAssignmentMode
Result hidStartLrAssignmentMode(void)
StartLrAssignmentMode.
HidPalmaApplicationSectionAccessBuffer
PalmaApplicationSectionAccessBuffer.
Definition: hid.h:1140
HidGestureState::direction
u32 direction
HidGestureDirection
Definition: hid.h:1007
HidAppletFooterUiType_HandheldNone
@ HidAppletFooterUiType_HandheldNone
HandheldNone.
Definition: hid.h:438
HidGestureAttribute_IsDoubleTap
@ HidGestureAttribute_IsDoubleTap
IsDoubleTap.
Definition: hid.h:332
HidDeviceTypeBits_LarkLeftNES
@ HidDeviceTypeBits_LarkLeftNES
NES left controller.
Definition: hid.h:409
hidGetAppletFooterUiTypes
HidAppletFooterUiType hidGetAppletFooterUiTypes(HidNpadIdType id)
Gets HidAppletFooterUiType for the specified Npad.
hidGetNpadOfHighestBatteryLevel
Result hidGetNpadOfHighestBatteryLevel(const HidNpadIdType *ids, size_t count, HidNpadIdType *out)
GetNpadOfHighestBatteryLevel.
HidCommonLifoHeader::buffer_count
u64 buffer_count
BufferCount.
Definition: hid.h:585
HidMouseLifo
HidMouseLifo.
Definition: hid.h:692
HidPowerInfo::is_powered
bool is_powered
IsPowered.
Definition: hid.h:903
HidSixAxisSensorState::direction
HidDirectionState direction
Direction.
Definition: hid.h:859
HidSharedMemory::unique_pad
u8 unique_pad[0x4000]
[1.0.0-4.1.0] UniquePad
Definition: hid.h:1062
HidNpadGcTriggerStateAtomicStorage
HidNpadGcTriggerStateAtomicStorage.
Definition: hid.h:841
HidAppletFooterUiType
HidAppletFooterUiType
AppletFooterUiType (system)
Definition: hid.h:436
HidMouseAttribute_Transferable
@ HidMouseAttribute_Transferable
Transferable.
Definition: hid.h:309
HidKeyboardModifier
HidKeyboardModifier
HidKeyboardModifier.
Definition: hid.h:187
HidNpadIdType_No8
@ HidNpadIdType_No8
Player 8 controller.
Definition: hid.h:222
HidTouchState::attributes
u32 attributes
Bitfield of HidTouchAttribute.
Definition: hid.h:626
hidGetActualVibrationValue
Result hidGetActualVibrationValue(HidVibrationDeviceHandle handle, HidVibrationValue *out)
Gets the current HidVibrationValue for the specified device.
HidSharedMemory
HidSharedMemory.
Definition: hid.h:1052
HidMouseAttribute_IsConnected
@ HidMouseAttribute_IsConnected
IsConnected.
Definition: hid.h:310