Go to the documentation of this file.
8 #include "../services/hid.h"
9 #include "../services/hidsys.h"
10 #include "../sf/service.h"
u32 singleColorBody
RGBA Single Body Color.
Definition: hiddbg.h:67
State for overriding HidMouseState.
Definition: hiddbg.h:33
Result hiddbgAcquireOperationEventHandle(Event *out_event, bool autoclear, HidsysUniquePadId unique_pad_id)
Get the OperationEvent for the specified UniquePad.
u8 npadInterfaceType
HidNpadInterfaceType. Additional type field used with the above type field (only applies to type bit0...
Definition: hiddbg.h:69
s32 wheel_delta
WheelDelta.
Definition: hiddbg.h:38
u32 unk_x8
Unknown.
Definition: hiddbg.h:125
u32 colorRightGrip
[9.0.0+] RGBA Right Grip Color.
Definition: hiddbg.h:81
u32 type
Type. Converted to HiddbgHdlsDeviceInfoV7::type internally by hiddbgSetAutoPilotVirtualPadState....
Definition: hiddbg.h:189
HidVector six_axis_sensor_acceleration
VirtualSixAxisSensorAcceleration.
Definition: hiddbg.h:115
HiddbgHdlsDeviceInfoV7 device
HiddbgHdlsDeviceInfoV7. With hiddbgApplyHdlsStateList this is only used when creating new devices.
Definition: hiddbg.h:142
@ HiddbgNpadButton_Capture
Capture button.
Definition: hiddbg.h:15
u32 battery_level
BatteryLevel for the main PowerInfo, see HidPowerInfo.
Definition: hiddbg.h:89
u8 indicator
Indicator. Unused for input.
Definition: hiddbg.h:118
u32 pad
Padding.
Definition: hiddbg.h:178
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
State for overriding HidKeyboardState.
Definition: hiddbg.h:44
HidVector six_axis_sensor_angle
VirtualSixAxisSensorAngle.
Definition: hiddbg.h:116
s32 total_entries
Total entries for the below entries.
Definition: hiddbg.h:148
Result hiddbgSetKeyboardAutoPilotState(const HiddbgKeyboardAutoPilotState *state)
SetKeyboardAutoPilotState.
Result hiddbgUpdateControllerColor(u32 colorBody, u32 colorButtons, HidsysUniquePadId unique_pad_id)
Writes the input RGB colors to the spi-flash for the specified UniquePad (offset 0x6050 size 0x6).
Kernel-mode event structure.
Definition: event.h:13
u64 id
Id.
Definition: hiddbg.h:61
u64 buttons
See HiddbgNpadButton. [9.0.0+] Masked with 0xfffffffff00fffff.
Definition: hiddbg.h:101
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hiddbg.h:91
u32 unk_xc
Unknown.
Definition: hiddbg.h:126
u8 unk_x18
Unknown.
Definition: hiddbg.h:128
Result hiddbgUnsetKeyboardAutoPilotState(void)
UnsetKeyboardAutoPilotState.
Result hiddbgSetSleepButtonAutoPilotState(const HiddbgSleepButtonAutoPilotState *state)
SetSleepButtonAutoPilotState.
Result hiddbgUnsetTouchScreenAutoPilotState(void)
UnsetTouchScreenAutoPilotState.
Result hiddbgSetTouchScreenAutoPilotState(const HidTouchState *states, s32 count)
SetTouchScreenAutoPilotState.
Result hiddbgIsHdlsVirtualDeviceAttached(HiddbgHdlsSessionId session_id, HiddbgHdlsHandle handle, bool *out)
Checks if the given device is still attached.
s32 delta_x
DeltaX.
Definition: hiddbg.h:36
State for overriding HidDebugPadState.
Definition: hiddbg.h:25
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hiddbg.h:28
AbstractedPadState.
Definition: hiddbg.h:188
u32 flags
Used to set the main PowerInfo for HidNpadSystemProperties. BIT(0) -> IsPowered, BIT(1) -> IsCharging...
Definition: hiddbg.h:111
@ HiddbgHdlsAttribute_HasVirtualSixAxisSensorAcceleration
HasVirtualSixAxisSensorAcceleration.
Definition: hiddbg.h:20
Result hiddbgInitialize(void)
Initialize hiddbg.
HiddbgHdlsHandle handle
HiddbgHdlsHandle
Definition: hiddbg.h:141
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hiddbg.h:29
Result hiddbgGetAbstractedPadsState(HiddbgAbstractedPadHandle *handles, HiddbgAbstractedPadState *states, s32 count, s32 *total_out)
Similar to hiddbgGetAbstractedPadHandles except this also returns the state for each pad in output ar...
u32 attributes
Bitfield of HidDebugPadAttribute.
Definition: hiddbg.h:26
u32 battery_level
BatteryLevel for the main PowerInfo, see HidPowerInfo.
Definition: hiddbg.h:99
int32_t s32
32-bit signed integer.
Definition: types.h:27
Result hiddbgUpdateDesignInfo(u32 colorBody, u32 colorButtons, u32 colorLeftGrip, u32 colorRightGrip, u8 inval, HidsysUniquePadId unique_pad_id)
Writes the input RGB colors followed by inval to the spi-flash for the specified UniquePad (offset 0x...
@ HiddbgNpadButton_Home
HOME button.
Definition: hiddbg.h:14
Result hiddbgGetUniquePadDeviceTypeSetInternal(HidsysUniquePadId unique_pad_id, u32 *out)
Gets the internal DeviceType for the specified controller.
s32 x
X.
Definition: hiddbg.h:34
HiddbgHdlsDeviceInfo device
HiddbgHdlsDeviceInfo. With hiddbgApplyHdlsStateList this is only used when creating new devices.
Definition: hiddbg.h:170
HiddbgHdlsAttribute
HdlsAttribute.
Definition: hiddbg.h:19
Result hiddbgUnsetAllAutoPilotVirtualPadState(void)
Clears AutoPilot state for all pads set by hiddbgSetAutoPilotVirtualPadState.
Result hiddbgReadSerialFlash(u32 offset, void *buffer, size_t size, HidsysUniquePadId unique_pad_id)
Reads spi-flash for the specified UniquePad.
HdlsNpadAssignment. Same controllers as HiddbgHdlsStateList, with different entry data.
Definition: hiddbg.h:133
HdlsState, for [7.0.0-8.1.0].
Definition: hiddbg.h:85
s32 delta_y
DeltaY.
Definition: hiddbg.h:37
u8 npadInterfaceType
See HiddbgHdlsDeviceInfo::npadInterfaceType.
Definition: hiddbg.h:195
u32 deviceTypeInternal
Only one bit can be set. BIT(N*4+0) = Pro-Controller, BIT(N*4+1) = Joy-Con Left, BIT(N*4+2) = Joy-Con...
Definition: hiddbg.h:66
HiddbgHdlsDeviceInfo device
HiddbgHdlsDeviceInfo. With hiddbgApplyHdlsStateList this is only used when creating new devices.
Definition: hiddbg.h:156
Result hiddbgUnsetDebugPadAutoPilotState(void)
UnsetDebugPadAutoPilotState.
u8 is_powered
IsPowered for the main PowerInfo, see HidNpadSystemProperties.
Definition: hiddbg.h:86
Result hiddbgUnsetAutoPilotVirtualPadState(s8 AbstractedVirtualPadId)
Clears AutoPilot state for the specified pad set by hiddbgSetAutoPilotVirtualPadState.
Result hiddbgSetDebugPadAutoPilotState(const HiddbgDebugPadAutoPilotState *state)
SetDebugPadAutoPilotState.
HdlsStateListEntry, for [9.0.0-11.0.1].
Definition: hiddbg.h:154
u32 singleColorButtons
RGBA Single Buttons Color.
Definition: hiddbg.h:68
Result hiddbgReleaseHdlsWorkBuffer(HiddbgHdlsSessionId session_id)
Exit Hdls, must be called at some point prior to hiddbgExit.
s32 total_entries
Total entries for the below entries.
Definition: hiddbg.h:134
Result hiddbgGetAbstractedPadState(HiddbgAbstractedPadHandle handle, HiddbgAbstractedPadState *state)
Gets the state for the specified HiddbgAbstractedPadHandle.
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
u8 flags
Flags. Only bit0 is used by hiddbgSetAutoPilotVirtualPadState, when clear it will skip using the rest...
Definition: hiddbg.h:190
Result hiddbgSetAutoPilotVirtualPadState(s8 AbstractedVirtualPadId, const HiddbgAbstractedPadState *state)
Sets AutoPilot state for the specified pad.
u64 buttons
See HiddbgNpadButton. [9.0.0+] Masked with 0xfffffffff00fffff.
Definition: hiddbg.h:112
u32 buttons
Bitfield of HidDebugPadButton.
Definition: hiddbg.h:27
s32 y
Y.
Definition: hiddbg.h:35
HdlsStateListV7, for [7.0.0-8.1.0]. This contains a list of all controllers, including non-virtual co...
Definition: hiddbg.h:147
HdlsHandle.
Definition: hiddbg.h:55
int8_t s8
8-bit signed integer.
Definition: types.h:25
@ HiddbgHdlsAttribute_HasVirtualSixAxisSensorAngle
HasVirtualSixAxisSensorAngle.
Definition: hiddbg.h:21
u32 pad
Padding.
Definition: hiddbg.h:149
HidAnalogStickState.
Definition: hid.h:560
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
u64 handle
Handle.
Definition: hiddbg.h:184
HidTouchState.
Definition: hid.h:624
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hiddbg.h:102
u32 flags
Used to set the main PowerInfo for HidNpadSystemProperties. BIT(0) -> IsPowered, BIT(1) -> IsCharging...
Definition: hiddbg.h:100
s32 total_entries
Total entries for the below entries.
Definition: hiddbg.h:162
u8 npadInterfaceType
HidNpadInterfaceType. Additional type field used with the above type field (only applies to HidDevice...
Definition: hiddbg.h:76
u32 Result
Function error code result type.
Definition: types.h:44
u64 modifiers
Bitfield of HidKeyboardModifier.
Definition: hiddbg.h:45
HiddbgHdlsHandle handle
HiddbgHdlsHandle
Definition: hiddbg.h:169
HiddbgHdlsHandle handle
HiddbgHdlsHandle
Definition: hiddbg.h:155
Result hiddbgUnsetSleepButtonAutoPilotState(void)
UnsetSleepButtonAutoPilotState.
Result hiddbgGetAbstractedPadHandles(HiddbgAbstractedPadHandle *handles, s32 count, s32 *total_out)
Gets a list of HiddbgAbstractedPadHandle.
Result hiddbgDeactivateHomeButton(void)
Deactivates the HomeButton.
Result hiddbgWriteSerialFlash(u32 offset, void *buffer, size_t tmem_size, size_t size, HidsysUniquePadId unique_pad_id)
Writes spi-flash for the specified UniquePad.
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hiddbg.h:103
HdlsState, for [12.0.0+].
Definition: hiddbg.h:109
u32 battery_level
BatteryLevel for the main PowerInfo, see HidPowerInfo.
Definition: hiddbg.h:110
u32 attributes
Bitfield of HidMouseAttribute.
Definition: hiddbg.h:40
HdlsStateList, for [12.0.0+].
Definition: hiddbg.h:176
HdlsSessionId, returned by hiddbgAttachHdlsWorkBuffer.
Definition: hiddbg.h:60
Result hiddbgDetachHdlsVirtualDevice(HiddbgHdlsHandle handle)
Detach the specified device.
Result hiddbgUnsetMouseAutoPilotState(void)
UnsetMouseAutoPilotState.
u32 singleColorButtons
RGBA Single Buttons Color.
Definition: hiddbg.h:194
void hiddbgExit(void)
Exit hiddbg.
HdlsState, for [9.0.0-11.0.1].
Definition: hiddbg.h:98
HiddbgHdlsHandle handle
HiddbgHdlsHandle
Definition: hiddbg.h:124
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hiddbg.h:92
u8 deviceType
HidDeviceType
Definition: hiddbg.h:75
Result hiddbgDumpHdlsStates(HiddbgHdlsSessionId session_id, HiddbgHdlsStateList *state)
Gets state for HiddbgHdlsStateList.
HdlsDeviceInfo, for [9.0.0+]. Converted to/from HiddbgHdlsDeviceInfoV7 on prior sysvers.
Definition: hiddbg.h:74
u8 indicator
Indicator. Unused for input. Set with output from hiddbgDumpHdlsStates. Not set by hiddbgGetAbstracte...
Definition: hiddbg.h:93
u32 buttons
Bitfield of HidMouseButton.
Definition: hiddbg.h:39
HidVector.
Definition: hid.h:566
HidAnalogStickState analog_stick_l
AnalogStickL.
Definition: hiddbg.h:113
u32 pad
Padding.
Definition: hiddbg.h:163
u32 singleColorBody
RGBA Single Body Color.
Definition: hiddbg.h:78
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:54
Result hiddbgApplyHdlsStateList(HiddbgHdlsSessionId session_id, const HiddbgHdlsStateList *state)
Sets state for HiddbgHdlsStateList.
u32 singleColorButtons
RGBA Single Buttons Color.
Definition: hiddbg.h:79
Service object structure.
Definition: service.h:13
UniquePadId for a controller.
Definition: hidsys.h:48
Result hiddbgGetOperationResult(HidsysUniquePadId unique_pad_id)
Get the Result for the Operation and handles cleanup, for the specified UniquePad.
HiddbgHdlsStateV7 state
HiddbgHdlsStateV7
Definition: hiddbg.h:143
HiddbgNpadButton
HiddbgNpadButton. For the remaining buttons, see HidNpadButton.
Definition: hiddbg.h:13
u64 handle
Handle.
Definition: hiddbg.h:56
u8 flags
ORRed with IsPowered to set the value of the first byte for HidNpadSystemProperties....
Definition: hiddbg.h:87
u32 attribute
Bitfield of HiddbgHdlsAttribute.
Definition: hiddbg.h:117
Result hiddbgAttachHdlsVirtualDevice(HiddbgHdlsHandle *handle, const HiddbgHdlsDeviceInfo *info)
Attach a device with the input info.
Result hiddbgApplyHdlsNpadAssignmentState(HiddbgHdlsSessionId session_id, const HiddbgHdlsNpadAssignment *state, bool flag)
Sets state for HiddbgHdlsNpadAssignment.
s32 total_entries
Total entries for the below entries.
Definition: hiddbg.h:177
Result hiddbgSetMouseAutoPilotState(const HiddbgMouseAutoPilotState *state)
SetMouseAutoPilotState.
Result hiddbgSetHdlsState(HiddbgHdlsHandle handle, const HiddbgHdlsState *state)
Sets state for the specified device.
u32 singleColorBody
RGBA Single Body Color.
Definition: hiddbg.h:193
HidAnalogStickState analog_stick_r
AnalogStickR.
Definition: hiddbg.h:114
u64 unk_x10
Unknown.
Definition: hiddbg.h:127
HdlsStateList, for [9.0.0-11.0.1].
Definition: hiddbg.h:161
u8 indicator
Indicator. Unused for input. Set with output from hiddbgDumpHdlsStates.
Definition: hiddbg.h:104
HdlsStateListEntryV7, for [7.0.0-8.1.0].
Definition: hiddbg.h:140
u32 buttons
See HiddbgNpadButton.
Definition: hiddbg.h:90
u32 colorLeftGrip
[9.0.0+] RGBA Left Grip Color.
Definition: hiddbg.h:80
HdlsStateListEntry, for [12.0.0+].
Definition: hiddbg.h:168
Result hiddbgAttachHdlsWorkBuffer(HiddbgHdlsSessionId *session_id)
Initialize Hdls.
HdlsDeviceInfo, for [7.0.0-8.1.0].
Definition: hiddbg.h:65
AbstractedPadHandle.
Definition: hiddbg.h:183
u32 pad
Padding.
Definition: hiddbg.h:135
Result hiddbgDumpHdlsNpadAssignmentState(HiddbgHdlsSessionId session_id, HiddbgHdlsNpadAssignment *state)
Gets state for HiddbgHdlsNpadAssignment.
Service * hiddbgGetServiceSession(void)
Gets the Service object for the actual hiddbg service session.
HiddbgHdlsStateV7 state
State.
Definition: hiddbg.h:198
HdlsNpadAssignmentEntry.
Definition: hiddbg.h:123