libnx  v4.2.0
hidsys.h
Go to the documentation of this file.
1 /**
2  * @file hidsys.h
3  * @brief hid:sys service IPC wrapper.
4  * @author exelix, yellows8
5  */
6 #pragma once
7 #include "../types.h"
8 #include "../kernel/event.h"
9 #include "../services/hid.h"
10 #include "../services/btdrv_types.h"
11 #include "../sf/service.h"
12 
13 /// Selects what button to map to.
14 typedef enum {
19  HidcfgDigitalButtonAssignment_StickL = 4, ///< Left Stick Button
20  HidcfgDigitalButtonAssignment_StickR = 5, ///< Right Stick Button
25  HidcfgDigitalButtonAssignment_Select = 10, ///< Select / Minus
26  HidcfgDigitalButtonAssignment_Start = 11, ///< Start / Plus
31  HidcfgDigitalButtonAssignment_LeftSL = 16, ///< SL on Left controller.
32  HidcfgDigitalButtonAssignment_LeftSR = 17, ///< SR on Left controller.
33  HidcfgDigitalButtonAssignment_RightSL = 18, ///< SL on Right controller.
34  HidcfgDigitalButtonAssignment_RightSR = 19, ///< SR on Right controller.
37  HidcfgDigitalButtonAssignment_Invalid = 22, ///< Invalid / Disabled
39 
40 /// AnalogStickRotation
41 typedef enum {
46 
47 /// UniquePadId for a controller.
48 typedef struct {
49  u64 id; ///< UniquePadId
51 
52 /// UniquePadSerialNumber
53 typedef struct {
54  char serial_number[0x10]; ///< SerialNumber
56 
57 /// Mini Cycle struct for \ref HidsysNotificationLedPattern.
58 typedef struct {
59  u8 ledIntensity; ///< Mini Cycle X LED Intensity.
60  u8 transitionSteps; ///< Fading Transition Steps to Mini Cycle X (Uses PWM). Value 0x0: Instant. Each step duration is based on HidsysNotificationLedPattern::baseMiniCycleDuration.
61  u8 finalStepDuration; ///< Final Step Duration Multiplier of Mini Cycle X. Value 0x0: 12.5ms, 0x1 - xF: 1x - 15x. Value is a Multiplier of HidsysNotificationLedPattern::baseMiniCycleDuration.
62  u8 pad;
64 
65 /// Structure for \ref hidsysSetNotificationLedPattern.
66 /// See also: https://switchbrew.org/wiki/HID_services#NotificationLedPattern
67 /// Only the low 4bits of each used byte in this struct is used.
68 typedef struct {
69  u8 baseMiniCycleDuration; ///< Mini Cycle Base Duration. Value 0x1-0xF: 12.5ms - 187.5ms. Value 0x0 = 0ms/OFF.
70  u8 totalMiniCycles; ///< Number of Mini Cycles + 1. Value 0x0-0xF: 1 - 16 mini cycles.
71  u8 totalFullCycles; ///< Number of Full Cycles. Value 0x1-0xF: 1 - 15 full cycles. Value 0x0 is repeat forever, but if baseMiniCycleDuration is set to 0x0, it does the 1st Mini Cycle with a 12.5ms step duration and then the LED stays on with startIntensity.
72  u8 startIntensity; ///< LED Start Intensity. Value 0x0=0% - 0xF=100%.
73 
74  HidsysNotificationLedPatternCycle miniCycles[16]; ///< Mini Cycles
75 
76  u8 unk_x44[0x2]; ///< Unknown
77  u8 pad_x46[0x2]; ///< Padding
79 
80 /// ButtonConfigEmbedded
81 typedef struct {
82  u8 unk_x0[0x2C8];
84 
85 /// ButtonConfigFull
86 typedef struct {
87  u8 unk_x0[0x2C8];
89 
90 /// ButtonConfigLeft
91 typedef struct {
92  u8 unk_x0[0x1C8];
94 
95 /// ButtonConfigRight
96 typedef struct {
97  u8 unk_x0[0x1A0];
99 
100 /// AnalogStickAssignment
101 typedef struct {
102  u32 rotation; ///< \ref HidcfgAnalogStickRotation
103  u8 is_paired_stick_assigned; ///< IsPairedStickAssigned
104  u8 reserved[3]; ///< Reserved
106 
107 /// ButtonConfigEmbedded
108 typedef struct {
109  u32 hardware_button_left; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonLeft
110  u32 hardware_button_up; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonUp
111  u32 hardware_button_right; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonRight
112  u32 hardware_button_down; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonDown
113  u32 hardware_button_a; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonA
114  u32 hardware_button_b; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonB
115  u32 hardware_button_x; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonX
116  u32 hardware_button_y; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonY
117  u32 hardware_button_stick_l; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonStickL
118  u32 hardware_button_stick_r; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonStickR
119  u32 hardware_button_l; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonL
120  u32 hardware_button_r; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonR
121  u32 hardware_button_zl; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonZL
122  u32 hardware_button_zr; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonZR
123  u32 hardware_button_select; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonSelect
124  u32 hardware_button_start; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonStart
125  u32 hardware_button_capture; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonCapture
129 
130 /// ButtonConfigFull
131 typedef struct {
132  u32 hardware_button_left; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonLeft
133  u32 hardware_button_up; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonUp
134  u32 hardware_button_right; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonRight
135  u32 hardware_button_down; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonDown
136  u32 hardware_button_a; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonA
137  u32 hardware_button_b; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonB
138  u32 hardware_button_x; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonX
139  u32 hardware_button_y; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonY
140  u32 hardware_button_stick_l; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonStickL
141  u32 hardware_button_stick_r; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonStickR
142  u32 hardware_button_l; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonL
143  u32 hardware_button_r; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonR
144  u32 hardware_button_zl; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonZL
145  u32 hardware_button_zr; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonZR
146  u32 hardware_button_select; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonSelect
147  u32 hardware_button_start; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonStart
148  u32 hardware_button_capture; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonCapture
152 
153 /// ButtonConfigLeft
154 typedef struct {
155  u32 hardware_button_left; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonLeft
156  u32 hardware_button_up; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonUp
157  u32 hardware_button_right; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonRight
158  u32 hardware_button_down; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonDown
159  u32 hardware_button_stick_l; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonStickL
160  u32 hardware_button_l; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonL
161  u32 hardware_button_zl; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonZL
162  u32 hardware_button_select; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonSelect
163  u32 hardware_button_left_sl; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonLeftSL
164  u32 hardware_button_left_sr; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonLeftSR
165  u32 hardware_button_capture; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonCapture
168 
169 /// ButtonConfigRight
170 typedef struct {
171  u32 hardware_button_a; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonA
172  u32 hardware_button_b; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonB
173  u32 hardware_button_x; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonX
174  u32 hardware_button_y; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonY
175  u32 hardware_button_stick_r; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonStickR
176  u32 hardware_button_r; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonR
177  u32 hardware_button_zr; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonZR
178  u32 hardware_button_start; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonStart
179  u32 hardware_button_right_sl; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonRightSL
180  u32 hardware_button_right_sr; ///< \ref HidcfgDigitalButtonAssignment HardwareButtonRightSR
183 
184 /// StorageName
185 typedef struct {
186  u8 name[0x81]; ///< UTF-8 NUL-terminated name string.
188 
189 /// Initialize hidsys.
191 
192 /// Exit hidsys.
193 void hidsysExit(void);
194 
195 /// Gets the Service object for the actual hidsys service session.
197 
198 /**
199  * @brief SendKeyboardLockKeyEvent
200  * @param[in] events Bitfield of \ref HidKeyboardLockKeyEvent.
201  */
203 
204 /**
205  * @brief Gets an Event which is signaled when HidHomeButtonState is updated.
206  * @note The Event must be closed by the user once finished with it.
207  * @note This generally shouldn't be used, since AM-sysmodule uses it internally.
208  * @param[out] out_event Output Event.
209  * @param[in] Event autoclear.
210 **/
211 Result hidsysAcquireHomeButtonEventHandle(Event* out_event, bool autoclear);
212 
213 /**
214  * @brief Activates the HomeButton sharedmem.
215  * @note This generally shouldn't be used, since AM-sysmodule uses it internally.
216 **/
218 
219 /**
220  * @brief Gets an Event which is signaled when HidSleepButtonState is updated.
221  * @note The Event must be closed by the user once finished with it.
222  * @note This generally shouldn't be used, since AM-sysmodule uses it internally.
223  * @param[out] out_event Output Event.
224  * @param[in] Event autoclear.
225 **/
226 Result hidsysAcquireSleepButtonEventHandle(Event* out_event, bool autoclear);
227 
228 /**
229  * @brief Activates the SleepButton sharedmem.
230  * @note This generally shouldn't be used, since AM-sysmodule uses it internally.
231 **/
233 
234 /**
235  * @brief Gets an Event which is signaled when HidCaptureButtonState is updated.
236  * @note The Event must be closed by the user once finished with it.
237  * @note This generally shouldn't be used, since AM-sysmodule uses it internally.
238  * @param[out] out_event Output Event.
239  * @param[in] Event autoclear.
240 **/
241 Result hidsysAcquireCaptureButtonEventHandle(Event* out_event, bool autoclear);
242 
243 /**
244  * @brief Activates the CaptureButton sharedmem.
245  * @note This generally shouldn't be used, since AM-sysmodule uses it internally.
246 **/
248 
249 /**
250  * @brief Gets the SupportedNpadStyleSet for the CallerApplet. applet must be initialized in order to use this (uses \ref appletGetAppletResourceUserIdOfCallerApplet).
251  * @note Only available on [6.0.0+].
252  * @param[out] out Bitmask of \ref HidNpadStyleTag.
253  */
255 
256 /**
257  * @brief Gets the \ref HidNpadInterfaceType for the specified controller.
258  * @note Only available on [10.0.0+].
259  * @param[in] id \ref HidNpadIdType
260  * @param[out] out \ref HidNpadInterfaceType
261  */
263 
264 /**
265  * @brief GetNpadLeftRightInterfaceType
266  * @note Only available on [10.0.0+].
267  * @param[in] id \ref HidNpadIdType
268  * @param[out] out0 \ref HidNpadInterfaceType
269  * @param[out] out1 \ref HidNpadInterfaceType
270  */
272 
273 /**
274  * @brief HasBattery
275  * @note Only available on [10.0.0+].
276  * @param[in] id \ref HidNpadIdType
277  * @param[out] out Output flag.
278  */
279 Result hidsysHasBattery(HidNpadIdType id, bool *out);
280 
281 /**
282  * @brief HasLeftRightBattery
283  * @note Only available on [10.0.0+].
284  * @param[in] id \ref HidNpadIdType
285  * @param[out] out0 Output flag.
286  * @param[out] out1 Output flag.
287  */
288 Result hidsysHasLeftRightBattery(HidNpadIdType id, bool *out0, bool *out1);
289 
290 /**
291  * @brief Gets the UniquePadIds for the specified controller.
292  * @note Only available on [3.0.0+].
293  * @param[in] id \ref HidNpadIdType
294  * @param[out] unique_pad_ids Output array of \ref HidsysUniquePadId.
295  * @param[in] count Max number of entries for the unique_pad_ids array.
296  * @param[out] total_out Total output array entries. Optional, can be NULL.
297  */
298 Result hidsysGetUniquePadsFromNpad(HidNpadIdType id, HidsysUniquePadId *unique_pad_ids, s32 count, s32 *total_out);
299 
300 /**
301  * @brief EnableAppletToGetInput
302  * @param[in] enable Input flag.
303 **/
305 
306 /**
307  * @brief Gets a list of all UniquePadIds.
308  * @param[out] unique_pad_ids Output array of \ref HidsysUniquePadId.
309  * @param[in] count Max number of entries for the unique_pad_ids array.
310  * @param[out] total_out Total output array entries. Optional, can be NULL.
311  */
312 Result hidsysGetUniquePadIds(HidsysUniquePadId *unique_pad_ids, s32 count, s32 *total_out);
313 
314 /**
315  * @brief Gets the \ref HidsysUniquePadSerialNumber.
316  * @note Only available on [5.0.0+].
317  * @param[in] unique_pad_id \ref HidsysUniquePadId
318  * @param[out] serial \ref HidsysUniquePadSerialNumber
319  */
321 
322 /**
323  * @brief Sets the HOME-button notification LED pattern, for the specified controller.
324  * @note Generally this should only be used if \ref hidsysSetNotificationLedPatternWithTimeout is not usable.
325  * @note Only available on [7.0.0+].
326  * @param[in] pattern \ref HidsysNotificationLedPattern
327  * @param[in] unique_pad_id \ref HidsysUniquePadId
328  */
330 
331 /**
332  * @brief Sets the HOME-button notification LED pattern, for the specified controller. The LED will automatically be disabled once the specified timeout occurs.
333  * @note Only available on [9.0.0+], and with controllers which have the [9.0.0+] firmware installed.
334  * @param[in] pattern \ref HidsysNotificationLedPattern
335  * @param[in] unique_pad_id \ref HidsysUniquePadId
336  * @param[in] timeout Timeout in nanoseconds.
337  */
339 
340 /**
341  * @brief IsUsbFullKeyControllerEnabled
342  * @note Only available on [3.0.0+].
343  * @param[out] out Output flag.
344  */
346 
347 /**
348  * @brief EnableUsbFullKeyController
349  * @note Only available on [3.0.0+].
350  * @param[in] flag Flag
351  */
353 
354 /**
355  * @brief IsUsbConnected
356  * @note Only available on [3.0.0+].
357  * @param[in] unique_pad_id \ref HidsysUniquePadId
358  * @param[out] out Output flag.
359  */
360 Result hidsysIsUsbConnected(HidsysUniquePadId unique_pad_id, bool *out);
361 
362 /**
363  * @brief IsFirmwareUpdateNeededForNotification
364  * @note Only available on [9.0.0+].
365  * @param[in] unique_pad_id \ref HidsysUniquePadId
366  * @param[out] out Output flag.
367  */
369 
370 /**
371  * @brief Legacy IsButtonConfigSupported.
372  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysIsButtonConfigSupported instead.
373  * @param[in] unique_pad_id \ref HidsysUniquePadId
374  * @param[out] out Output bool flag.
375  */
377 
378 /**
379  * @brief IsButtonConfigSupported
380  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacyIsButtonConfigSupported instead.
381  * @param[in] addr \ref BtdrvAddress
382  * @param[out] out Output bool flag.
383  */
385 
386 /**
387  * @brief IsButtonConfigEmbeddedSupported
388  * @note Only available on [11.0.0+].
389  * @param[out] out Output bool flag.
390  */
392 
393 /**
394  * @brief Legacy DeleteButtonConfig.
395  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysDeleteButtonConfig instead.
396  * @param[in] unique_pad_id \ref HidsysUniquePadId
397  */
399 
400 /**
401  * @brief DeleteButtonConfig
402  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacyDeleteButtonConfig instead.
403  * @param[in] addr \ref BtdrvAddress
404  */
406 
407 /**
408  * @brief DeleteButtonConfigEmbedded
409  * @note Only available on [11.0.0+].
410  */
412 
413 /**
414  * @brief Legacy SetButtonConfigEnabled.
415  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysSetButtonConfigEnabled instead.
416  * @param[in] unique_pad_id \ref HidsysUniquePadId
417  * @param[in] flag Input flag.
418  */
420 
421 /**
422  * @brief SetButtonConfigEnabled
423  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacySetButtonConfigEnabled instead.
424  * @param[in] addr \ref BtdrvAddress
425  * @param[in] flag Input flag.
426  */
428 
429 /**
430  * @brief SetButtonConfigEmbeddedEnabled
431  * @note Only available on [11.0.0+].
432  * @param[in] flag Input flag.
433  */
435 
436 /**
437  * @brief Legacy IsButtonConfigEnabled.
438  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysIsButtonConfigEnabled instead.
439  * @param[in] unique_pad_id \ref HidsysUniquePadId
440  * @param[out] out Output bool flag.
441  */
443 
444 /**
445  * @brief IsButtonConfigEnabled
446  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacyIsButtonConfigEnabled instead.
447  * @param[in] addr \ref BtdrvAddress
448  * @param[in] out Output bool flag.
449  */
451 
452 /**
453  * @brief IsButtonConfigEmbeddedEnabled
454  * @note Only available on [11.0.0+].
455  * @param[out] out Output bool flag.
456  */
458 
459 /**
460  * @brief Legacy SetButtonConfigEmbedded.
461  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysSetButtonConfigEmbedded instead.
462  * @param[in] unique_pad_id \ref HidsysUniquePadId
463  * @param[in] config \ref HidsysButtonConfigEmbedded
464  */
466 
467 /**
468  * @brief SetButtonConfigEmbedded
469  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacySetButtonConfigEmbedded instead.
470  * @param[in] config \ref HidsysButtonConfigEmbedded
471  */
473 
474 /**
475  * @brief Legacy SetButtonConfigFull.
476  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysSetButtonConfigFull instead.
477  * @param[in] unique_pad_id \ref HidsysUniquePadId
478  * @param[in] config \ref HidsysButtonConfigFull
479  */
481 
482 /**
483  * @brief SetButtonConfigFull
484  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacySetButtonConfigFull instead.
485  * @param[in] addr \ref BtdrvAddress
486  * @param[in] config \ref HidsysButtonConfigFull
487  */
489 
490 /**
491  * @brief Legacy SetButtonConfigLeft.
492  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysSetButtonConfigLeft instead.
493  * @param[in] unique_pad_id \ref HidsysUniquePadId
494  * @param[in] config \ref HidsysButtonConfigLeft
495  */
497 
498 /**
499  * @brief SetButtonConfigLeft
500  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacySetButtonConfigLeft instead.
501  * @param[in] addr \ref BtdrvAddress
502  * @param[in] config \ref HidsysButtonConfigLeft
503  */
505 
506 /**
507  * @brief Legacy SetButtonConfigRight.
508  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysSetButtonConfigRight instead.
509  * @param[in] unique_pad_id \ref HidsysUniquePadId
510  * @param[in] config \ref HidsysButtonConfigRight
511  */
513 
514 /**
515  * @brief SetButtonConfigRight
516  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacySetButtonConfigRight instead.
517  * @param[in] addr \ref BtdrvAddress
518  * @param[in] config \ref HidsysButtonConfigRight
519  */
521 
522 /**
523  * @brief Legacy GetButtonConfigEmbedded.
524  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysGetButtonConfigEmbedded instead.
525  * @param[in] unique_pad_id \ref HidsysUniquePadId
526  * @param[out] config \ref HidsysButtonConfigEmbedded
527  */
529 
530 /**
531  * @brief GetButtonConfigEmbedded
532  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacyGetButtonConfigEmbedded instead.
533  * @param[out] config \ref HidsysButtonConfigEmbedded
534  */
536 
537 /**
538  * @brief Legacy GetButtonConfigFull.
539  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysGetButtonConfigFull instead.
540  * @param[in] unique_pad_id \ref HidsysUniquePadId
541  * @param[out] config \ref HidsysButtonConfigFull
542  */
544 
545 /**
546  * @brief GetButtonConfigFull
547  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacyGetButtonConfigFull instead.
548  * @param[in] addr \ref BtdrvAddress
549  * @param[out] config \ref HidsysButtonConfigFull
550  */
552 
553 /**
554  * @brief Legacy GetButtonConfigLeft.
555  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysGetButtonConfigLeft instead.
556  * @param[in] unique_pad_id \ref HidsysUniquePadId
557  * @param[out] config \ref HidsysButtonConfigLeft
558  */
560 
561 /**
562  * @brief GetButtonConfigLeft
563  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacyGetButtonConfigLeft instead.
564  * @param[in] addr \ref BtdrvAddress
565  * @param[out] config \ref HidsysButtonConfigLeft
566  */
568 
569 /**
570  * @brief Legacy GetButtonConfigRight.
571  * @note Only available on [10.0.0-10.2.0]. On [11.0.0+], use \ref hidsysGetButtonConfigRight instead.
572  * @param[in] unique_pad_id \ref HidsysUniquePadId
573  * @param[out] config \ref HidsysButtonConfigRight
574  */
576 
577 /**
578  * @brief GetButtonConfigRight
579  * @note Only available on [11.0.0+]. On [10.0.0-10.2.0], use \ref hidsysLegacyGetButtonConfigRight instead.
580  * @param[in] addr \ref BtdrvAddress
581  * @param[out] config \ref HidsysButtonConfigRight
582  */
584 
585 /**
586  * @brief IsCustomButtonConfigSupported
587  * @note Only available on [10.0.0+].
588  * @param[in] unique_pad_id \ref HidsysUniquePadId
589  * @param[out] out Output bool flag.
590  */
592 
593 /**
594  * @brief IsDefaultButtonConfigEmbedded
595  * @note Only available on [10.0.0+].
596  * @param[in] config \ref HidcfgButtonConfigEmbedded
597  * @param[out] out Output bool flag.
598  */
600 
601 /**
602  * @brief IsDefaultButtonConfigFull
603  * @note Only available on [10.0.0+].
604  * @param[in] config \ref HidcfgButtonConfigFull
605  * @param[out] out Output bool flag.
606  */
608 
609 /**
610  * @brief IsDefaultButtonConfigLeft
611  * @note Only available on [10.0.0+].
612  * @param[in] config \ref HidcfgButtonConfigLeft
613  * @param[out] out Output bool flag.
614  */
616 
617 /**
618  * @brief IsDefaultButtonConfigRight
619  * @note Only available on [10.0.0+].
620  * @param[in] config \ref HidcfgButtonConfigRight
621  * @param[out] out Output bool flag.
622  */
624 
625 /**
626  * @brief IsButtonConfigStorageEmbeddedEmpty
627  * @note Only available on [10.0.0+].
628  * @param[in] index Array index, should be 0-4.
629  * @param[out] out Output bool flag.
630  */
632 
633 /**
634  * @brief IsButtonConfigStorageFullEmpty
635  * @note Only available on [10.0.0+].
636  * @param[in] index Array index, should be 0-4.
637  * @param[out] out Output bool flag.
638  */
640 
641 /**
642  * @brief IsButtonConfigStorageLeftEmpty
643  * @note Only available on [10.0.0+].
644  * @param[in] index Array index, should be 0-4.
645  * @param[out] out Output bool flag.
646  */
648 
649 /**
650  * @brief IsButtonConfigStorageRightEmpty
651  * @note Only available on [10.0.0+].
652  * @param[in] index Array index, should be 0-4.
653  * @param[out] out Output bool flag.
654  */
656 
657 /**
658  * @brief GetButtonConfigStorageEmbeddedDeprecated
659  * @note Only available on [10.0.0-12.1.0].
660  * @param[in] index Array index, should be 0-4.
661  * @param[out] config \ref HidcfgButtonConfigEmbedded
662  */
664 
665 /**
666  * @brief GetButtonConfigStorageFullDeprecated
667  * @note Only available on [10.0.0-12.1.0].
668  * @param[in] index Array index, should be 0-4.
669  * @param[out] config \ref HidcfgButtonConfigFull
670  */
672 
673 /**
674  * @brief GetButtonConfigStorageLeftDeprecated
675  * @note Only available on [10.0.0-12.1.0].
676  * @param[in] index Array index, should be 0-4.
677  * @param[out] config \ref HidcfgButtonConfigLeft
678  */
680 
681 /**
682  * @brief GetButtonConfigStorageRightDeprecated
683  * @note Only available on [10.0.0-12.1.0].
684  * @param[in] index Array index, should be 0-4.
685  * @param[out] config \ref HidcfgButtonConfigRight
686  */
688 
689 /**
690  * @brief SetButtonConfigStorageEmbeddedDeprecated
691  * @note Only available on [10.0.0-12.1.0].
692  * @param[in] index Array index, should be 0-4.
693  * @param[in] config \ref HidcfgButtonConfigEmbedded
694  */
696 
697 /**
698  * @brief SetButtonConfigStorageFullDeprecated
699  * @note Only available on [10.0.0-12.1.0].
700  * @param[in] index Array index, should be 0-4.
701  * @param[in] config \ref HidcfgButtonConfigFull
702  */
704 
705 /**
706  * @brief SetButtonConfigStorageLeftDeprecated
707  * @note Only available on [10.0.0-12.1.0].
708  * @param[in] index Array index, should be 0-4.
709  * @param[in] config \ref HidcfgButtonConfigLeft
710  */
712 
713 /**
714  * @brief SetButtonConfigStorageRightDeprecated
715  * @note Only available on [10.0.0-12.1.0].
716  * @param[in] index Array index, should be 0-4.
717  * @param[in] config \ref HidcfgButtonConfigRight
718  */
720 
721 /**
722  * @brief DeleteButtonConfigStorageEmbedded
723  * @note Only available on [10.0.0+].
724  * @param[in] index Array index, should be 0-4.
725  */
727 
728 /**
729  * @brief DeleteButtonConfigStorageFull
730  * @note Only available on [10.0.0+].
731  * @param[in] index Array index, should be 0-4.
732  */
734 
735 /**
736  * @brief DeleteButtonConfigStorageLeft
737  * @note Only available on [10.0.0+].
738  * @param[in] index Array index, should be 0-4.
739  */
741 
742 /**
743  * @brief DeleteButtonConfigStorageRight
744  * @note Only available on [10.0.0+].
745  * @param[in] index Array index, should be 0-4.
746  */
748 
749 /**
750  * @brief IsUsingCustomButtonConfig
751  * @note Only available on [10.0.0+].
752  * @param[in] unique_pad_id \ref HidsysUniquePadId
753  * @param[out] out Output bool flag.
754  */
756 
757 /**
758  * @brief IsAnyCustomButtonConfigEnabled
759  * @note Only available on [10.0.0+].
760  * @param[out] out Output bool flag.
761  */
763 
764 /**
765  * @brief SetAllCustomButtonConfigEnabled
766  * @note Only available on [10.0.0+].
767  * @param[in] AppletResourceUserId AppletResourceUserId
768  * @param[in] flag Input bool flag.
769  */
770 Result hidsysSetAllCustomButtonConfigEnabled(u64 AppletResourceUserId, bool flag);
771 
772 /**
773  * @brief SetAllDefaultButtonConfig
774  * @note Only available on [10.0.0+].
775  */
777 
778 /**
779  * @brief SetHidButtonConfigEmbedded
780  * @note Only available on [10.0.0+].
781  * @param[in] unique_pad_id \ref HidsysUniquePadId
782  * @param[in] config \ref HidcfgButtonConfigEmbedded
783  */
785 
786 /**
787  * @brief SetHidButtonConfigFull
788  * @note Only available on [10.0.0+].
789  * @param[in] unique_pad_id \ref HidsysUniquePadId
790  * @param[in] config \ref HidcfgButtonConfigFull
791  */
793 
794 /**
795  * @brief SetHidButtonConfigLeft
796  * @note Only available on [10.0.0+].
797  * @param[in] unique_pad_id \ref HidsysUniquePadId
798  * @param[in] config \ref HidcfgButtonConfigLeft
799  */
801 
802 /**
803  * @brief SetHidButtonConfigRight
804  * @note Only available on [10.0.0+].
805  * @param[in] unique_pad_id \ref HidsysUniquePadId
806  * @param[in] config \ref HidcfgButtonConfigRight
807  */
809 
810 /**
811  * @brief GetHidButtonConfigEmbedded
812  * @note Only available on [10.0.0+].
813  * @param[in] unique_pad_id \ref HidsysUniquePadId
814  * @param[out] config \ref HidcfgButtonConfigEmbedded
815  */
817 
818 /**
819  * @brief GetHidButtonConfigFull
820  * @note Only available on [10.0.0+].
821  * @param[in] unique_pad_id \ref HidsysUniquePadId
822  * @param[out] config \ref HidcfgButtonConfigFull
823  */
825 
826 /**
827  * @brief GetHidButtonConfigLeft
828  * @note Only available on [10.0.0+].
829  * @param[in] unique_pad_id \ref HidsysUniquePadId
830  * @param[out] config \ref HidcfgButtonConfigLeft
831  */
833 
834 /**
835  * @brief GetHidButtonConfigRight
836  * @note Only available on [10.0.0+].
837  * @param[in] unique_pad_id \ref HidsysUniquePadId
838  * @param[out] config \ref HidcfgButtonConfigRight
839  */
841 
842 /**
843  * @brief GetButtonConfigStorageEmbedded
844  * @note Only available on [11.0.0+].
845  * @param[in] index Array index, should be 0-4.
846  * @param[out] config \ref HidcfgButtonConfigEmbedded
847  * @param[out] name \ref HidcfgStorageName
848  */
850 
851 /**
852  * @brief GetButtonConfigStorageFull
853  * @note Only available on [11.0.0+].
854  * @param[in] index Array index, should be 0-4.
855  * @param[out] config \ref HidcfgButtonConfigFull
856  * @param[out] name \ref HidcfgStorageName
857  */
859 
860 /**
861  * @brief GetButtonConfigStorageLeft
862  * @note Only available on [11.0.0+].
863  * @param[in] index Array index, should be 0-4.
864  * @param[out] config \ref HidcfgButtonConfigLeft
865  * @param[out] name \ref HidcfgStorageName
866  */
868 
869 /**
870  * @brief GetButtonConfigStorageRight
871  * @note Only available on [11.0.0+].
872  * @param[in] index Array index, should be 0-4.
873  * @param[out] config \ref HidcfgButtonConfigRight
874  * @param[out] name \ref HidcfgStorageName
875  */
877 
878 /**
879  * @brief SetButtonConfigStorageEmbedded
880  * @note Only available on [11.0.0+].
881  * @param[in] index Array index, should be 0-4.
882  * @param[in] config \ref HidcfgButtonConfigEmbedded
883  * @param[in] name \ref HidcfgStorageName
884  */
886 
887 /**
888  * @brief SetButtonConfigStorageFull
889  * @note Only available on [11.0.0+].
890  * @param[in] index Array index, should be 0-4.
891  * @param[in] config \ref HidcfgButtonConfigFull
892  * @param[in] name \ref HidcfgStorageName
893  */
895 
896 /**
897  * @brief SetButtonConfigStorageLeft
898  * @note Only available on [11.0.0+].
899  * @param[in] index Array index, should be 0-4.
900  * @param[in] config \ref HidcfgButtonConfigLeft
901  * @param[in] name \ref HidcfgStorageName
902  */
904 
905 /**
906  * @brief SetButtonConfigStorageRight
907  * @note Only available on [11.0.0+].
908  * @param[in] index Array index, should be 0-4.
909  * @param[in] config \ref HidcfgButtonConfigRight
910  * @param[in] name \ref HidcfgStorageName
911  */
913 
HidcfgDigitalButtonAssignment_ZR
@ HidcfgDigitalButtonAssignment_ZR
ZR.
Definition: hidsys.h:24
HidcfgButtonConfigFull::hardware_button_stick_r
u32 hardware_button_stick_r
HidcfgDigitalButtonAssignment HardwareButtonStickR
Definition: hidsys.h:141
HidcfgStorageName
StorageName.
Definition: hidsys.h:185
HidcfgButtonConfigLeft::hardware_button_up
u32 hardware_button_up
HidcfgDigitalButtonAssignment HardwareButtonUp
Definition: hidsys.h:156
HidcfgAnalogStickAssignment::rotation
u32 rotation
HidcfgAnalogStickRotation
Definition: hidsys.h:102
hidsysLegacyGetButtonConfigFull
Result hidsysLegacyGetButtonConfigFull(HidsysUniquePadId unique_pad_id, HidsysButtonConfigFull *config)
Legacy GetButtonConfigFull.
HidcfgDigitalButtonAssignment_StickL
@ HidcfgDigitalButtonAssignment_StickL
Left Stick Button.
Definition: hidsys.h:19
hidsysGetSupportedNpadStyleSetOfCallerApplet
Result hidsysGetSupportedNpadStyleSetOfCallerApplet(u32 *out)
Gets the SupportedNpadStyleSet for the CallerApplet.
HidcfgDigitalButtonAssignment_RightSL
@ HidcfgDigitalButtonAssignment_RightSL
SL on Right controller.
Definition: hidsys.h:33
hidsysIsButtonConfigEmbeddedEnabled
Result hidsysIsButtonConfigEmbeddedEnabled(bool *out)
IsButtonConfigEmbeddedEnabled.
hidsysSetButtonConfigEmbeddedEnabled
Result hidsysSetButtonConfigEmbeddedEnabled(bool flag)
SetButtonConfigEmbeddedEnabled.
HidcfgButtonConfigRight::hardware_button_x
u32 hardware_button_x
HidcfgDigitalButtonAssignment HardwareButtonX
Definition: hidsys.h:173
HidcfgButtonConfigRight::hardware_button_a
u32 hardware_button_a
HidcfgDigitalButtonAssignment HardwareButtonA
Definition: hidsys.h:171
hidsysLegacySetButtonConfigEmbedded
Result hidsysLegacySetButtonConfigEmbedded(HidsysUniquePadId unique_pad_id, const HidsysButtonConfigEmbedded *config)
Legacy SetButtonConfigEmbedded.
hidsysActivateCaptureButton
Result hidsysActivateCaptureButton(void)
Activates the CaptureButton sharedmem.
hidsysSetButtonConfigStorageLeft
Result hidsysSetButtonConfigStorageLeft(s32 index, const HidcfgButtonConfigLeft *config, const HidcfgStorageName *name)
SetButtonConfigStorageLeft.
HidcfgDigitalButtonAssignment_A
@ HidcfgDigitalButtonAssignment_A
A.
Definition: hidsys.h:15
hidsysIsFirmwareUpdateNeededForNotification
Result hidsysIsFirmwareUpdateNeededForNotification(HidsysUniquePadId unique_pad_id, bool *out)
IsFirmwareUpdateNeededForNotification.
hidsysGetUniquePadsFromNpad
Result hidsysGetUniquePadsFromNpad(HidNpadIdType id, HidsysUniquePadId *unique_pad_ids, s32 count, s32 *total_out)
Gets the UniquePadIds for the specified controller.
hidsysGetButtonConfigStorageRight
Result hidsysGetButtonConfigStorageRight(s32 index, HidcfgButtonConfigRight *config, HidcfgStorageName *name)
GetButtonConfigStorageRight.
HidcfgButtonConfigLeft::hardware_button_stick_l
u32 hardware_button_stick_l
HidcfgDigitalButtonAssignment HardwareButtonStickL
Definition: hidsys.h:159
hidsysIsCustomButtonConfigSupported
Result hidsysIsCustomButtonConfigSupported(HidsysUniquePadId unique_pad_id, bool *out)
IsCustomButtonConfigSupported.
hidsysSetButtonConfigStorageLeftDeprecated
Result hidsysSetButtonConfigStorageLeftDeprecated(s32 index, const HidcfgButtonConfigLeft *config)
SetButtonConfigStorageLeftDeprecated.
hidsysGetButtonConfigStorageLeft
Result hidsysGetButtonConfigStorageLeft(s32 index, HidcfgButtonConfigLeft *config, HidcfgStorageName *name)
GetButtonConfigStorageLeft.
HidcfgButtonConfigFull
ButtonConfigFull.
Definition: hidsys.h:131
hidsysGetButtonConfigStorageFull
Result hidsysGetButtonConfigStorageFull(s32 index, HidcfgButtonConfigFull *config, HidcfgStorageName *name)
GetButtonConfigStorageFull.
hidsysIsUsbConnected
Result hidsysIsUsbConnected(HidsysUniquePadId unique_pad_id, bool *out)
IsUsbConnected.
HidcfgButtonConfigEmbedded::hardware_button_left
u32 hardware_button_left
HidcfgDigitalButtonAssignment HardwareButtonLeft
Definition: hidsys.h:109
HidcfgButtonConfigEmbedded::hardware_button_b
u32 hardware_button_b
HidcfgDigitalButtonAssignment HardwareButtonB
Definition: hidsys.h:114
u8
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
hidsysSetHidButtonConfigFull
Result hidsysSetHidButtonConfigFull(HidsysUniquePadId unique_pad_id, const HidcfgButtonConfigFull *config)
SetHidButtonConfigFull.
hidsysLegacySetButtonConfigFull
Result hidsysLegacySetButtonConfigFull(HidsysUniquePadId unique_pad_id, const HidsysButtonConfigFull *config)
Legacy SetButtonConfigFull.
HidcfgAnalogStickRotation_Anticlockwise90
@ HidcfgAnalogStickRotation_Anticlockwise90
Anticlockwise90.
Definition: hidsys.h:44
HidsysNotificationLedPattern::totalMiniCycles
u8 totalMiniCycles
Number of Mini Cycles + 1. Value 0x0-0xF: 1 - 16 mini cycles.
Definition: hidsys.h:70
HidcfgDigitalButtonAssignment_X
@ HidcfgDigitalButtonAssignment_X
X.
Definition: hidsys.h:17
Event
Kernel-mode event structure.
Definition: event.h:13
HidcfgDigitalButtonAssignment_Select
@ HidcfgDigitalButtonAssignment_Select
Select / Minus.
Definition: hidsys.h:25
HidcfgDigitalButtonAssignment_StickR
@ HidcfgDigitalButtonAssignment_StickR
Right Stick Button.
Definition: hidsys.h:20
hidsysSetHidButtonConfigEmbedded
Result hidsysSetHidButtonConfigEmbedded(HidsysUniquePadId unique_pad_id, const HidcfgButtonConfigEmbedded *config)
SetHidButtonConfigEmbedded.
hidsysDeleteButtonConfigStorageEmbedded
Result hidsysDeleteButtonConfigStorageEmbedded(s32 index)
DeleteButtonConfigStorageEmbedded.
hidsysIsUsbFullKeyControllerEnabled
Result hidsysIsUsbFullKeyControllerEnabled(bool *out)
IsUsbFullKeyControllerEnabled.
hidsysLegacySetButtonConfigLeft
Result hidsysLegacySetButtonConfigLeft(HidsysUniquePadId unique_pad_id, const HidsysButtonConfigLeft *config)
Legacy SetButtonConfigLeft.
hidsysIsDefaultButtonConfigLeft
Result hidsysIsDefaultButtonConfigLeft(const HidcfgButtonConfigLeft *config, bool *out)
IsDefaultButtonConfigLeft.
hidsysGetHidButtonConfigFull
Result hidsysGetHidButtonConfigFull(HidsysUniquePadId unique_pad_id, HidcfgButtonConfigFull *config)
GetHidButtonConfigFull.
hidsysIsAnyCustomButtonConfigEnabled
Result hidsysIsAnyCustomButtonConfigEnabled(bool *out)
IsAnyCustomButtonConfigEnabled.
HidcfgButtonConfigEmbedded::hardware_button_l
u32 hardware_button_l
HidcfgDigitalButtonAssignment HardwareButtonL
Definition: hidsys.h:119
HidcfgDigitalButtonAssignment_LeftSR
@ HidcfgDigitalButtonAssignment_LeftSR
SR on Left controller.
Definition: hidsys.h:32
hidsysSetButtonConfigLeft
Result hidsysSetButtonConfigLeft(BtdrvAddress addr, const HidsysButtonConfigLeft *config)
SetButtonConfigLeft.
HidcfgAnalogStickRotation_None
@ HidcfgAnalogStickRotation_None
None.
Definition: hidsys.h:42
hidsysGetHidButtonConfigLeft
Result hidsysGetHidButtonConfigLeft(HidsysUniquePadId unique_pad_id, HidcfgButtonConfigLeft *config)
GetHidButtonConfigLeft.
hidsysIsButtonConfigStorageRightEmpty
Result hidsysIsButtonConfigStorageRightEmpty(s32 index, bool *out)
IsButtonConfigStorageRightEmpty.
hidsysActivateHomeButton
Result hidsysActivateHomeButton(void)
Activates the HomeButton sharedmem.
hidsysSetHidButtonConfigLeft
Result hidsysSetHidButtonConfigLeft(HidsysUniquePadId unique_pad_id, const HidcfgButtonConfigLeft *config)
SetHidButtonConfigLeft.
hidsysSetButtonConfigEnabled
Result hidsysSetButtonConfigEnabled(BtdrvAddress addr, bool flag)
SetButtonConfigEnabled.
s32
int32_t s32
32-bit signed integer.
Definition: types.h:27
hidsysIsUsingCustomButtonConfig
Result hidsysIsUsingCustomButtonConfig(HidsysUniquePadId unique_pad_id, bool *out)
IsUsingCustomButtonConfig.
hidsysSetButtonConfigRight
Result hidsysSetButtonConfigRight(BtdrvAddress addr, const HidsysButtonConfigRight *config)
SetButtonConfigRight.
HidcfgButtonConfigFull::hardware_button_b
u32 hardware_button_b
HidcfgDigitalButtonAssignment HardwareButtonB
Definition: hidsys.h:137
HidcfgButtonConfigFull::hardware_stick_r
HidcfgAnalogStickAssignment hardware_stick_r
HardwareStickR.
Definition: hidsys.h:150
HidcfgButtonConfigFull::hardware_button_l
u32 hardware_button_l
HidcfgDigitalButtonAssignment HardwareButtonL
Definition: hidsys.h:142
hidsysSetButtonConfigEmbedded
Result hidsysSetButtonConfigEmbedded(const HidsysButtonConfigEmbedded *config)
SetButtonConfigEmbedded.
HidcfgButtonConfigFull::hardware_button_select
u32 hardware_button_select
HidcfgDigitalButtonAssignment HardwareButtonSelect
Definition: hidsys.h:146
HidcfgButtonConfigFull::hardware_button_x
u32 hardware_button_x
HidcfgDigitalButtonAssignment HardwareButtonX
Definition: hidsys.h:138
HidcfgButtonConfigEmbedded::hardware_button_stick_l
u32 hardware_button_stick_l
HidcfgDigitalButtonAssignment HardwareButtonStickL
Definition: hidsys.h:117
HidcfgButtonConfigEmbedded::hardware_button_a
u32 hardware_button_a
HidcfgDigitalButtonAssignment HardwareButtonA
Definition: hidsys.h:113
HidcfgButtonConfigRight::hardware_button_zr
u32 hardware_button_zr
HidcfgDigitalButtonAssignment HardwareButtonZR
Definition: hidsys.h:177
HidcfgButtonConfigLeft::hardware_button_l
u32 hardware_button_l
HidcfgDigitalButtonAssignment HardwareButtonL
Definition: hidsys.h:160
HidcfgButtonConfigEmbedded::hardware_button_right
u32 hardware_button_right
HidcfgDigitalButtonAssignment HardwareButtonRight
Definition: hidsys.h:111
hidsysLegacyGetButtonConfigLeft
Result hidsysLegacyGetButtonConfigLeft(HidsysUniquePadId unique_pad_id, HidsysButtonConfigLeft *config)
Legacy GetButtonConfigLeft.
hidsysIsButtonConfigSupported
Result hidsysIsButtonConfigSupported(BtdrvAddress addr, bool *out)
IsButtonConfigSupported.
HidcfgDigitalButtonAssignment_ZL
@ HidcfgDigitalButtonAssignment_ZL
ZL.
Definition: hidsys.h:23
HidcfgAnalogStickAssignment
AnalogStickAssignment.
Definition: hidsys.h:101
HidcfgButtonConfigEmbedded
ButtonConfigEmbedded.
Definition: hidsys.h:108
HidcfgButtonConfigEmbedded::hardware_button_r
u32 hardware_button_r
HidcfgDigitalButtonAssignment HardwareButtonR
Definition: hidsys.h:120
HidcfgButtonConfigRight::hardware_button_start
u32 hardware_button_start
HidcfgDigitalButtonAssignment HardwareButtonStart
Definition: hidsys.h:178
hidsysEnableUsbFullKeyController
Result hidsysEnableUsbFullKeyController(bool flag)
EnableUsbFullKeyController.
HidNpadIdType
HidNpadIdType
HID controller IDs.
Definition: hid.h:214
HidcfgButtonConfigLeft::hardware_button_left_sl
u32 hardware_button_left_sl
HidcfgDigitalButtonAssignment HardwareButtonLeftSL
Definition: hidsys.h:163
HidcfgButtonConfigEmbedded::hardware_button_x
u32 hardware_button_x
HidcfgDigitalButtonAssignment HardwareButtonX
Definition: hidsys.h:115
hidsysSendKeyboardLockKeyEvent
Result hidsysSendKeyboardLockKeyEvent(u32 events)
SendKeyboardLockKeyEvent.
hidsysLegacyDeleteButtonConfig
Result hidsysLegacyDeleteButtonConfig(HidsysUniquePadId unique_pad_id)
Legacy DeleteButtonConfig.
HidcfgDigitalButtonAssignment_HomeButton
@ HidcfgDigitalButtonAssignment_HomeButton
HomeButton.
Definition: hidsys.h:35
hidsysHasBattery
Result hidsysHasBattery(HidNpadIdType id, bool *out)
HasBattery.
HidcfgDigitalButtonAssignment_Down
@ HidcfgDigitalButtonAssignment_Down
Down.
Definition: hidsys.h:30
HidsysNotificationLedPattern::totalFullCycles
u8 totalFullCycles
Number of Full Cycles. Value 0x1-0xF: 1 - 15 full cycles. Value 0x0 is repeat forever,...
Definition: hidsys.h:71
HidcfgDigitalButtonAssignment_CaptureButton
@ HidcfgDigitalButtonAssignment_CaptureButton
CaptureButton.
Definition: hidsys.h:36
HidsysNotificationLedPattern::baseMiniCycleDuration
u8 baseMiniCycleDuration
Mini Cycle Base Duration. Value 0x1-0xF: 12.5ms - 187.5ms. Value 0x0 = 0ms/OFF.
Definition: hidsys.h:69
hidsysGetServiceSession
Service * hidsysGetServiceSession(void)
Gets the Service object for the actual hidsys service session.
HidcfgButtonConfigRight
ButtonConfigRight.
Definition: hidsys.h:170
HidsysButtonConfigRight
ButtonConfigRight.
Definition: hidsys.h:96
HidcfgDigitalButtonAssignment_B
@ HidcfgDigitalButtonAssignment_B
B.
Definition: hidsys.h:16
hidsysIsDefaultButtonConfigFull
Result hidsysIsDefaultButtonConfigFull(const HidcfgButtonConfigFull *config, bool *out)
IsDefaultButtonConfigFull.
hidsysSetNotificationLedPatternWithTimeout
Result hidsysSetNotificationLedPatternWithTimeout(const HidsysNotificationLedPattern *pattern, HidsysUniquePadId unique_pad_id, u64 timeout)
Sets the HOME-button notification LED pattern, for the specified controller.
hidsysSetButtonConfigStorageEmbeddedDeprecated
Result hidsysSetButtonConfigStorageEmbeddedDeprecated(s32 index, const HidcfgButtonConfigEmbedded *config)
SetButtonConfigStorageEmbeddedDeprecated.
HidcfgAnalogStickRotation
HidcfgAnalogStickRotation
AnalogStickRotation.
Definition: hidsys.h:41
HidcfgAnalogStickRotation_Clockwise90
@ HidcfgAnalogStickRotation_Clockwise90
Clockwise90.
Definition: hidsys.h:43
HidsysButtonConfigFull
ButtonConfigFull.
Definition: hidsys.h:86
HidcfgButtonConfigFull::hardware_button_zr
u32 hardware_button_zr
HidcfgDigitalButtonAssignment HardwareButtonZR
Definition: hidsys.h:145
hidsysSetButtonConfigStorageRightDeprecated
Result hidsysSetButtonConfigStorageRightDeprecated(s32 index, const HidcfgButtonConfigRight *config)
SetButtonConfigStorageRightDeprecated.
hidsysGetButtonConfigLeft
Result hidsysGetButtonConfigLeft(BtdrvAddress addr, HidsysButtonConfigLeft *config)
GetButtonConfigLeft.
HidcfgButtonConfigEmbedded::hardware_button_stick_r
u32 hardware_button_stick_r
HidcfgDigitalButtonAssignment HardwareButtonStickR
Definition: hidsys.h:118
u32
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
hidsysSetAllDefaultButtonConfig
Result hidsysSetAllDefaultButtonConfig(void)
SetAllDefaultButtonConfig.
hidsysGetButtonConfigStorageEmbedded
Result hidsysGetButtonConfigStorageEmbedded(s32 index, HidcfgButtonConfigEmbedded *config, HidcfgStorageName *name)
GetButtonConfigStorageEmbedded.
hidsysIsButtonConfigStorageLeftEmpty
Result hidsysIsButtonConfigStorageLeftEmpty(s32 index, bool *out)
IsButtonConfigStorageLeftEmpty.
hidsysHasLeftRightBattery
Result hidsysHasLeftRightBattery(HidNpadIdType id, bool *out0, bool *out1)
HasLeftRightBattery.
HidcfgDigitalButtonAssignment_Y
@ HidcfgDigitalButtonAssignment_Y
Y.
Definition: hidsys.h:18
hidsysDeleteButtonConfig
Result hidsysDeleteButtonConfig(BtdrvAddress addr)
DeleteButtonConfig.
HidcfgDigitalButtonAssignment_R
@ HidcfgDigitalButtonAssignment_R
R.
Definition: hidsys.h:22
HidcfgButtonConfigEmbedded::hardware_button_start
u32 hardware_button_start
HidcfgDigitalButtonAssignment HardwareButtonStart
Definition: hidsys.h:124
hidsysLegacyIsButtonConfigSupported
Result hidsysLegacyIsButtonConfigSupported(HidsysUniquePadId unique_pad_id, bool *out)
Legacy IsButtonConfigSupported.
hidsysGetButtonConfigEmbedded
Result hidsysGetButtonConfigEmbedded(HidsysButtonConfigEmbedded *config)
GetButtonConfigEmbedded.
HidcfgDigitalButtonAssignment
HidcfgDigitalButtonAssignment
Selects what button to map to.
Definition: hidsys.h:14
HidcfgDigitalButtonAssignment_L
@ HidcfgDigitalButtonAssignment_L
L.
Definition: hidsys.h:21
HidcfgDigitalButtonAssignment_Right
@ HidcfgDigitalButtonAssignment_Right
Right.
Definition: hidsys.h:29
u64
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
HidcfgButtonConfigFull::hardware_button_stick_l
u32 hardware_button_stick_l
HidcfgDigitalButtonAssignment HardwareButtonStickL
Definition: hidsys.h:140
HidcfgButtonConfigLeft::hardware_button_down
u32 hardware_button_down
HidcfgDigitalButtonAssignment HardwareButtonDown
Definition: hidsys.h:158
HidcfgButtonConfigLeft::hardware_button_left
u32 hardware_button_left
HidcfgDigitalButtonAssignment HardwareButtonLeft
Definition: hidsys.h:155
hidsysGetButtonConfigStorageLeftDeprecated
Result hidsysGetButtonConfigStorageLeftDeprecated(s32 index, HidcfgButtonConfigLeft *config)
GetButtonConfigStorageLeftDeprecated.
HidsysUniquePadSerialNumber
UniquePadSerialNumber.
Definition: hidsys.h:53
hidsysIsButtonConfigEmbeddedSupported
Result hidsysIsButtonConfigEmbeddedSupported(bool *out)
IsButtonConfigEmbeddedSupported.
hidsysIsButtonConfigStorageFullEmpty
Result hidsysIsButtonConfigStorageFullEmpty(s32 index, bool *out)
IsButtonConfigStorageFullEmpty.
HidsysButtonConfigLeft
ButtonConfigLeft.
Definition: hidsys.h:91
HidsysNotificationLedPatternCycle::finalStepDuration
u8 finalStepDuration
Final Step Duration Multiplier of Mini Cycle X. Value 0x0: 12.5ms, 0x1 - xF: 1x - 15x....
Definition: hidsys.h:61
hidsysDeleteButtonConfigStorageFull
Result hidsysDeleteButtonConfigStorageFull(s32 index)
DeleteButtonConfigStorageFull.
hidsysIsDefaultButtonConfigRight
Result hidsysIsDefaultButtonConfigRight(const HidcfgButtonConfigRight *config, bool *out)
IsDefaultButtonConfigRight.
HidcfgButtonConfigFull::hardware_button_down
u32 hardware_button_down
HidcfgDigitalButtonAssignment HardwareButtonDown
Definition: hidsys.h:135
HidcfgDigitalButtonAssignment_Left
@ HidcfgDigitalButtonAssignment_Left
Left.
Definition: hidsys.h:27
HidcfgButtonConfigEmbedded::hardware_stick_l
HidcfgAnalogStickAssignment hardware_stick_l
HardwareStickL.
Definition: hidsys.h:126
Result
u32 Result
Function error code result type.
Definition: types.h:44
hidsysInitialize
Result hidsysInitialize(void)
Initialize hidsys.
HidcfgButtonConfigFull::hardware_button_start
u32 hardware_button_start
HidcfgDigitalButtonAssignment HardwareButtonStart
Definition: hidsys.h:147
hidsysGetButtonConfigRight
Result hidsysGetButtonConfigRight(BtdrvAddress addr, HidsysButtonConfigRight *config)
GetButtonConfigRight.
hidsysActivateSleepButton
Result hidsysActivateSleepButton(void)
Activates the SleepButton sharedmem.
HidcfgButtonConfigLeft
ButtonConfigLeft.
Definition: hidsys.h:154
hidsysGetButtonConfigStorageRightDeprecated
Result hidsysGetButtonConfigStorageRightDeprecated(s32 index, HidcfgButtonConfigRight *config)
GetButtonConfigStorageRightDeprecated.
HidcfgButtonConfigEmbedded::hardware_button_y
u32 hardware_button_y
HidcfgDigitalButtonAssignment HardwareButtonY
Definition: hidsys.h:116
HidcfgButtonConfigFull::hardware_button_left
u32 hardware_button_left
HidcfgDigitalButtonAssignment HardwareButtonLeft
Definition: hidsys.h:132
HidsysNotificationLedPattern::startIntensity
u8 startIntensity
LED Start Intensity. Value 0x0=0% - 0xF=100%.
Definition: hidsys.h:72
HidcfgButtonConfigFull::hardware_button_a
u32 hardware_button_a
HidcfgDigitalButtonAssignment HardwareButtonA
Definition: hidsys.h:136
HidcfgDigitalButtonAssignment_Start
@ HidcfgDigitalButtonAssignment_Start
Start / Plus.
Definition: hidsys.h:26
hidsysGetButtonConfigFull
Result hidsysGetButtonConfigFull(BtdrvAddress addr, HidsysButtonConfigFull *config)
GetButtonConfigFull.
hidsysGetButtonConfigStorageEmbeddedDeprecated
Result hidsysGetButtonConfigStorageEmbeddedDeprecated(s32 index, HidcfgButtonConfigEmbedded *config)
GetButtonConfigStorageEmbeddedDeprecated.
HidcfgButtonConfigLeft::hardware_button_select
u32 hardware_button_select
HidcfgDigitalButtonAssignment HardwareButtonSelect
Definition: hidsys.h:162
HidcfgButtonConfigLeft::hardware_button_right
u32 hardware_button_right
HidcfgDigitalButtonAssignment HardwareButtonRight
Definition: hidsys.h:157
hidsysGetUniquePadIds
Result hidsysGetUniquePadIds(HidsysUniquePadId *unique_pad_ids, s32 count, s32 *total_out)
Gets a list of all UniquePadIds.
HidcfgButtonConfigFull::hardware_button_capture
u32 hardware_button_capture
HidcfgDigitalButtonAssignment HardwareButtonCapture
Definition: hidsys.h:148
hidsysSetButtonConfigFull
Result hidsysSetButtonConfigFull(BtdrvAddress addr, const HidsysButtonConfigFull *config)
SetButtonConfigFull.
HidcfgDigitalButtonAssignment_LeftSL
@ HidcfgDigitalButtonAssignment_LeftSL
SL on Left controller.
Definition: hidsys.h:31
HidcfgButtonConfigRight::hardware_stick_r
HidcfgAnalogStickAssignment hardware_stick_r
HardwareStickR.
Definition: hidsys.h:181
HidcfgButtonConfigEmbedded::hardware_button_capture
u32 hardware_button_capture
HidcfgDigitalButtonAssignment HardwareButtonCapture
Definition: hidsys.h:125
HidsysButtonConfigEmbedded
ButtonConfigEmbedded.
Definition: hidsys.h:81
HidcfgButtonConfigFull::hardware_button_y
u32 hardware_button_y
HidcfgDigitalButtonAssignment HardwareButtonY
Definition: hidsys.h:139
hidsysSetButtonConfigStorageFull
Result hidsysSetButtonConfigStorageFull(s32 index, const HidcfgButtonConfigFull *config, const HidcfgStorageName *name)
SetButtonConfigStorageFull.
hidsysGetHidButtonConfigRight
Result hidsysGetHidButtonConfigRight(HidsysUniquePadId unique_pad_id, HidcfgButtonConfigRight *config)
GetHidButtonConfigRight.
hidsysAcquireHomeButtonEventHandle
Result hidsysAcquireHomeButtonEventHandle(Event *out_event, bool autoclear)
Gets an Event which is signaled when HidHomeButtonState is updated.
hidsysSetButtonConfigStorageFullDeprecated
Result hidsysSetButtonConfigStorageFullDeprecated(s32 index, const HidcfgButtonConfigFull *config)
SetButtonConfigStorageFullDeprecated.
hidsysLegacyIsButtonConfigEnabled
Result hidsysLegacyIsButtonConfigEnabled(HidsysUniquePadId unique_pad_id, bool *out)
Legacy IsButtonConfigEnabled.
hidsysSetNotificationLedPattern
Result hidsysSetNotificationLedPattern(const HidsysNotificationLedPattern *pattern, HidsysUniquePadId unique_pad_id)
Sets the HOME-button notification LED pattern, for the specified controller.
HidsysUniquePadId::id
u64 id
UniquePadId.
Definition: hidsys.h:49
hidsysAcquireSleepButtonEventHandle
Result hidsysAcquireSleepButtonEventHandle(Event *out_event, bool autoclear)
Gets an Event which is signaled when HidSleepButtonState is updated.
HidcfgButtonConfigEmbedded::hardware_button_select
u32 hardware_button_select
HidcfgDigitalButtonAssignment HardwareButtonSelect
Definition: hidsys.h:123
hidsysLegacyGetButtonConfigRight
Result hidsysLegacyGetButtonConfigRight(HidsysUniquePadId unique_pad_id, HidsysButtonConfigRight *config)
Legacy GetButtonConfigRight.
HidsysNotificationLedPatternCycle::ledIntensity
u8 ledIntensity
Mini Cycle X LED Intensity.
Definition: hidsys.h:59
HidcfgDigitalButtonAssignment_Up
@ HidcfgDigitalButtonAssignment_Up
Up.
Definition: hidsys.h:28
hidsysIsDefaultButtonConfigEmbedded
Result hidsysIsDefaultButtonConfigEmbedded(const HidcfgButtonConfigEmbedded *config, bool *out)
IsDefaultButtonConfigEmbedded.
HidcfgButtonConfigLeft::hardware_button_capture
u32 hardware_button_capture
HidcfgDigitalButtonAssignment HardwareButtonCapture
Definition: hidsys.h:165
HidcfgButtonConfigFull::hardware_stick_l
HidcfgAnalogStickAssignment hardware_stick_l
HardwareStickL.
Definition: hidsys.h:149
HidcfgButtonConfigFull::hardware_button_right
u32 hardware_button_right
HidcfgDigitalButtonAssignment HardwareButtonRight
Definition: hidsys.h:134
HidcfgButtonConfigEmbedded::hardware_stick_r
HidcfgAnalogStickAssignment hardware_stick_r
HardwareStickR.
Definition: hidsys.h:127
hidsysGetButtonConfigStorageFullDeprecated
Result hidsysGetButtonConfigStorageFullDeprecated(s32 index, HidcfgButtonConfigFull *config)
GetButtonConfigStorageFullDeprecated.
hidsysIsButtonConfigStorageEmbeddedEmpty
Result hidsysIsButtonConfigStorageEmbeddedEmpty(s32 index, bool *out)
IsButtonConfigStorageEmbeddedEmpty.
hidsysDeleteButtonConfigStorageLeft
Result hidsysDeleteButtonConfigStorageLeft(s32 index)
DeleteButtonConfigStorageLeft.
BtdrvAddress
Address.
Definition: btdrv_types.h:161
hidsysAcquireCaptureButtonEventHandle
Result hidsysAcquireCaptureButtonEventHandle(Event *out_event, bool autoclear)
Gets an Event which is signaled when HidCaptureButtonState is updated.
hidsysSetHidButtonConfigRight
Result hidsysSetHidButtonConfigRight(HidsysUniquePadId unique_pad_id, const HidcfgButtonConfigRight *config)
SetHidButtonConfigRight.
hidsysGetHidButtonConfigEmbedded
Result hidsysGetHidButtonConfigEmbedded(HidsysUniquePadId unique_pad_id, HidcfgButtonConfigEmbedded *config)
GetHidButtonConfigEmbedded.
hidsysGetUniquePadSerialNumber
Result hidsysGetUniquePadSerialNumber(HidsysUniquePadId unique_pad_id, HidsysUniquePadSerialNumber *serial)
Gets the HidsysUniquePadSerialNumber.
Service
Service object structure.
Definition: service.h:13
HidsysUniquePadId
UniquePadId for a controller.
Definition: hidsys.h:48
HidsysNotificationLedPatternCycle
Mini Cycle struct for HidsysNotificationLedPattern.
Definition: hidsys.h:58
hidsysLegacyGetButtonConfigEmbedded
Result hidsysLegacyGetButtonConfigEmbedded(HidsysUniquePadId unique_pad_id, HidsysButtonConfigEmbedded *config)
Legacy GetButtonConfigEmbedded.
HidcfgButtonConfigRight::hardware_button_r
u32 hardware_button_r
HidcfgDigitalButtonAssignment HardwareButtonR
Definition: hidsys.h:176
HidcfgButtonConfigEmbedded::hardware_button_zr
u32 hardware_button_zr
HidcfgDigitalButtonAssignment HardwareButtonZR
Definition: hidsys.h:122
HidcfgButtonConfigRight::hardware_button_y
u32 hardware_button_y
HidcfgDigitalButtonAssignment HardwareButtonY
Definition: hidsys.h:174
HidcfgButtonConfigFull::hardware_button_zl
u32 hardware_button_zl
HidcfgDigitalButtonAssignment HardwareButtonZL
Definition: hidsys.h:144
HidsysNotificationLedPattern
Structure for hidsysSetNotificationLedPattern.
Definition: hidsys.h:68
hidsysLegacySetButtonConfigRight
Result hidsysLegacySetButtonConfigRight(HidsysUniquePadId unique_pad_id, const HidsysButtonConfigRight *config)
Legacy SetButtonConfigRight.
HidcfgButtonConfigEmbedded::hardware_button_down
u32 hardware_button_down
HidcfgDigitalButtonAssignment HardwareButtonDown
Definition: hidsys.h:112
HidcfgButtonConfigRight::hardware_button_b
u32 hardware_button_b
HidcfgDigitalButtonAssignment HardwareButtonB
Definition: hidsys.h:172
HidcfgButtonConfigFull::hardware_button_up
u32 hardware_button_up
HidcfgDigitalButtonAssignment HardwareButtonUp
Definition: hidsys.h:133
HidcfgButtonConfigRight::hardware_button_stick_r
u32 hardware_button_stick_r
HidcfgDigitalButtonAssignment HardwareButtonStickR
Definition: hidsys.h:175
HidcfgDigitalButtonAssignment_RightSR
@ HidcfgDigitalButtonAssignment_RightSR
SR on Right controller.
Definition: hidsys.h:34
hidsysLegacySetButtonConfigEnabled
Result hidsysLegacySetButtonConfigEnabled(HidsysUniquePadId unique_pad_id, bool flag)
Legacy SetButtonConfigEnabled.
hidsysGetNpadLeftRightInterfaceType
Result hidsysGetNpadLeftRightInterfaceType(HidNpadIdType id, u8 *out0, u8 *out1)
GetNpadLeftRightInterfaceType.
HidsysNotificationLedPatternCycle::transitionSteps
u8 transitionSteps
Fading Transition Steps to Mini Cycle X (Uses PWM). Value 0x0: Instant. Each step duration is based o...
Definition: hidsys.h:60
hidsysExit
void hidsysExit(void)
Exit hidsys.
HidcfgDigitalButtonAssignment_Invalid
@ HidcfgDigitalButtonAssignment_Invalid
Invalid / Disabled.
Definition: hidsys.h:37
hidsysEnableAppletToGetInput
Result hidsysEnableAppletToGetInput(bool enable)
EnableAppletToGetInput.
HidcfgButtonConfigRight::hardware_button_right_sr
u32 hardware_button_right_sr
HidcfgDigitalButtonAssignment HardwareButtonRightSR
Definition: hidsys.h:180
HidcfgAnalogStickAssignment::is_paired_stick_assigned
u8 is_paired_stick_assigned
IsPairedStickAssigned.
Definition: hidsys.h:103
HidcfgButtonConfigEmbedded::hardware_button_up
u32 hardware_button_up
HidcfgDigitalButtonAssignment HardwareButtonUp
Definition: hidsys.h:110
hidsysSetButtonConfigStorageRight
Result hidsysSetButtonConfigStorageRight(s32 index, const HidcfgButtonConfigRight *config, const HidcfgStorageName *name)
SetButtonConfigStorageRight.
HidcfgButtonConfigLeft::hardware_button_zl
u32 hardware_button_zl
HidcfgDigitalButtonAssignment HardwareButtonZL
Definition: hidsys.h:161
hidsysGetNpadInterfaceType
Result hidsysGetNpadInterfaceType(HidNpadIdType id, u8 *out)
Gets the HidNpadInterfaceType for the specified controller.
hidsysSetButtonConfigStorageEmbedded
Result hidsysSetButtonConfigStorageEmbedded(s32 index, const HidcfgButtonConfigEmbedded *config, const HidcfgStorageName *name)
SetButtonConfigStorageEmbedded.
HidcfgButtonConfigRight::hardware_button_right_sl
u32 hardware_button_right_sl
HidcfgDigitalButtonAssignment HardwareButtonRightSL
Definition: hidsys.h:179
hidsysSetAllCustomButtonConfigEnabled
Result hidsysSetAllCustomButtonConfigEnabled(u64 AppletResourceUserId, bool flag)
SetAllCustomButtonConfigEnabled.
HidcfgButtonConfigEmbedded::hardware_button_zl
u32 hardware_button_zl
HidcfgDigitalButtonAssignment HardwareButtonZL
Definition: hidsys.h:121
HidcfgButtonConfigFull::hardware_button_r
u32 hardware_button_r
HidcfgDigitalButtonAssignment HardwareButtonR
Definition: hidsys.h:143
HidcfgButtonConfigLeft::hardware_stick_l
HidcfgAnalogStickAssignment hardware_stick_l
HardwareStickL.
Definition: hidsys.h:166
hidsysDeleteButtonConfigEmbedded
Result hidsysDeleteButtonConfigEmbedded(void)
DeleteButtonConfigEmbedded.
hidsysDeleteButtonConfigStorageRight
Result hidsysDeleteButtonConfigStorageRight(s32 index)
DeleteButtonConfigStorageRight.
HidcfgButtonConfigLeft::hardware_button_left_sr
u32 hardware_button_left_sr
HidcfgDigitalButtonAssignment HardwareButtonLeftSR
Definition: hidsys.h:164
hidsysIsButtonConfigEnabled
Result hidsysIsButtonConfigEnabled(BtdrvAddress addr, bool *out)
IsButtonConfigEnabled.