HID services: Difference between revisions

(4 intermediate revisions by the same user not shown)
Line 192: Line 192:
| 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
Line 356: Line 356:
== ResetSevenSixAxisSensorTimestamp ==
== ResetSevenSixAxisSensorTimestamp ==
Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output.
Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output.
== GetNpadInterfaceType ==
Takes an input u32 NpadIdType, returns an output u8 NpadInterfaceType.
The NpadInterfaceType must be 1-4, otherwise this will assert.


== VibrationDeviceHandle ==
== VibrationDeviceHandle ==
Line 803: Line 808:
== SetHdlsState ==
== SetHdlsState ==
Takes an input [[#HdlsState]] and an input 8-byte '''HdlsHandle''', no output.
Takes an input [[#HdlsState]] and an input 8-byte '''HdlsHandle''', no output.
[9.0.0+] Input order was swapped: now takes an input 8-byte '''HdlsHandle''' and a [[#HdlsState]], no output.


== AbstractedPadState ==
== AbstractedPadState ==
Line 819: Line 826:
| 0xC || 0x4 || RGBA Single Buttons Color
| 0xC || 0x4 || RGBA Single Buttons Color
|-
|-
| 0x10 || 0x1 || Type2. See [[#HiddbgHdlsDeviceInfo]]::type2.
| 0x10 || 0x1 || See [[#HiddbgHdlsDeviceInfo]]::[[#GetNpadInterfaceType|NpadInterfaceType]].
|-
|-
| 0x11 || 0x3 || Padding
| 0x11 || 0x3 || Padding
Line 952: Line 959:
| 0x8 || 0x4 || RGBA Single Buttons Color
| 0x8 || 0x4 || RGBA Single Buttons Color
|-
|-
| 0xC || 0x1 || Additional type field used with the above type field, if the value doesn't match one of the following a default is used. Type Pro-Controller: value 0x3 indicates that the controller is connected via USB. Type bit21: value 0x3 = unknown. When value is 0x2, state is merged with an existing controller (when the type value is compatible with this). Otherwise, it's a dedicated controller.
| 0xC || 0x1 || [[#GetNpadInterfaceType|NpadInterfaceType]]. Additional type field used with the above type field, if the value doesn't match one of the following a default is used. Type Pro-Controller: value 0x3 indicates that the controller is connected via USB. Type bit21: value 0x3 = unknown. When value is 0x2, state is merged with an existing controller (when the type value is compatible with this). Otherwise, it's a dedicated controller.
|-
|-
| 0xD || 0x3 || Padding
| 0xD || 0x3 || Padding
Line 962: Line 969:
! Offset || Size || Description
! Offset || Size || Description
|-
|-
| 0x0 || 0x1 || Unknown
| 0x0 || 0x1 || Type value, must match certain values (not used with the below table).
|-
|-
| 0x1 || 0x1 || Unknown
| 0x1 || 0x1 || [[#GetNpadInterfaceType|NpadInterfaceType]]. Similar to the field from the old struct.
|-
|-
| 0x2 || 0x2 || Padding
| 0x2 || 0x2 || Padding