libnx
v4.7.0
|
hid:dbg service IPC wrapper. More...
#include "../types.h"
#include "../services/hid.h"
#include "../services/hidsys.h"
#include "../sf/service.h"
Go to the source code of this file.
Data Structures | |
struct | HiddbgDebugPadAutoPilotState |
State for overriding HidDebugPadState. More... | |
struct | HiddbgMouseAutoPilotState |
State for overriding HidMouseState. More... | |
struct | HiddbgKeyboardAutoPilotState |
State for overriding HidKeyboardState. More... | |
struct | HiddbgSleepButtonAutoPilotState |
State for overriding SleepButtonState. More... | |
struct | HiddbgHdlsHandle |
HdlsHandle. More... | |
struct | HiddbgHdlsSessionId |
HdlsSessionId, returned by hiddbgAttachHdlsWorkBuffer. More... | |
struct | HiddbgHdlsDeviceInfoV7 |
HdlsDeviceInfo, for [7.0.0-8.1.0]. More... | |
struct | HiddbgHdlsDeviceInfo |
HdlsDeviceInfo, for [9.0.0+]. Converted to/from HiddbgHdlsDeviceInfoV7 on prior sysvers. More... | |
struct | HiddbgHdlsStateV7 |
HdlsState, for [7.0.0-8.1.0]. More... | |
struct | HiddbgHdlsStateV9 |
HdlsState, for [9.0.0-11.0.1]. More... | |
struct | HiddbgHdlsState |
HdlsState, for [12.0.0+]. More... | |
struct | HiddbgHdlsNpadAssignmentEntry |
HdlsNpadAssignmentEntry. More... | |
struct | HiddbgHdlsNpadAssignment |
HdlsNpadAssignment. Same controllers as HiddbgHdlsStateList, with different entry data. More... | |
struct | HiddbgHdlsStateListEntryV7 |
HdlsStateListEntryV7, for [7.0.0-8.1.0]. More... | |
struct | HiddbgHdlsStateListV7 |
HdlsStateListV7, for [7.0.0-8.1.0]. This contains a list of all controllers, including non-virtual controllers. More... | |
struct | HiddbgHdlsStateListEntryV9 |
HdlsStateListEntry, for [9.0.0-11.0.1]. More... | |
struct | HiddbgHdlsStateListV9 |
HdlsStateList, for [9.0.0-11.0.1]. More... | |
struct | HiddbgHdlsStateListEntry |
HdlsStateListEntry, for [12.0.0+]. More... | |
struct | HiddbgHdlsStateList |
HdlsStateList, for [12.0.0+]. More... | |
struct | HiddbgAbstractedPadHandle |
AbstractedPadHandle. More... | |
struct | HiddbgAbstractedPadState |
AbstractedPadState. More... | |
Enumerations | |
enum | HiddbgNpadButton { HiddbgNpadButton_Home = (1U<<( 18 )) , HiddbgNpadButton_Capture = (1U<<( 19 )) } |
HiddbgNpadButton. For the remaining buttons, see HidNpadButton. More... | |
enum | HiddbgHdlsAttribute { HiddbgHdlsAttribute_HasVirtualSixAxisSensorAcceleration = (1U<<( 0 )) , HiddbgHdlsAttribute_HasVirtualSixAxisSensorAngle = (1U<<( 1 )) } |
HdlsAttribute. More... | |
Functions | |
Result | hiddbgInitialize (void) |
Initialize hiddbg. | |
void | hiddbgExit (void) |
Exit hiddbg. | |
Service * | hiddbgGetServiceSession (void) |
Gets the Service object for the actual hiddbg service session. | |
Result | hiddbgSetDebugPadAutoPilotState (const HiddbgDebugPadAutoPilotState *state) |
SetDebugPadAutoPilotState. More... | |
Result | hiddbgUnsetDebugPadAutoPilotState (void) |
UnsetDebugPadAutoPilotState. | |
Result | hiddbgSetTouchScreenAutoPilotState (const HidTouchState *states, s32 count) |
SetTouchScreenAutoPilotState. More... | |
Result | hiddbgUnsetTouchScreenAutoPilotState (void) |
UnsetTouchScreenAutoPilotState. | |
Result | hiddbgSetMouseAutoPilotState (const HiddbgMouseAutoPilotState *state) |
SetMouseAutoPilotState. More... | |
Result | hiddbgUnsetMouseAutoPilotState (void) |
UnsetMouseAutoPilotState. | |
Result | hiddbgSetKeyboardAutoPilotState (const HiddbgKeyboardAutoPilotState *state) |
SetKeyboardAutoPilotState. More... | |
Result | hiddbgUnsetKeyboardAutoPilotState (void) |
UnsetKeyboardAutoPilotState. | |
Result | hiddbgDeactivateHomeButton (void) |
Deactivates the HomeButton. | |
Result | hiddbgSetSleepButtonAutoPilotState (const HiddbgSleepButtonAutoPilotState *state) |
SetSleepButtonAutoPilotState. More... | |
Result | hiddbgUnsetSleepButtonAutoPilotState (void) |
UnsetSleepButtonAutoPilotState. | |
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). More... | |
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 0x6050 size 0xD). More... | |
Result | hiddbgAcquireOperationEventHandle (Event *out_event, bool autoclear, HidsysUniquePadId unique_pad_id) |
Get the OperationEvent for the specified UniquePad. More... | |
Result | hiddbgReadSerialFlash (u32 offset, void *buffer, size_t size, HidsysUniquePadId unique_pad_id) |
Reads spi-flash for the specified UniquePad. More... | |
Result | hiddbgWriteSerialFlash (u32 offset, void *buffer, size_t tmem_size, size_t size, HidsysUniquePadId unique_pad_id) |
Writes spi-flash for the specified UniquePad. More... | |
Result | hiddbgGetOperationResult (HidsysUniquePadId unique_pad_id) |
Get the Result for the Operation and handles cleanup, for the specified UniquePad. More... | |
Result | hiddbgGetUniquePadDeviceTypeSetInternal (HidsysUniquePadId unique_pad_id, u32 *out) |
Gets the internal DeviceType for the specified controller. More... | |
AbstractedPad | |
This is for virtual HID controllers. Only use this on pre-7.0.0, Hdls should be used otherwise. | |
Result | hiddbgGetAbstractedPadHandles (HiddbgAbstractedPadHandle *handles, s32 count, s32 *total_out) |
Gets a list of HiddbgAbstractedPadHandle. More... | |
Result | hiddbgGetAbstractedPadState (HiddbgAbstractedPadHandle handle, HiddbgAbstractedPadState *state) |
Gets the state for the specified HiddbgAbstractedPadHandle. More... | |
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 array states. More... | |
Result | hiddbgSetAutoPilotVirtualPadState (s8 AbstractedVirtualPadId, const HiddbgAbstractedPadState *state) |
Sets AutoPilot state for the specified pad. More... | |
Result | hiddbgUnsetAutoPilotVirtualPadState (s8 AbstractedVirtualPadId) |
Clears AutoPilot state for the specified pad set by hiddbgSetAutoPilotVirtualPadState. More... | |
Result | hiddbgUnsetAllAutoPilotVirtualPadState (void) |
Clears AutoPilot state for all pads set by hiddbgSetAutoPilotVirtualPadState. | |
Hdls | |
This is for virtual HID controllers. | |
Result | hiddbgAttachHdlsWorkBuffer (HiddbgHdlsSessionId *session_id, void *buffer, size_t size) |
Initialize Hdls. More... | |
Result | hiddbgReleaseHdlsWorkBuffer (HiddbgHdlsSessionId session_id) |
Exit Hdls, must be called at some point prior to hiddbgExit. More... | |
Result | hiddbgIsHdlsVirtualDeviceAttached (HiddbgHdlsSessionId session_id, HiddbgHdlsHandle handle, bool *out) |
Checks if the given device is still attached. More... | |
Result | hiddbgDumpHdlsNpadAssignmentState (HiddbgHdlsSessionId session_id, HiddbgHdlsNpadAssignment *state) |
Gets state for HiddbgHdlsNpadAssignment. More... | |
Result | hiddbgDumpHdlsStates (HiddbgHdlsSessionId session_id, HiddbgHdlsStateList *state) |
Gets state for HiddbgHdlsStateList. More... | |
Result | hiddbgApplyHdlsNpadAssignmentState (HiddbgHdlsSessionId session_id, const HiddbgHdlsNpadAssignment *state, bool flag) |
Sets state for HiddbgHdlsNpadAssignment. More... | |
Result | hiddbgApplyHdlsStateList (HiddbgHdlsSessionId session_id, const HiddbgHdlsStateList *state) |
Sets state for HiddbgHdlsStateList. More... | |
Result | hiddbgAttachHdlsVirtualDevice (HiddbgHdlsHandle *handle, const HiddbgHdlsDeviceInfo *info) |
Attach a device with the input info. More... | |
Result | hiddbgDetachHdlsVirtualDevice (HiddbgHdlsHandle handle) |
Detach the specified device. More... | |
Result | hiddbgSetHdlsState (HiddbgHdlsHandle handle, const HiddbgHdlsState *state) |
Sets state for the specified device. More... | |
hid:dbg service IPC wrapper.
enum HiddbgHdlsAttribute |
enum HiddbgNpadButton |
HiddbgNpadButton. For the remaining buttons, see HidNpadButton.
Enumerator | |
---|---|
HiddbgNpadButton_Home | HOME button. |
HiddbgNpadButton_Capture | Capture button. |
Result hiddbgAcquireOperationEventHandle | ( | Event * | out_event, |
bool | autoclear, | ||
HidsysUniquePadId | unique_pad_id | ||
) |
Get the OperationEvent for the specified UniquePad.
[out] | out_event | Output Event. |
[in] | autoclear | The autoclear for the Event. |
[in] | unique_pad_id | HidsysUniquePadId |
Result hiddbgApplyHdlsNpadAssignmentState | ( | HiddbgHdlsSessionId | session_id, |
const HiddbgHdlsNpadAssignment * | state, | ||
bool | flag | ||
) |
Sets state for HiddbgHdlsNpadAssignment.
[in] | session_id | [13.0.0+] HiddbgHdlsSessionId |
[in] | state | HiddbgHdlsNpadAssignment |
[in] | flag | Flag |
Result hiddbgApplyHdlsStateList | ( | HiddbgHdlsSessionId | session_id, |
const HiddbgHdlsStateList * | state | ||
) |
Sets state for HiddbgHdlsStateList.
[in] | session_id | [13.0.0+] HiddbgHdlsSessionId |
[in] | state | HiddbgHdlsStateList |
Result hiddbgAttachHdlsVirtualDevice | ( | HiddbgHdlsHandle * | handle, |
const HiddbgHdlsDeviceInfo * | info | ||
) |
Attach a device with the input info.
[out] | handle | HiddbgHdlsHandle |
[in] | info | HiddbgHdlsDeviceInfo |
Result hiddbgAttachHdlsWorkBuffer | ( | HiddbgHdlsSessionId * | session_id, |
void * | buffer, | ||
size_t | size | ||
) |
Initialize Hdls.
[out] | session_id | [13.0.0+] HiddbgHdlsSessionId |
[in] | buffer | An existing buffer to be used as transfer memory. |
[in] | size | Size of the supplied buffer. |
Result hiddbgDetachHdlsVirtualDevice | ( | HiddbgHdlsHandle | handle | ) |
Detach the specified device.
[in] | handle | HiddbgHdlsHandle |
Result hiddbgDumpHdlsNpadAssignmentState | ( | HiddbgHdlsSessionId | session_id, |
HiddbgHdlsNpadAssignment * | state | ||
) |
Gets state for HiddbgHdlsNpadAssignment.
[in] | session_id | [13.0.0+] HiddbgHdlsSessionId |
[out] | state | HiddbgHdlsNpadAssignment |
Result hiddbgDumpHdlsStates | ( | HiddbgHdlsSessionId | session_id, |
HiddbgHdlsStateList * | state | ||
) |
Gets state for HiddbgHdlsStateList.
[in] | session_id | [13.0.0+] HiddbgHdlsSessionId |
[out] | state | HiddbgHdlsStateList |
Result hiddbgGetAbstractedPadHandles | ( | HiddbgAbstractedPadHandle * | handles, |
s32 | count, | ||
s32 * | total_out | ||
) |
Gets a list of HiddbgAbstractedPadHandle.
[out] | handles | Output array of HiddbgAbstractedPadHandle. |
[in] | count | Max number of entries for the handles array. |
[out] | total_out | Total output entries. |
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 array states.
[out] | handles | Output array of HiddbgAbstractedPadHandle. |
[out] | states | Output array of HiddbgAbstractedPadState. |
[in] | count | Max number of entries for the handles/states arrays. |
[out] | total_out | Total output entries. |
Result hiddbgGetAbstractedPadState | ( | HiddbgAbstractedPadHandle | handle, |
HiddbgAbstractedPadState * | state | ||
) |
Gets the state for the specified HiddbgAbstractedPadHandle.
[in] | handle | HiddbgAbstractedPadHandle |
[out] | state | HiddbgAbstractedPadState |
Result hiddbgGetOperationResult | ( | HidsysUniquePadId | unique_pad_id | ) |
Get the Result for the Operation and handles cleanup, for the specified UniquePad.
[in] | unique_pad_id | HidsysUniquePadId |
Result hiddbgGetUniquePadDeviceTypeSetInternal | ( | HidsysUniquePadId | unique_pad_id, |
u32 * | out | ||
) |
Gets the internal DeviceType for the specified controller.
[in] | unique_pad_id | HidsysUniquePadId |
[out] | out | Pre-9.0.0 this is an u32, with [9.0.0+] it's an u8. |
Result hiddbgIsHdlsVirtualDeviceAttached | ( | HiddbgHdlsSessionId | session_id, |
HiddbgHdlsHandle | handle, | ||
bool * | out | ||
) |
Checks if the given device is still attached.
[in] | session_id | [13.0.0+] HiddbgHdlsSessionId |
[in] | handle | HiddbgHdlsHandle |
[out] | out | Whether the device is attached. |
Result hiddbgReadSerialFlash | ( | u32 | offset, |
void * | buffer, | ||
size_t | size, | ||
HidsysUniquePadId | unique_pad_id | ||
) |
Reads spi-flash for the specified UniquePad.
[in] | offset | Offset in spi-flash. |
[out] | buffer | Output buffer. |
[in] | size | Output buffer size. |
[in] | unique_pad_id | HidsysUniquePadId |
Result hiddbgReleaseHdlsWorkBuffer | ( | HiddbgHdlsSessionId | session_id | ) |
Exit Hdls, must be called at some point prior to hiddbgExit.
[in] | session_id | [13.0.0+] HiddbgHdlsSessionId |
Result hiddbgSetAutoPilotVirtualPadState | ( | s8 | AbstractedVirtualPadId, |
const HiddbgAbstractedPadState * | state | ||
) |
Sets AutoPilot state for the specified pad.
[in] | AbstractedVirtualPadId | This can be any unique value as long as it's within bounds. For example, 0-7 is usable. |
[in] | state | HiddbgAbstractedPadState |
Result hiddbgSetDebugPadAutoPilotState | ( | const HiddbgDebugPadAutoPilotState * | state | ) |
SetDebugPadAutoPilotState.
[in] | state | HiddbgDebugPadAutoPilotState |
Result hiddbgSetHdlsState | ( | HiddbgHdlsHandle | handle, |
const HiddbgHdlsState * | state | ||
) |
Sets state for the specified device.
[in] | handle | HiddbgHdlsHandle |
[in] | state | HiddbgHdlsState |
Result hiddbgSetKeyboardAutoPilotState | ( | const HiddbgKeyboardAutoPilotState * | state | ) |
SetKeyboardAutoPilotState.
[in] | state | HiddbgKeyboardAutoPilotState |
Result hiddbgSetMouseAutoPilotState | ( | const HiddbgMouseAutoPilotState * | state | ) |
SetMouseAutoPilotState.
[in] | state | HiddbgMouseAutoPilotState |
Result hiddbgSetSleepButtonAutoPilotState | ( | const HiddbgSleepButtonAutoPilotState * | state | ) |
SetSleepButtonAutoPilotState.
[in] | state | HiddbgSleepButtonAutoPilotState |
Result hiddbgSetTouchScreenAutoPilotState | ( | const HidTouchState * | states, |
s32 | count | ||
) |
SetTouchScreenAutoPilotState.
[in] | states | Input array of HiddbgMouseAutoPilotState. |
[in] | count | Total entries in the states array. Max is 16. |
Clears AutoPilot state for the specified pad set by hiddbgSetAutoPilotVirtualPadState.
[in] | AbstractedVirtualPadId | Id from hiddbgSetAutoPilotVirtualPadState. |
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).
[in] | colorBody | RGB body color. |
[in] | colorButtons | RGB buttons color. |
[in] | unique_pad_id | HidsysUniquePadId |
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 0x6050 size 0xD).
[in] | colorBody | RGB body color. |
[in] | colorButtons | RGB buttons color. |
[in] | colorLeftGrip | RGB left grip color. |
[in] | colorRightGrip | RGB right grip color. |
[in] | inval | Input value. |
[in] | unique_pad_id | HidsysUniquePadId |
Result hiddbgWriteSerialFlash | ( | u32 | offset, |
void * | buffer, | ||
size_t | tmem_size, | ||
size_t | size, | ||
HidsysUniquePadId | unique_pad_id | ||
) |
Writes spi-flash for the specified UniquePad.
[in] | offset | Offset in spi-flash. |
[in] | buffer | Input buffer, must be 0x1000-byte aligned. |
[in] | tmem_size | Size of the buffer, must be 0x1000-byte aligned. |
[in] | size | Actual transfer size. |
[in] | unique_pad_id | HidsysUniquePadId |