HID services: Difference between revisions
No edit summary |
|||
Line 358: | Line 358: | ||
== 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 | The NpadInterfaceType must be 1-4, otherwise this will assert. | ||
== VibrationDeviceHandle == | == VibrationDeviceHandle == | ||
Line 463: | Line 463: | ||
== NpadIdType == | == NpadIdType == | ||
This is an u32. This is the controller index used in [[HID_Shared_Memory#Controllers|sharedmem]]. 0x20 is handheld. | This is an u32. This is the controller index used in [[HID_Shared_Memory#Controllers|sharedmem]]. 0x20 is handheld. | ||
== NpadInterfaceType == | |||
This is the output u8 returned by [[#GetNpadInterfaceType]]. | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
! Notes | |||
|- | |||
| 1 || Bluetooth || | |||
|- | |||
| 2 || Rail || | |||
|- | |||
| 3 || USB || | |||
|- | |||
| 4 || Unknown || | |||
|} | |||
= hid:dbg = | = hid:dbg = | ||
Line 826: | Line 843: | ||
| 0xC || 0x4 || RGBA Single Buttons Color | | 0xC || 0x4 || RGBA Single Buttons Color | ||
|- | |- | ||
| 0x10 || 0x1 || See [[#HiddbgHdlsDeviceInfo]]::[[# | | 0x10 || 0x1 || See [[#HiddbgHdlsDeviceInfo]]::[[#NpadInterfaceType]]. | ||
|- | |- | ||
| 0x11 || 0x3 || Padding | | 0x11 || 0x3 || Padding | ||
Line 959: | Line 976: | ||
| 0x8 || 0x4 || RGBA Single Buttons Color | | 0x8 || 0x4 || RGBA Single Buttons Color | ||
|- | |- | ||
| 0xC || 0x1 || [[# | | 0xC || 0x1 || [[#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 971: | Line 988: | ||
| 0x0 || 0x1 || Type value, must match certain values (not used with the below table). | | 0x0 || 0x1 || Type value, must match certain values (not used with the below table). | ||
|- | |- | ||
| 0x1 || 0x1 || [[# | | 0x1 || 0x1 || [[#NpadInterfaceType]]. Similar to the field from the old struct. | ||
|- | |- | ||
| 0x2 || 0x2 || Padding | | 0x2 || 0x2 || Padding |