HID services: Difference between revisions

No edit summary
(15 intermediate revisions by 2 users not shown)
Line 8: Line 8:
| 0 || [[#CreateAppletResource]]
| 0 || [[#CreateAppletResource]]
|-
|-
| 1 || ActivateDebugPad
| 1 || [[#ActivateDebugPad]]
|-
|-
| 11 || ActivateTouchScreen
| 11 || [[#ActivateTouchScreen]]
|-
|-
| 21 || ActivateMouse
| 21 || [[#ActivateMouse]]
|-
|-
| 31 || ActivateKeyboard
| 31 || [[#ActivateKeyboard]]
|-
|-
| 32 || [6.0.0+] SendKeyboardLockKeyEvent
| 32 || [6.0.0+] SendKeyboardLockKeyEvent
Line 44: Line 44:
| 65 || GetJoySixAxisSensorLifoHandle
| 65 || GetJoySixAxisSensorLifoHandle
|-
|-
| 66 || StartSixAxisSensor
| 66 || [[#StartSixAxisSensor]]
|-
|-
| 67 || StopSixAxisSensor
| 67 || [[#StopSixAxisSensor]]
|-
|-
| 68 || IsSixAxisSensorFusionEnabled
| 68 || [[#IsSixAxisSensorFusionEnabled]]
|-
|-
| 69 || EnableSixAxisSensorFusion
| 69 || [[#EnableSixAxisSensorFusion]]
|-
|-
| 70 || [[#SetSixAxisSensorFusionParameters]]
| 70 || [[#SetSixAxisSensorFusionParameters]]
Line 58: Line 58:
| 72 || [[#ResetSixAxisSensorFusionParameters]]
| 72 || [[#ResetSixAxisSensorFusionParameters]]
|-
|-
| 73 || SetAccelerometerParameters
| 73 || [[#SetAccelerometerParameters]]
|-
|-
| 74 || GetAccelerometerParameters
| 74 || [[#GetAccelerometerParameters]]
|-
|-
| 75 || ResetAccelerometerParameters
| 75 || [[#ResetAccelerometerParameters]]
|-
|-
| 76 || SetAccelerometerPlayMode
| 76 || [[#SetAccelerometerPlayMode]]
|-
|-
| 77 || GetAccelerometerPlayMode
| 77 || [[#GetAccelerometerPlayMode]]
|-
|-
| 78 || ResetAccelerometerPlayMode
| 78 || [[#ResetAccelerometerPlayMode]]
|-
|-
| 79 || [[#SetGyroscopeZeroDriftMode]]
| 79 || [[#SetGyroscopeZeroDriftMode]]
Line 76: Line 76:
| 81 || [[#ResetGyroscopeZeroDriftMode]]
| 81 || [[#ResetGyroscopeZeroDriftMode]]
|-
|-
| 82 || IsSixAxisSensorAtRest
| 82 || [[#IsSixAxisSensorAtRest]]
|-
|-
| 83 || [6.0.0+] IsFirmwareUpdateAvailableForSixAxisSensor
| 83 || [6.0.0+] [[#IsFirmwareUpdateAvailableForSixAxisSensor]]
|-
|-
| 91 || [[#ActivateGesture]]
| 91 || [[#ActivateGesture]]
Line 94: Line 94:
| 106 || [[#AcquireNpadStyleSetUpdateEventHandle]]
| 106 || [[#AcquireNpadStyleSetUpdateEventHandle]]
|-
|-
| 107 || DisconnectNpad
| 107 || [[#DisconnectNpad]]
|-
|-
| 108 || GetPlayerLedPattern
| 108 || [[#GetPlayerLedPattern]]
|-
|-
| 109 || [5.0.0+] [[#ActivateNpadWithRevision]]
| 109 || [5.0.0+] [[#ActivateNpadWithRevision]]
Line 112: Line 112:
| 125 || [[#MergeSingleJoyAsDualJoy]]
| 125 || [[#MergeSingleJoyAsDualJoy]]
|-
|-
| 126 || StartLrAssignmentMode
| 126 || [[#StartLrAssignmentMode]]
|-
|-
| 127 || StopLrAssignmentMode
| 127 || [[#StopLrAssignmentMode]]
|-
|-
| 128 || SetNpadHandheldActivationMode
| 128 || [[#SetNpadHandheldActivationMode]]
|-
|-
| 129 || [[#GetNpadHandheldActivationMode]]
| 129 || [[#GetNpadHandheldActivationMode]]
|-
|-
| 130 || SwapNpadAssignment
| 130 || [[#SwapNpadAssignment]]
|-
|-
| 131 || IsUnintendedHomeButtonInputProtectionEnabled
| 131 || [[#IsUnintendedHomeButtonInputProtectionEnabled]]
|-
|-
| 132 || EnableUnintendedHomeButtonInputProtection
| 132 || [[#EnableUnintendedHomeButtonInputProtection]]
|-
|-
| 133 || [5.0.0+] SetNpadJoyAssignmentModeSingleWithDestination
| 133 || [5.0.0+] [[#SetNpadJoyAssignmentModeSingleWithDestination]]
|-
|-
| 134 || [6.1.0+] SetNpadAnalogStickUseCenterClamp
| 134 || [6.1.0+] [[#SetNpadAnalogStickUseCenterClamp]]
|-
|-
| 135 || [8.0.0+] SetNpadCaptureButtonAssignment
| 135 || [8.0.0+] [[#SetNpadCaptureButtonAssignment]]
|-
|-
| 136 || [8.0.0+] ClearNpadCaptureButtonAssignment
| 136 || [8.0.0+] [[#ClearNpadCaptureButtonAssignment]]
|-
|-
| 200 || [[#GetVibrationDeviceInfo]]
| 200 || [[#GetVibrationDeviceInfo]]
Line 180: Line 180:
| 310 || [6.0.0+] [[#ResetSevenSixAxisSensorTimestamp]]
| 310 || [6.0.0+] [[#ResetSevenSixAxisSensorTimestamp]]
|-
|-
| 400 || [3.0.0+] IsUsbFullKeyControllerEnabled
| 400 || [3.0.0+] [[#IsUsbFullKeyControllerEnabled]]
|-
|-
| 401 || [3.0.0+] EnableUsbFullKeyController
| 401 || [3.0.0+] [[#EnableUsbFullKeyController]]
|-
|-
| 402 || [3.0.0+] IsUsbFullKeyControllerConnected
| 402 || [3.0.0+] [[#IsUsbFullKeyControllerConnected]]
|-
|-
| 403 || [4.0.0+] HasBattery
| 403 || [4.0.0+] [[#HasBattery]]
|-
|-
| 404 || [4.0.0+] HasLeftRightBattery
| 404 || [4.0.0+] [[#HasLeftRightBattery]]
|-
|-
| 405 || [4.0.0+] [[#GetNpadInterfaceType]]
| 405 || [4.0.0+] [[#GetNpadInterfaceType]]
|-
|-
| 406 || [4.0.0+] GetNpadLeftRightInterfaceType
| 406 || [4.0.0+] [[#GetNpadLeftRightInterfaceType]]
|-
|-
| 407 || [10.0.0+] GetNpadOfHighestBatteryLevel ([9.0.0+] GetNpadOfHighestBatteryLevelForJoyLeft)
| 407 || [10.0.0+] [[#GetNpadOfHighestBatteryLevel]] ([9.0.0+] GetNpadOfHighestBatteryLevelForJoyLeft)
|-
|-
| 408 || [9.0.0-9.2.0] GetNpadOfHighestBatteryLevelForJoyRight
| 408 || [9.0.0-9.2.0] GetNpadOfHighestBatteryLevelForJoyRight
Line 271: Line 271:
== CreateAppletResource ==
== CreateAppletResource ==
Takes a PID and an u64 [[AM_services|AppletResourceUserId]]. Returns an [[#IAppletResource]].
Takes a PID and an u64 [[AM_services|AppletResourceUserId]]. Returns an [[#IAppletResource]].
== ActivateDebugPad ==
Takes a PID and an [[AM_services|AppletResourceUserId]], no output.
== ActivateTouchScreen ==
Takes a PID and an [[AM_services|AppletResourceUserId]], no output.
== ActivateMouse ==
Takes a PID and an [[AM_services|AppletResourceUserId]], no output.
== ActivateKeyboard ==
Takes a PID and an [[AM_services|AppletResourceUserId]], no output.
== StartSixAxisSensor ==
Takes a PID, a [[#SixAxisSensorHandle]], and an [[AM_services|AppletResourceUserId]], no output.
== StopSixAxisSensor ==
Takes a PID, a [[#SixAxisSensorHandle]], and an [[AM_services|AppletResourceUserId]], no output.
== IsSixAxisSensorFusionEnabled ==
Takes a PID, a [[#SixAxisSensorHandle]], and an [[AM_services|AppletResourceUserId]], returns an output bool.
== EnableSixAxisSensorFusion ==
Takes a PID, a bool, a [[#SixAxisSensorHandle]], and an [[AM_services|AppletResourceUserId]], no output.


== SetSixAxisSensorFusionParameters ==
== SetSixAxisSensorFusionParameters ==
Line 282: Line 306:
== ResetSixAxisSensorFusionParameters ==
== ResetSixAxisSensorFusionParameters ==
Takes a PID-descriptor, an u32 [[#SixAxisSensorHandle]], and an u64 [[AM_services|AppletResourceUserId]], no output.
Takes a PID-descriptor, an u32 [[#SixAxisSensorHandle]], and an u64 [[AM_services|AppletResourceUserId]], no output.
== SetAccelerometerParameters ==
Takes a PID, a [[#SixAxisSensorHandle]], two floats, and an [[AM_services|AppletResourceUserId]], no output.
sdknso will throw an error before using this cmd, if either of the floats are less than 0.0f, or when the second float is larger than the first float.
sdknso 10.x removed the nn::hid wrapper for this.
== GetAccelerometerParameters ==
Takes a PID, a [[#SixAxisSensorHandle]], and an [[AM_services|AppletResourceUserId]], returns two output floats.
sdknso 10.x removed the nn::hid wrapper for this.
== ResetAccelerometerParameters ==
Takes a PID, a [[#SixAxisSensorHandle]], and an [[AM_services|AppletResourceUserId]], no output.
sdknso 10.x removed the nn::hid wrapper for this.
== SetAccelerometerPlayMode ==
Takes a PID, a [[#SixAxisSensorHandle]], an u32 [[#AccelerometerPlayMode]], and an u64 [[AM_services|AppletResourceUserId]], no output.
sdknso 10.x removed the nn::hid wrapper for this.
== GetAccelerometerPlayMode ==
Takes a PID, a [[#SixAxisSensorHandle]], and an [[AM_services|AppletResourceUserId]], returns an output u32 [[#AccelerometerPlayMode]].
sdknso 10.x removed the nn::hid wrapper for this.
== ResetAccelerometerPlayMode ==
Takes a PID, a [[#SixAxisSensorHandle]], and an [[AM_services|AppletResourceUserId]], no output.
sdknso 10.x removed the nn::hid wrapper for this.


== SetGyroscopeZeroDriftMode ==
== SetGyroscopeZeroDriftMode ==
Line 295: Line 351:


Same as [[#SetGyroscopeZeroDriftMode]] except the [[#GyroscopeZeroDriftMode]] is hard-coded to value 1 (Standard).
Same as [[#SetGyroscopeZeroDriftMode]] except the [[#GyroscopeZeroDriftMode]] is hard-coded to value 1 (Standard).
== IsSixAxisSensorAtRest ==
Takes a PID, a [[#SixAxisSensorHandle]], and an [[AM_services|AppletResourceUserId]], returns an output bool.
== IsFirmwareUpdateAvailableForSixAxisSensor ==
Takes a PID, a [[#SixAxisSensorHandle]], and an [[AM_services|AppletResourceUserId]], returns an output bool.


== ActivateGesture ==
== ActivateGesture ==
Line 326: Line 388:


The value for the last u64 doesn't seem to matter (?): official sw sets this to the address of the structure used for storing the event which is initialized after using this cmd.
The value for the last u64 doesn't seem to matter (?): official sw sets this to the address of the structure used for storing the event which is initialized after using this cmd.
== DisconnectNpad ==
Takes a PID, an u32 [[#NpadIdType]], and an [[AM_services|AppletResourceUserId]]. No output.
== GetPlayerLedPattern ==
Takes an input u32 [[#NpadIdType]], returns an output u64 (which is exposed by sdknso as an u8).


== ActivateNpadWithRevision ==
== ActivateNpadWithRevision ==
Line 351: Line 419:
== SetNpadJoyAssignmentModeSingle ==
== SetNpadJoyAssignmentModeSingle ==
Takes a PID-descriptor, an u32, [[AM_services|AppletResourceUserId]], and s64 [[#NpadJoyDeviceType]]. No output.
Takes a PID-descriptor, an u32, [[AM_services|AppletResourceUserId]], and s64 [[#NpadJoyDeviceType]]. No output.
This eventually runs the same code as [[#SetNpadJoyAssignmentModeSingleWithDestination]], except the output fields aren't exposed.


== SetNpadJoyAssignmentModeDual ==
== SetNpadJoyAssignmentModeDual ==
Line 357: Line 427:
== MergeSingleJoyAsDualJoy ==
== MergeSingleJoyAsDualJoy ==
Takes a PID-descriptor, two u32s, and an [[AM_services|AppletResourceUserId]]. No output.
Takes a PID-descriptor, two u32s, and an [[AM_services|AppletResourceUserId]]. No output.
== StartLrAssignmentMode ==
Takes a PID and an [[AM_services|AppletResourceUserId]], no output.
== StopLrAssignmentMode ==
Takes a PID and an [[AM_services|AppletResourceUserId]], no output.
== SetNpadHandheldActivationMode ==
Takes a PID, an [[AM_services|AppletResourceUserId]], a s64 [[#NpadHandheldActivationMode]], no output.


== GetNpadHandheldActivationMode ==
== GetNpadHandheldActivationMode ==
Takes a PID and an u64 [[AM_services|AppletResourceUserId]]. Returns an output [[#NpadHandheldActivationMode]]. Official user-processes Abort if the output u64 is not 0-2.
Takes a PID and an u64 [[AM_services|AppletResourceUserId]]. Returns an output s64 [[#NpadHandheldActivationMode]]. Official user-processes Abort if the output value is not 0-2.
 
== SwapNpadAssignment ==
Takes a PID, two u32s [[#NpadIdType]], and an [[AM_services|AppletResourceUserId]]. No output.
 
== IsUnintendedHomeButtonInputProtectionEnabled ==
Takes a PID, an u32 [[#NpadIdType]], and an [[AM_services|AppletResourceUserId]]. Returns an output bool.
 
Unused by sdknso, the flag from [[#NpadSystemProperties]] is used instead.
 
== EnableUnintendedHomeButtonInputProtection ==
Takes a PID, a bool, an u32 [[#NpadIdType]], and an [[AM_services|AppletResourceUserId]]. No output.
 
== SetNpadJoyAssignmentModeSingleWithDestination ==
Takes a PID, an u32, an [[AM_services|AppletResourceUserId]], and s64 [[#NpadJoyDeviceType]]. Returns an output bool and u32 [[#NpadIdType]].
 
The bool indicates whether the output [[#NpadIdType]] is set.
 
== SetNpadAnalogStickUseCenterClamp ==
Takes a PID, a bool, an [[AM_services|AppletResourceUserId]], no output.
 
== SetNpadCaptureButtonAssignment ==
Takes a PID, a [[#NpadStyleSet]], an [[AM_services|AppletResourceUserId]], a [[#NpadButtonSet]], no output.
 
Only 1 bit can be set in the [[#NpadStyleSet]].
 
== ClearNpadCaptureButtonAssignment ==
Takes a PID, an [[AM_services|AppletResourceUserId]], no output.


== GetVibrationDeviceInfo ==
== GetVibrationDeviceInfo ==
Line 486: Line 592:
== ResetSevenSixAxisSensorTimestamp ==
== ResetSevenSixAxisSensorTimestamp ==
Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output.
Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output.
== IsUsbFullKeyControllerEnabled ==
No input, returns an output bool.
== EnableUsbFullKeyController ==
Takes an input bool, no output.
== IsUsbFullKeyControllerConnected ==
Takes an input u32 [[#NpadIdType]], returns an output bool.
== HasBattery ==
Takes an input u32, returns an output bool.
sdknso only exposes the hidsys version of this cmd.
== HasLeftRightBattery ==
Takes an input u32, returns two output bools.
sdknso only exposes the hidsys version of this cmd.


== GetNpadInterfaceType ==
== GetNpadInterfaceType ==
Takes an input u32 NpadIdType, returns an output u8 [[#NpadInterfaceType]].
Takes an input u32 [[#NpadIdType]], returns an output u8 [[#NpadInterfaceType]].


The NpadInterfaceType must be 1-4, otherwise this will assert.
The NpadInterfaceType must be 1-4, otherwise this will Abort.
 
sdknso only exposes the hidsys version of this cmd.
 
== GetNpadLeftRightInterfaceType ==
Takes an input u32 [[#NpadIdType]], returns two output u8s [[#NpadInterfaceType]].
 
sdknso only exposes the hidsys version of this cmd.
 
== GetNpadOfHighestBatteryLevel ==
Takes a PID, a type-0x9 input buffer containing an array of u32 [[#NpadIdType]], an u64 [[AM_services|AppletResourceUserId]], returns an output u32 [[#NpadIdType]].


== IAppletResource ==
== IAppletResource ==
Line 5,824: Line 5,959:
= NpadHandheldActivationMode =
= NpadHandheldActivationMode =
This is "nn::hid::NpadHandheldActivationMode".
This is "nn::hid::NpadHandheldActivationMode".
This controls how many joycons must be attached for handheld mode to be triggered (Dual = 2, Single = 1, None = 0).


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 5,832: Line 5,969:
|-
|-
| 1 || Single
| 1 || Single
|-
| 2 || None
|}
|}


Line 5,846: Line 5,985:
|}
|}


= AppletFooterUiType =
= AppletDetailedUiType =
This is "nn::hid::system::AppletFooterUiType".
This is "nn::hid::system::AppletDetailedUiType".
 
{| class="wikitable" border="1"
!  Value
!  Description
|-
| 0x00000000 || None
|-
| 0x01000000 || HandheldNone
|-
| 0x02000000 || HandheldJoyConLeftOnly
|-
| 0x02000001 || HandheldLarkHvc1Only
|-
| 0x02000002 || HandheldLarkNesLeftOnly
|-
| 0x03000000 || HandheldJoyConRightOnly
|-
| 0x03000001 || HandheldLarkHvc2Only
|-
| 0x03000002 || HandheldLarkNesRightOnly
|-
| 0x04000000 || HandheldJoyConLeftJoyConRight
|-
| 0x04000001 || HandheldJoyConLeftLarkHvc2
|-
| 0x04000002 || HandheldJoyConLeftLarkNesRight
|-
| 0x04000003 || HandheldLarkHvc1JoyConRight
|-
| 0x04000004 || HandheldLarkHvc1LarkHvc2
|-
| 0x04000005 || HandheldLarkHvc1LarkNesRight
|-
| 0x04000006 || HandheldLarkNesLeftJoyConRight
|-
| 0x04000007 || HandheldLarkNesLeftLarkHvc2
|-
| 0x04000008 || HandheldLarkNesLeftLarkNesRight
|-
| 0x05000000 || JoyDual
|-
| 0x06000000 || JoyDualLeftOnly
|-
| 0x07000000 || JoyDualRightOnly
|-
| 0x08000000 || JoyLeftHorizontal
|-
| 0x09000000 || JoyLeftVertical
|-
| 0x0A000000 || JoyRightHorizontal
|-
| 0x0B000000 || JoyRightVertical
|-
| 0x0C000000 || SwitchProController
|-
| 0x0D000000 || CompatibleProController
|-
| 0x0E000000 || CompatibleJoyCon
|-
| 0x0F000000 || LarkHvc1
|-
| 0x10000000 || LarkHvc2
|-
| 0x11000000 || LarkNesLeft
|-
| 0x12000000 || LarkNesRight
|-
| 0x13000000 || LuciaU
|-
| 0x13000001 || LuciaJ
|-
| 0x13000002 || LuciaE
|-
| 0x14000000 || Verification
|-
| 0xFFFFFFFF || Unknown
|}
 
= AppletFooterUiType =
This is "nn::hid::system::AppletFooterUiType".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 6,322: Line 6,541:
{| class="wikitable" border="1"
{| class="wikitable" border="1"
!  Value
!  Value
!  Name
!  Description
!  Description
|-
|-
| 0 || Stop
| 0 || Stop || Stops the vibration with a decay phase.
|-
|-
| 1 || Start
| 1 || Start || Starts the vibration.
|-
|-
| 2 ||  
| 2 || StopHard || Stops the vibration immediately, with no decay phase.
|}
|}
= AccelerometerPlayMode =
This is "nn::hid::debug::AccelerometerPlayMode" (pre-10.0.0 this is "nn::hid::AccelerometerPlayMode").


= GyroscopeZeroDriftMode =
= GyroscopeZeroDriftMode =
Line 6,764: Line 6,987:
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x44 (4*17) || [[#ButtonConfig]], for the following buttons: DLeft, DUp, DRight, DDown, A, B, X, Y, L-Stick, R-Stick, L, R, ZL, ZR, -, +, Capture.
| 0x0 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonLeft]]
|-
|-
| 0x44 || 0x8 || [[#JoystickConfig]], for the left-stick.
| 0x4 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonUp]]
|-
|-
| 0x4C || 0x8 || [[#JoystickConfig]], for the right-stick.
| 0x8 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonRight]]
|-
| 0xC || 0x4 || [[#DigitalButtonAssignment|HardwareButtonDown]]
|-
| 0x10 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonA]]
|-
| 0x14 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonB]]
|-
| 0x18 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonX]]
|-
| 0x1C || 0x4 || [[#DigitalButtonAssignment|HardwareButtonY]]
|-
| 0x20 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonStickL]]
|-
| 0x24 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonStickR]]
|-
| 0x28 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonL]]
|-
| 0x2C || 0x4 || [[#DigitalButtonAssignment|HardwareButtonR]]
|-
| 0x30 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonZL]]
|-
| 0x34 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonZR]]
|-
| 0x38 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonSelect]]
|-
| 0x3C || 0x4 || [[#DigitalButtonAssignment|HardwareButtonStart]]
|-
| 0x40 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonCapture]]
|-
| 0x44 || 0x8 || [[#AnalogStickAssignment|HardwareStickL]]
|-
| 0x4C || 0x8 || [[#AnalogStickAssignment|HardwareStickR]]
|}
|}


== ButtonConfig ==
== DigitalButtonAssignment ==
u32 button mapping config. Must be value 0 - 22, which selects what button to map to.
This is "nn::hidconfig::DigitalButtonAssignment".


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 6,778: Line 7,033:
!  Description
!  Description
|-
|-
| 0 || A
| 0 || DigitalButtonAssignment_A
|-
|-
| 1 || B
| 1 || DigitalButtonAssignment_B
|-
|-
| 2 || X
| 2 || DigitalButtonAssignment_X
|-
|-
| 3 || Y
| 3 || DigitalButtonAssignment_Y
|-
|-
| 4 || L-Stick
| 4 || DigitalButtonAssignment_StickL
|-
|-
| 5 || R-Stick
| 5 || DigitalButtonAssignment_StickR
|-
|-
| 6 || L
| 6 || DigitalButtonAssignment_L
|-
|-
| 7 || R
| 7 || DigitalButtonAssignment_R
|-
|-
| 8 || ZL
| 8 || DigitalButtonAssignment_ZL
|-
|-
| 9 || ZR
| 9 || DigitalButtonAssignment_ZR
|-
|-
| 10 || -
| 10 || DigitalButtonAssignment_Select
|-
|-
| 11 || +
| 11 || DigitalButtonAssignment_Start
|-
|-
| 12 || DLeft
| 12 || DigitalButtonAssignment_Left
|-
|-
| 13 || DUp
| 13 || DigitalButtonAssignment_Up
|-
|-
| 14 || DRight
| 14 || DigitalButtonAssignment_Right
|-
|-
| 15 || DDown
| 15 || DigitalButtonAssignment_Down
|-
|-
| 16 || SL_Left
| 16 || DigitalButtonAssignment_LeftSL
|-
|-
| 17 || SR_Left
| 17 || DigitalButtonAssignment_LeftSR
|-
|-
| 18 || SL_Right
| 18 || DigitalButtonAssignment_RightSL
|-
|-
| 19 || SR_Right
| 19 || DigitalButtonAssignment_RightSR
|-
|-
| 20 || HOME
| 20 || DigitalButtonAssignment_HomeButton
|-
|-
| 21 || Capture
| 21 || DigitalButtonAssignment_CaptureButton
|-
|-
| 22 || Disabled
| 22 || DigitalButtonAssignment_Invalid
|}
|}


== JoystickConfig ==
== AnalogStickAssignment ==
This is "nn::hidconfig::AnalogStickAssignment".
 
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x4 || Orientation. 0 = default, 1 = enabled for Left, 2 = enabled for Right.
| 0x0 || 0x4 || [[#AnalogStickRotation]]
|-
|-
| 0x4 || 0x1 || StickChange
| 0x4 || 0x1 || IsPairedStickAssigned
|-
|-
| 0x5 || 0x3 || Padding
| 0x5 || 0x3 || Padding
|}
== AnalogStickRotation ==
This is "nn::hidconfig::AnalogStickRotation".
{| class="wikitable" border="1"
!  Value
!  Description
|-
| 0 || AnalogStickRotation_None
|-
| 1 || AnalogStickRotation_Clockwise90
|-
| 2 || AnalogStickRotation_Anticlockwise90
|}
|}


Line 6,849: Line 7,120:
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x2C (4*11) || [[#ButtonConfig]], for the following buttons: DLeft, DUp, DRight, DDown, L-Stick, L, ZL, -, SL_Left, SR_Left, Capture.
| 0x0 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonLeft]]
|-
| 0x4 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonUp]]
|-
| 0x8 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonRight]]
|-
| 0xC || 0x4 || [[#DigitalButtonAssignment|HardwareButtonDown]]
|-
| 0x10 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonStickL]]
|-
| 0x14 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonL]]
|-
| 0x18 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonZL]]
|-
| 0x1C || 0x4 || [[#DigitalButtonAssignment|HardwareButtonSelect]]
|-
| 0x20 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonLeftSL]]
|-
| 0x24 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonLeftSR]]
|-
|-
| 0x2C || 0x8 || [[#JoystickConfig]]
| 0x28 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonCapture]]
|-
| 0x2C || 0x8 || [[#AnalogStickAssignment|HardwareStickL]]
|}
|}


Line 6,861: Line 7,152:
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x28 (4*10) || [[#ButtonConfig]], for the following buttons: A, B, X, Y, R-Stick, R, ZR, +, SL_Right, SR_Right.
| 0x0 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonA]]
|-
| 0x4 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonB]]
|-
| 0x8 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonX]]
|-
| 0xC || 0x4 || [[#DigitalButtonAssignment|HardwareButtonY]]
|-
| 0x10 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonStickR]]
|-
| 0x14 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonR]]
|-
| 0x18 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonZR]]
|-
| 0x1C || 0x4 || [[#DigitalButtonAssignment|HardwareButtonStart]]
|-
| 0x20 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonRightSL]]
|-
| 0x24 || 0x4 || [[#DigitalButtonAssignment|HardwareButtonRightSR]]
|-
|-
| 0x28 || 0x8 || [[#JoystickConfig]]
| 0x28 || 0x8 || [[#AnalogStickAssignment|HardwareStickR]]
|}
|}


Line 7,523: Line 7,832:
!  Description
!  Description
|-
|-
| 0 || sdknso uses <code>GetJoyDisableSixAxisPollingDataAccessor</code> with this.
| 0 || JoyPollingMode_SixAxisSensorDisable
|-
|-
| 1 || sdknso uses <code>GetJoyEnableSixAxisPollingDataAccessor</code> with this.
| 1 || JoyPollingMode_SixAxisSensorEnable
|-
|-
| 2 || [6.0.0+] sdknso uses <code>GetJoyButtonOnlyPollingDataAccessor</code> with this.
| 2 || JoyPollingMode_ButtonOnly
|}
|}