8 #include "../kernel/event.h"
9 #include "../services/hid.h"
10 #include "../services/btdrv_types.h"
11 #include "../sf/service.h"
63 char serial_number[0x10];
HidNpadInterfaceType
NpadInterfaceType (system)
Definition: hid.h:477
HidNpadIdType
HID controller IDs.
Definition: hid.h:214
Result hidsysLegacyDeleteButtonConfig(HidsysUniquePadId unique_pad_id)
Legacy DeleteButtonConfig.
Result hidsysSetButtonConfigStorageLeftDeprecated(s32 index, const HidcfgButtonConfigLeft *config)
SetButtonConfigStorageLeftDeprecated.
Result hidsysIsButtonConfigStorageEmbeddedEmpty(s32 index, bool *out)
IsButtonConfigStorageEmbeddedEmpty.
Result hidsysInitialize(void)
Initialize hidsys.
Result hidsysDeleteButtonConfigStorageEmbedded(s32 index)
DeleteButtonConfigStorageEmbedded.
Result hidsysGetButtonConfigStorageFull(s32 index, HidcfgButtonConfigFull *config, HidcfgStorageName *name)
GetButtonConfigStorageFull.
Result hidsysLegacyIsButtonConfigSupported(HidsysUniquePadId unique_pad_id, bool *out)
Legacy IsButtonConfigSupported.
Result hidsysEnableAppletToGetInput(bool enable)
EnableAppletToGetInput.
Result hidsysIsButtonConfigStorageRightEmpty(s32 index, bool *out)
IsButtonConfigStorageRightEmpty.
Result hidsysGetHidButtonConfigEmbedded(HidsysUniquePadId unique_pad_id, HidcfgButtonConfigEmbedded *config)
GetHidButtonConfigEmbedded.
Result hidsysLegacySetButtonConfigFull(HidsysUniquePadId unique_pad_id, const HidsysButtonConfigFull *config)
Legacy SetButtonConfigFull.
Result hidsysLegacySetButtonConfigEmbedded(HidsysUniquePadId unique_pad_id, const HidsysButtonConfigEmbedded *config)
Legacy SetButtonConfigEmbedded.
Result hidsysSendKeyboardLockKeyEvent(u32 events)
SendKeyboardLockKeyEvent.
Result hidsysGetUniquePadIds(HidsysUniquePadId *unique_pad_ids, s32 count, s32 *total_out)
Gets a list of all UniquePadIds.
Result hidsysGetButtonConfigStorageRightDeprecated(s32 index, HidcfgButtonConfigRight *config)
GetButtonConfigStorageRightDeprecated.
Result hidsysGetNpadInterfaceType(HidNpadIdType id, u8 *out)
Gets the HidNpadInterfaceType for the specified controller.
Result hidsysLegacySetButtonConfigEnabled(HidsysUniquePadId unique_pad_id, bool flag)
Legacy SetButtonConfigEnabled.
Result hidsysIsFirmwareUpdateNeededForNotification(HidsysUniquePadId unique_pad_id, bool *out)
IsFirmwareUpdateNeededForNotification.
Result hidsysDeleteButtonConfigStorageFull(s32 index)
DeleteButtonConfigStorageFull.
Result hidsysGetButtonConfigEmbedded(HidsysButtonConfigEmbedded *config)
GetButtonConfigEmbedded.
Result hidsysSetButtonConfigStorageLeft(s32 index, const HidcfgButtonConfigLeft *config, const HidcfgStorageName *name)
SetButtonConfigStorageLeft.
Result hidsysSetNotificationLedPatternWithTimeout(const HidsysNotificationLedPattern *pattern, HidsysUniquePadId unique_pad_id, u64 timeout)
Sets the HOME-button notification LED pattern, for the specified controller.
Result hidsysSetButtonConfigLeft(BtdrvAddress addr, const HidsysButtonConfigLeft *config)
SetButtonConfigLeft.
Result hidsysSetButtonConfigStorageRight(s32 index, const HidcfgButtonConfigRight *config, const HidcfgStorageName *name)
SetButtonConfigStorageRight.
void hidsysExit(void)
Exit hidsys.
Result hidsysIsUsingCustomButtonConfig(HidsysUniquePadId unique_pad_id, bool *out)
IsUsingCustomButtonConfig.
Result hidsysIsButtonConfigEmbeddedSupported(bool *out)
IsButtonConfigEmbeddedSupported.
Result hidsysSetButtonConfigEnabled(BtdrvAddress addr, bool flag)
SetButtonConfigEnabled.
Result hidsysSetButtonConfigStorageFullDeprecated(s32 index, const HidcfgButtonConfigFull *config)
SetButtonConfigStorageFullDeprecated.
Result hidsysActivateSleepButton(void)
Activates the SleepButton sharedmem.
Result hidsysGetSupportedNpadStyleSetOfCallerApplet(u32 *out)
Gets the SupportedNpadStyleSet for the CallerApplet.
HidcfgAnalogStickRotation
AnalogStickRotation.
Definition: hidsys.h:41
@ HidcfgAnalogStickRotation_Anticlockwise90
Anticlockwise90.
Definition: hidsys.h:44
@ HidcfgAnalogStickRotation_None
None.
Definition: hidsys.h:42
@ HidcfgAnalogStickRotation_Clockwise90
Clockwise90.
Definition: hidsys.h:43
Result hidsysSetAllCustomButtonConfigEnabled(u64 AppletResourceUserId, bool flag)
SetAllCustomButtonConfigEnabled.
Result hidsysLegacyGetButtonConfigRight(HidsysUniquePadId unique_pad_id, HidsysButtonConfigRight *config)
Legacy GetButtonConfigRight.
Result hidsysIsButtonConfigEnabled(BtdrvAddress addr, bool *out)
IsButtonConfigEnabled.
Result hidsysGetButtonConfigStorageRight(s32 index, HidcfgButtonConfigRight *config, HidcfgStorageName *name)
GetButtonConfigStorageRight.
Result hidsysGetButtonConfigRight(BtdrvAddress addr, HidsysButtonConfigRight *config)
GetButtonConfigRight.
Result hidsysSetButtonConfigStorageRightDeprecated(s32 index, const HidcfgButtonConfigRight *config)
SetButtonConfigStorageRightDeprecated.
Result hidsysDeleteButtonConfigStorageLeft(s32 index)
DeleteButtonConfigStorageLeft.
Result hidsysSetButtonConfigStorageEmbedded(s32 index, const HidcfgButtonConfigEmbedded *config, const HidcfgStorageName *name)
SetButtonConfigStorageEmbedded.
Result hidsysGetNpadLeftRightInterfaceType(HidNpadIdType id, u8 *out0, u8 *out1)
GetNpadLeftRightInterfaceType.
Result hidsysIsUsbFullKeyControllerEnabled(bool *out)
IsUsbFullKeyControllerEnabled.
Result hidsysEnableUsbFullKeyController(bool flag)
EnableUsbFullKeyController.
Result hidsysActivateCaptureButton(void)
Activates the CaptureButton sharedmem.
Result hidsysDisconnectUniquePad(HidsysUniquePadId unique_pad_id)
DisconnectUniquePad.
Result hidsysSetHidButtonConfigLeft(HidsysUniquePadId unique_pad_id, const HidcfgButtonConfigLeft *config)
SetHidButtonConfigLeft.
Result hidsysGetButtonConfigStorageFullDeprecated(s32 index, HidcfgButtonConfigFull *config)
GetButtonConfigStorageFullDeprecated.
Result hidsysIsAnyCustomButtonConfigEnabled(bool *out)
IsAnyCustomButtonConfigEnabled.
Result hidsysAcquireHomeButtonEventHandle(Event *out_event, bool autoclear)
Gets an Event which is signaled when HidHomeButtonState is updated.
Result hidsysSetButtonConfigStorageEmbeddedDeprecated(s32 index, const HidcfgButtonConfigEmbedded *config)
SetButtonConfigStorageEmbeddedDeprecated.
Result hidsysActivateHomeButton(void)
Activates the HomeButton sharedmem.
Result hidsysGetButtonConfigLeft(BtdrvAddress addr, HidsysButtonConfigLeft *config)
GetButtonConfigLeft.
Result hidsysAcquireUniquePadConnectionEventHandle(Event *out_event)
AcquireUniquePadConnectionEventHandle.
Result hidsysGetUniquePadBluetoothAddress(HidsysUniquePadId unique_pad_id, BtdrvAddress *address)
GetUniquePadBluetoothAddress.
Result hidsysLegacySetButtonConfigLeft(HidsysUniquePadId unique_pad_id, const HidsysButtonConfigLeft *config)
Legacy SetButtonConfigLeft.
Result hidsysIsButtonConfigStorageFullEmpty(s32 index, bool *out)
IsButtonConfigStorageFullEmpty.
Result hidsysGetUniquePadsFromNpad(HidNpadIdType id, HidsysUniquePadId *unique_pad_ids, s32 count, s32 *total_out)
Gets the UniquePadIds for the specified controller.
Result hidsysDeleteButtonConfigStorageRight(s32 index)
DeleteButtonConfigStorageRight.
Result hidsysHasLeftRightBattery(HidNpadIdType id, bool *out0, bool *out1)
HasLeftRightBattery.
Result hidsysSetButtonConfigStorageFull(s32 index, const HidcfgButtonConfigFull *config, const HidcfgStorageName *name)
SetButtonConfigStorageFull.
Result hidsysAcquireSleepButtonEventHandle(Event *out_event, bool autoclear)
Gets an Event which is signaled when HidSleepButtonState is updated.
Result hidsysIsCustomButtonConfigSupported(HidsysUniquePadId unique_pad_id, bool *out)
IsCustomButtonConfigSupported.
Result hidsysSetNotificationLedPattern(const HidsysNotificationLedPattern *pattern, HidsysUniquePadId unique_pad_id)
Sets the HOME-button notification LED pattern, for the specified controller.
Result hidsysSetAllDefaultButtonConfig(void)
SetAllDefaultButtonConfig.
Result hidsysGetButtonConfigStorageEmbeddedDeprecated(s32 index, HidcfgButtonConfigEmbedded *config)
GetButtonConfigStorageEmbeddedDeprecated.
Result hidsysGetTouchScreenDefaultConfiguration(HidTouchScreenConfigurationForNx *touch_screen_configuration)
GetTouchScreenDefaultConfiguration.
Result hidsysSetButtonConfigEmbeddedEnabled(bool flag)
SetButtonConfigEmbeddedEnabled.
HidsysUniquePadType
UniquePadType.
Definition: hidsys.h:48
@ HidsysUniquePadType_Embedded
Embedded.
Definition: hidsys.h:49
@ HidsysUniquePadType_FullKeyController
FullKeyController.
Definition: hidsys.h:50
@ HidsysUniquePadType_LeftController
LeftController.
Definition: hidsys.h:52
@ HidsysUniquePadType_RightController
RightController.
Definition: hidsys.h:51
@ HidsysUniquePadType_DebugPadController
DebugPadController.
Definition: hidsys.h:53
Result hidsysGetUniquePadInterface(HidsysUniquePadId unique_pad_id, HidNpadInterfaceType *interface)
GetUniquePadInterface.
Result hidsysGetUniquePadType(HidsysUniquePadId unique_pad_id, HidsysUniquePadType *pad_type)
GetUniquePadType.
Result hidsysIsUsbConnected(HidsysUniquePadId unique_pad_id, bool *out)
IsUsbConnected.
Result hidsysGetHidButtonConfigFull(HidsysUniquePadId unique_pad_id, HidcfgButtonConfigFull *config)
GetHidButtonConfigFull.
Result hidsysIsDefaultButtonConfigFull(const HidcfgButtonConfigFull *config, bool *out)
IsDefaultButtonConfigFull.
Result hidsysHasBattery(HidNpadIdType id, bool *out)
HasBattery.
Result hidsysIsDefaultButtonConfigLeft(const HidcfgButtonConfigLeft *config, bool *out)
IsDefaultButtonConfigLeft.
Result hidsysLegacySetButtonConfigRight(HidsysUniquePadId unique_pad_id, const HidsysButtonConfigRight *config)
Legacy SetButtonConfigRight.
Result hidsysDeleteButtonConfigEmbedded(void)
DeleteButtonConfigEmbedded.
Result hidsysGetHidButtonConfigLeft(HidsysUniquePadId unique_pad_id, HidcfgButtonConfigLeft *config)
GetHidButtonConfigLeft.
HidcfgDigitalButtonAssignment
Selects what button to map to.
Definition: hidsys.h:14
@ HidcfgDigitalButtonAssignment_StickL
Left Stick Button.
Definition: hidsys.h:19
@ HidcfgDigitalButtonAssignment_RightSR
SR on Right controller.
Definition: hidsys.h:34
@ HidcfgDigitalButtonAssignment_HomeButton
HomeButton.
Definition: hidsys.h:35
@ HidcfgDigitalButtonAssignment_Y
Y.
Definition: hidsys.h:18
@ HidcfgDigitalButtonAssignment_Down
Down.
Definition: hidsys.h:30
@ HidcfgDigitalButtonAssignment_X
X.
Definition: hidsys.h:17
@ HidcfgDigitalButtonAssignment_Up
Up.
Definition: hidsys.h:28
@ HidcfgDigitalButtonAssignment_LeftSR
SR on Left controller.
Definition: hidsys.h:32
@ HidcfgDigitalButtonAssignment_B
B.
Definition: hidsys.h:16
@ HidcfgDigitalButtonAssignment_CaptureButton
CaptureButton.
Definition: hidsys.h:36
@ HidcfgDigitalButtonAssignment_L
L.
Definition: hidsys.h:21
@ HidcfgDigitalButtonAssignment_ZL
ZL.
Definition: hidsys.h:23
@ HidcfgDigitalButtonAssignment_Start
Start / Plus.
Definition: hidsys.h:26
@ HidcfgDigitalButtonAssignment_LeftSL
SL on Left controller.
Definition: hidsys.h:31
@ HidcfgDigitalButtonAssignment_A
A.
Definition: hidsys.h:15
@ HidcfgDigitalButtonAssignment_RightSL
SL on Right controller.
Definition: hidsys.h:33
@ HidcfgDigitalButtonAssignment_StickR
Right Stick Button.
Definition: hidsys.h:20
@ HidcfgDigitalButtonAssignment_Invalid
Invalid / Disabled.
Definition: hidsys.h:37
@ HidcfgDigitalButtonAssignment_Left
Left.
Definition: hidsys.h:27
@ HidcfgDigitalButtonAssignment_Select
Select / Minus.
Definition: hidsys.h:25
@ HidcfgDigitalButtonAssignment_Right
Right.
Definition: hidsys.h:29
@ HidcfgDigitalButtonAssignment_R
R.
Definition: hidsys.h:22
@ HidcfgDigitalButtonAssignment_ZR
ZR.
Definition: hidsys.h:24
Result hidsysAcquireCaptureButtonEventHandle(Event *out_event, bool autoclear)
Gets an Event which is signaled when HidCaptureButtonState is updated.
Result hidsysSetHidButtonConfigRight(HidsysUniquePadId unique_pad_id, const HidcfgButtonConfigRight *config)
SetHidButtonConfigRight.
Result hidsysAcquireJoyDetachOnBluetoothOffEventHandle(Event *out_event, bool autoclear)
AcquireJoyDetachOnBluetoothOffEventHandle.
Result hidsysGetButtonConfigStorageEmbedded(s32 index, HidcfgButtonConfigEmbedded *config, HidcfgStorageName *name)
GetButtonConfigStorageEmbedded.
Result hidsysSetButtonConfigRight(BtdrvAddress addr, const HidsysButtonConfigRight *config)
SetButtonConfigRight.
Result hidsysIsDefaultButtonConfigRight(const HidcfgButtonConfigRight *config, bool *out)
IsDefaultButtonConfigRight.
Result hidsysDeleteButtonConfig(BtdrvAddress addr)
DeleteButtonConfig.
Result hidsysIsButtonConfigStorageLeftEmpty(s32 index, bool *out)
IsButtonConfigStorageLeftEmpty.
Service * hidsysGetServiceSession(void)
Gets the Service object for the actual hidsys service session.
Result hidsysApplyNpadSystemCommonPolicy(void)
Applies npad system common policy.
Result hidsysLegacyIsButtonConfigEnabled(HidsysUniquePadId unique_pad_id, bool *out)
Legacy IsButtonConfigEnabled.
Result hidsysGetHidButtonConfigRight(HidsysUniquePadId unique_pad_id, HidcfgButtonConfigRight *config)
GetHidButtonConfigRight.
Result hidsysSetButtonConfigFull(BtdrvAddress addr, const HidsysButtonConfigFull *config)
SetButtonConfigFull.
Result hidsysLegacyGetButtonConfigEmbedded(HidsysUniquePadId unique_pad_id, HidsysButtonConfigEmbedded *config)
Legacy GetButtonConfigEmbedded.
Result hidsysLegacyGetButtonConfigLeft(HidsysUniquePadId unique_pad_id, HidsysButtonConfigLeft *config)
Legacy GetButtonConfigLeft.
Result hidsysGetButtonConfigStorageLeftDeprecated(s32 index, HidcfgButtonConfigLeft *config)
GetButtonConfigStorageLeftDeprecated.
Result hidsysGetButtonConfigFull(BtdrvAddress addr, HidsysButtonConfigFull *config)
GetButtonConfigFull.
Result hidsysSetHidButtonConfigEmbedded(HidsysUniquePadId unique_pad_id, const HidcfgButtonConfigEmbedded *config)
SetHidButtonConfigEmbedded.
Result hidsysLegacyGetButtonConfigFull(HidsysUniquePadId unique_pad_id, HidsysButtonConfigFull *config)
Legacy GetButtonConfigFull.
Result hidsysIsButtonConfigSupported(BtdrvAddress addr, bool *out)
IsButtonConfigSupported.
Result hidsysIsDefaultButtonConfigEmbedded(const HidcfgButtonConfigEmbedded *config, bool *out)
IsDefaultButtonConfigEmbedded.
Result hidsysGetUniquePadControllerNumber(HidsysUniquePadId unique_pad_id, u64 *number)
GetUniquePadControllerNumber.
Result hidsysSetButtonConfigEmbedded(const HidsysButtonConfigEmbedded *config)
SetButtonConfigEmbedded.
Result hidsysSetHidButtonConfigFull(HidsysUniquePadId unique_pad_id, const HidcfgButtonConfigFull *config)
SetHidButtonConfigFull.
Result hidsysGetButtonConfigStorageLeft(s32 index, HidcfgButtonConfigLeft *config, HidcfgStorageName *name)
GetButtonConfigStorageLeft.
Result hidsysGetUniquePadSerialNumber(HidsysUniquePadId unique_pad_id, HidsysUniquePadSerialNumber *serial)
Gets the HidsysUniquePadSerialNumber.
Result hidsysIsButtonConfigEmbeddedEnabled(bool *out)
IsButtonConfigEmbeddedEnabled.
Result hidsysGetLastActiveNpad(u32 *out)
Gets the npad id type of the last controller that was active.
Address.
Definition: btdrv_types.h:214
Kernel-mode event structure.
Definition: event.h:13
HidTouchScreenConfigurationForNx.
Definition: hid.h:687
AnalogStickAssignment.
Definition: hidsys.h:110
u32 rotation
HidcfgAnalogStickRotation
Definition: hidsys.h:111
u8 is_paired_stick_assigned
IsPairedStickAssigned.
Definition: hidsys.h:112
StorageName.
Definition: hidsys.h:194
Mini Cycle struct for HidsysNotificationLedPattern.
Definition: hidsys.h:67
u8 transitionSteps
Fading Transition Steps to Mini Cycle X (Uses PWM). Value 0x0: Instant. Each step duration is based o...
Definition: hidsys.h:69
u8 finalStepDuration
Final Step Duration Multiplier of Mini Cycle X. Value 0x0: 12.5ms, 0x1 - xF: 1x - 15x....
Definition: hidsys.h:70
u8 ledIntensity
Mini Cycle X LED Intensity.
Definition: hidsys.h:68
Structure for hidsysSetNotificationLedPattern.
Definition: hidsys.h:77
u8 totalFullCycles
Number of Full Cycles. Value 0x1-0xF: 1 - 15 full cycles. Value 0x0 is repeat forever,...
Definition: hidsys.h:80
u8 startIntensity
LED Start Intensity. Value 0x0=0% - 0xF=100%.
Definition: hidsys.h:81
u8 totalMiniCycles
Number of Mini Cycles + 1. Value 0x0-0xF: 1 - 16 mini cycles.
Definition: hidsys.h:79
u8 baseMiniCycleDuration
Mini Cycle Base Duration. Value 0x1-0xF: 12.5ms - 187.5ms. Value 0x0 = 0ms/OFF.
Definition: hidsys.h:78
UniquePadId for a controller.
Definition: hidsys.h:57
u64 id
UniquePadId.
Definition: hidsys.h:58
UniquePadSerialNumber.
Definition: hidsys.h:62
Service object structure.
Definition: service.h:14
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
u32 Result
Function error code result type.
Definition: types.h:44
int32_t s32
32-bit signed integer.
Definition: types.h:27
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21