HID services: Difference between revisions
No edit summary |
|||
(32 intermediate revisions by 2 users not shown) | |||
Line 54: | Line 54: | ||
| 69 || EnableSixAxisSensorFusion | | 69 || EnableSixAxisSensorFusion | ||
|- | |- | ||
| 70 || SetSixAxisSensorFusionParameters | | 70 || [[#SetSixAxisSensorFusionParameters]] | ||
|- | |- | ||
| 71 || GetSixAxisSensorFusionParameters | | 71 || [[#GetSixAxisSensorFusionParameters]] | ||
|- | |- | ||
| 72 || ResetSixAxisSensorFusionParameters | | 72 || [[#ResetSixAxisSensorFusionParameters]] | ||
|- | |- | ||
| 73 || SetAccelerometerParameters | | 73 || SetAccelerometerParameters | ||
Line 72: | Line 72: | ||
| 78 || ResetAccelerometerPlayMode | | 78 || ResetAccelerometerPlayMode | ||
|- | |- | ||
| 79 || SetGyroscopeZeroDriftMode | | 79 || [[#SetGyroscopeZeroDriftMode]] | ||
|- | |- | ||
| 80 || GetGyroscopeZeroDriftMode | | 80 || [[#GetGyroscopeZeroDriftMode]] | ||
|- | |- | ||
| 81 || ResetGyroscopeZeroDriftMode | | 81 || [[#ResetGyroscopeZeroDriftMode]] | ||
|- | |- | ||
| 82 || IsSixAxisSensorAtRest | | 82 || IsSixAxisSensorAtRest | ||
Line 90: | Line 90: | ||
| 102 || [[#SetSupportedNpadIdType]] | | 102 || [[#SetSupportedNpadIdType]] | ||
|- | |- | ||
| 103 || ActivateNpad | | 103 || [[#ActivateNpad]] | ||
|- | |- | ||
| 104 || DeactivateNpad | | 104 || [[#DeactivateNpad]] | ||
|- | |- | ||
| 106 || [[#AcquireNpadStyleSetUpdateEventHandle]] | | 106 || [[#AcquireNpadStyleSetUpdateEventHandle]] | ||
Line 100: | Line 100: | ||
| 108 || GetPlayerLedPattern | | 108 || GetPlayerLedPattern | ||
|- | |- | ||
| 109 || [5.0.0+] ActivateNpadWithRevision | | 109 || [5.0.0+] [[#ActivateNpadWithRevision]] | ||
|- | |- | ||
| 120 || SetNpadJoyHoldType | | 120 || [[#SetNpadJoyHoldType]] | ||
|- | |- | ||
| 121 || GetNpadJoyHoldType | | 121 || [[#GetNpadJoyHoldType]] | ||
|- | |- | ||
| 122 || [[#SetNpadJoyAssignmentModeSingleByDefault]] | | 122 || [[#SetNpadJoyAssignmentModeSingleByDefault]] | ||
Line 160: | Line 160: | ||
| 211 || [7.0.0+] [[#IsVibrationDeviceMounted]] | | 211 || [7.0.0+] [[#IsVibrationDeviceMounted]] | ||
|- | |- | ||
| 300 || [3.0.0+] ActivateConsoleSixAxisSensor | | 300 || [3.0.0+] [[#ActivateConsoleSixAxisSensor]] | ||
|- | |- | ||
| 301 || [3.0.0+] StartConsoleSixAxisSensor | | 301 || [3.0.0+] StartConsoleSixAxisSensor | ||
Line 196: | Line 196: | ||
| 406 || [4.0.0+] GetNpadLeftRightInterfaceType | | 406 || [4.0.0+] GetNpadLeftRightInterfaceType | ||
|- | |- | ||
| 407 || [9.0.0+] | | 407 || [9.0.0+] GetNpadOfHighestBatteryLevelForJoyLeft | ||
|- | |- | ||
| 408 || [9.0.0+] | | 408 || [9.0.0+] GetNpadOfHighestBatteryLevelForJoyRight | ||
|- | |- | ||
| 500 || [5.0.0+] GetPalmaConnectionHandle | | 500 || [5.0.0+] GetPalmaConnectionHandle | ||
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]]. | ||
== SetSixAxisSensorFusionParameters == | |||
Takes a PID-descriptor, an u32 [[#SixAxisSensorHandle]], two floats, and an u64 [[AM_services|AppletResourceUserId]], no output. | |||
Official sw will throw an error before using this cmd, if the first float is outside of the bounds of 0.0f-1.0f. | |||
== GetSixAxisSensorFusionParameters == | |||
Takes a PID-descriptor, an u32 [[#SixAxisSensorHandle]], and an u64 [[AM_services|AppletResourceUserId]], returns two output floats. | |||
== ResetSixAxisSensorFusionParameters == | |||
Takes a PID-descriptor, an u32 [[#SixAxisSensorHandle]], and an u64 [[AM_services|AppletResourceUserId]], no output. | |||
== SetGyroscopeZeroDriftMode == | |||
Takes a PID-descriptor, an u32 [[#SixAxisSensorHandle]], an u32 [[#GyroscopeZeroDriftMode]], and an u64 [[AM_services|AppletResourceUserId]], no output. | |||
== GetGyroscopeZeroDriftMode == | |||
Takes a PID-descriptor, an u32 [[#SixAxisSensorHandle]], and an u64 [[AM_services|AppletResourceUserId]], returns an output u32 [[#GyroscopeZeroDriftMode]]. | |||
Gets the value written by [[#SetGyroscopeZeroDriftMode]]. | |||
== ResetGyroscopeZeroDriftMode == | |||
Takes a PID-descriptor, an u32 [[#SixAxisSensorHandle]], and an u64 [[AM_services|AppletResourceUserId]], no output. | |||
Same as [[#SetGyroscopeZeroDriftMode]] except the [[#GyroscopeZeroDriftMode]] is hard-coded to value 1 (Standard). | |||
== SetSupportedNpadStyleSet == | == SetSupportedNpadStyleSet == | ||
Line 282: | Line 306: | ||
The input buffer contains an array of u32 [[#NpadIdType]]. | The input buffer contains an array of u32 [[#NpadIdType]]. | ||
== ActivateNpad == | |||
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output. | |||
On newer sysvers this runs the same code as [[#ActivateNpadWithRevision]], with revision=0. | |||
== DeactivateNpad == | |||
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. No output. | |||
This just returns 0. | |||
== AcquireNpadStyleSetUpdateEventHandle == | == AcquireNpadStyleSetUpdateEventHandle == | ||
Takes an input u32, an u64 [[AM_services|AppletResourceUserId]], and an u64. Returns an output event handle, autoclear for this is user-specified. | Takes a PID, an input u32, an u64 [[AM_services|AppletResourceUserId]], and an u64. Returns an output event handle, autoclear for this is user-specified. | ||
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. | ||
== ActivateNpadWithRevision == | |||
Takes a PID-descriptor, a s32 revision, and an [[AM_services|AppletResourceUserId]]. No output. | |||
Revisions: | |||
* 0x0: Initial [[#ActivateNpad|revision]], pre-5.0.0. | |||
* 0x1: [5.0.0+] | |||
* 0x2: [6.0.0+] | |||
* 0x3: [8.0.0+] | |||
== SetNpadJoyHoldType == | |||
Takes a PID-descriptor, a s64, and an [[AM_services|AppletResourceUserId]]. No output. | |||
== GetNpadJoyHoldType == | |||
Takes a PID-descriptor and an [[AM_services|AppletResourceUserId]]. Returns an output s64. | |||
== SetNpadJoyAssignmentModeSingleByDefault == | == SetNpadJoyAssignmentModeSingleByDefault == | ||
Line 329: | Line 378: | ||
== IsVibrationDeviceMounted == | == IsVibrationDeviceMounted == | ||
Takes a | Takes a PID, an [[#VibrationDeviceHandle]], and an u64 [[AM_services|AppletResourceUserId]], returns an output u8 bool. | ||
== ActivateConsoleSixAxisSensor == | |||
Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output. | |||
== ActivateSevenSixAxisSensor == | == ActivateSevenSixAxisSensor == | ||
Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output. | Takes a PID and an u64 [[AM_services|AppletResourceUserId]], no output. | ||
Unused by official sw, [[#ActivateConsoleSixAxisSensor]] is used instead. However, internally ActivateSevenSixAxisSensor is identical to [[#ActivateConsoleSixAxisSensor]]. Deactivation is done with hiddbg DeactivateConsoleSixAxisSensor (which is unused by official sw). | |||
== StartSevenSixAxisSensor == | == StartSevenSixAxisSensor == | ||
Line 362: | Line 416: | ||
The NpadInterfaceType must be 1-4, otherwise this will assert. | The NpadInterfaceType must be 1-4, otherwise this will assert. | ||
== IAppletResource == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
== IAppletResource == | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |- | ||
| 0 || [[#GetSharedMemoryHandle]] | | 0 || [[#GetSharedMemoryHandle]] | ||
Line 395: | Line 439: | ||
=== ActivateVibrationDevice === | === ActivateVibrationDevice === | ||
Takes an input [[#VibrationDeviceHandle]]. No output. | Takes an input [[#VibrationDeviceHandle]]. No output. | ||
== GyroscopeZeroDriftMode == | |||
This is "nn::hid::GyroscopeZeroDriftMode". | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 || Loose | |||
|- | |||
| 1 || Standard | |||
|- | |||
| 2 || Tight | |||
|} | |||
== SixAxisSensorHandle == | |||
This is an u32. | |||
== VibrationDeviceHandle == | |||
This is an u32. | |||
== VibrationDeviceInfo == | |||
This is a 0x8-byte struct. | |||
== VibrationValue == | |||
This is a 0x10-byte struct, which contains 4 float values. | |||
== NpadStyleTag == | == NpadStyleTag == | ||
Line 618: | Line 688: | ||
| 227 || [5.0.0+] GetRxPacketHistory | | 227 || [5.0.0+] GetRxPacketHistory | ||
|- | |- | ||
| 228 || [6.0.0+] AcquireOperationEventHandle | | 228 || [6.0.0+] [[#AcquireOperationEventHandle]] | ||
|- | |- | ||
| 229 || [6.0.0+] [[#ReadSerialFlash]] | | 229 || [6.0.0+] [[#ReadSerialFlash]] | ||
|- | |- | ||
| 230 || [6.0.0+] WriteSerialFlash | | 230 || [6.0.0+] [[#WriteSerialFlash]] | ||
|- | |- | ||
| 231 || [6.0.0+] GetOperationResult | | 231 || [6.0.0+] [[#GetOperationResult]] | ||
|- | |- | ||
| 232 || [6.0.0+] EnableShipmentMode | | 232 || [6.0.0+] EnableShipmentMode | ||
Line 746: | Line 816: | ||
[9.0.0+] Now takes a total of 8-bytes of input and a type-0x6 output buffer, returns a total of 8-bytes of output. | [9.0.0+] Now takes a total of 8-bytes of input and a type-0x6 output buffer, returns a total of 8-bytes of output. | ||
== AcquireOperationEventHandle == | |||
Takes an input u64 '''UniquePadId''', returns an output Event handle. The EventClearMode used by official sw is user-specified. | |||
This is not used internally by sdk-nso besides exposing it to the user. With the sdk-nso for [9.0.0+] the wrapper funcs for this was removed (sdk-nso still has the actual cmd). | |||
This must be used before [[#ReadSerialFlash]]/[[#WriteSerialFlash]]. Afterwards, this Event is used to wait for the async operation started by [[#ReadSerialFlash]]/[[#WriteSerialFlash]] to finish. After waiting on the Event, [[#GetOperationResult]] should be used. | |||
== ReadSerialFlash == | == ReadSerialFlash == | ||
Line 752: | Line 829: | ||
Reads from the specified controller's spi-flash. The input size is the original size without page-alignment. The TransferMemory permissions is RW-. | Reads from the specified controller's spi-flash. The input size is the original size without page-alignment. The TransferMemory permissions is RW-. | ||
This | See also [[#AcquireOperationEventHandle]]. | ||
With the sdk-nso for [9.0.0+] the wrapper funcs for this was removed (sdk-nso still has the actual cmd). | |||
== WriteSerialFlash == | |||
Takes an input TransferMemory handle, an input u32 offset, an input u64 tmem_size, an input u64 size, and an u64 '''UniquePadId''', no output. | |||
Writes to the specified controller's spi-flash. The TransferMemory permissions is R--. | |||
See also [[#AcquireOperationEventHandle]]. | |||
With the sdk-nso for [9.0.0+] the wrapper funcs for this was removed (sdk-nso still has the actual cmd). | |||
== GetOperationResult == | |||
Takes an input u64 '''UniquePadId''', no output. | |||
Get the Result for the Operation and handles cleanup, for the specified controller. | |||
This is not used internally by sdk-nso besides exposing it to the user. With the sdk-nso for [9.0.0+] the wrapper funcs for this was removed (sdk-nso still has the actual cmd). | |||
== GetUniquePadDeviceTypeSetInternal == | == GetUniquePadDeviceTypeSetInternal == | ||
Takes an input u64 '''UniquePadId''', returns | Takes an input u64 '''UniquePadId''', returns an [[#DeviceTypeInternal]]. | ||
== GetAbstractedPadHandles == | == GetAbstractedPadHandles == | ||
Line 970: | Line 1,063: | ||
! Offset || Size || Description | ! Offset || Size || Description | ||
|- | |- | ||
| 0x0 || 0x4 || | | 0x0 || 0x4 || [[#DeviceTypeInternal]] | ||
|- | |- | ||
| 0x4 || 0x4 || RGBA Single Body Color | | 0x4 || 0x4 || RGBA Single Body Color | ||
Line 986: | Line 1,079: | ||
! Offset || Size || Description | ! Offset || Size || Description | ||
|- | |- | ||
| 0x0 || 0x1 || | | 0x0 || 0x1 || [[#DeviceTypeInternal]] | ||
|- | |- | ||
| 0x1 || 0x1 || [[#NpadInterfaceType]]. Similar to the field from the old struct. | | 0x1 || 0x1 || [[#NpadInterfaceType]]. Similar to the field from the old struct. | ||
Line 1,003: | Line 1,096: | ||
This is a 0x10-byte struct. [9.0.0+] This is a 0x14-byte struct. | This is a 0x10-byte struct. [9.0.0+] This is a 0x14-byte struct. | ||
Bits for | == DeviceTypeInternal == | ||
This is an u32 "nn::hid::detail::DeviceTypeInternal". | |||
[9.0.0+] This an u8 "nn::hidtypes::DeviceType". | |||
Bits for "nn::hid::detail::DeviceTypeInternal", only 1 bit can be set: | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 1,051: | Line 1,149: | ||
|} | |} | ||
u8 for the | u8 values for "nn::hidtypes::DeviceType", must match one of the these values: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 1,100: | Line 1,198: | ||
== HdlsState == | == HdlsState == | ||
Pre-9.0.0: | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,113: | Line 1,213: | ||
|- | |- | ||
| 0xC || 0x4 || [[HID_Shared_Memory#Button_State|Buttons]]. Bit18 = HOME and bit19 = Capture. | | 0xC || 0x4 || [[HID_Shared_Memory#Button_State|Buttons]]. Bit18 = HOME and bit19 = Capture. | ||
|- | |||
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]]. | |||
|- | |||
| 0x20 || 0x1 || Unused for input. Set with output from [[#DumpHdlsStates]] (zero in some cases). | |||
|- | |||
| 0x21 || 0x3 || Padding | |||
|} | |||
[9.0.0+]: | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x4 || batteryCharge for the main [[HID_Shared_Memory#Controllers|PowerInfo]]. | |||
|- | |||
| 0x4 || 0x4 || Unknown | |||
|- | |||
| 0x8 || 0x8 || [[HID_Shared_Memory#Button_State|Buttons]], masked with 0xfffffffff00fffff. See above table regarding HOME/Capture buttons. | |||
|- | |- | ||
| 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]]. | | 0x10 || 0x10(4*2*2) || Joystick data, see [[HID_Shared_Memory#Controller_State]]. | ||
Line 1,298: | Line 1,416: | ||
| 830 || [7.0.0+] [[#SetNotificationLedPattern]] | | 830 || [7.0.0+] [[#SetNotificationLedPattern]] | ||
|- | |- | ||
| 831 || [9.0.0+] SetNotificationLedPatternWithTimeout | | 831 || [9.0.0+] [[#SetNotificationLedPatternWithTimeout]] | ||
|- | |- | ||
| 832 || [9.0.0+] PrepareHidsForNotificationWake | | 832 || [9.0.0+] [[#PrepareHidsForNotificationWake]] | ||
|- | |- | ||
| 850 || [3.0.0+] IsUsbFullKeyControllerEnabled | | 850 || [3.0.0+] IsUsbFullKeyControllerEnabled | ||
Line 1,372: | Line 1,490: | ||
| 1155 || [9.0.0+] SetForceHandheldStyleVibration | | 1155 || [9.0.0+] SetForceHandheldStyleVibration | ||
|- | |- | ||
| 1156 || [9.0.0+] | | 1156 || [9.0.0+] SendConnectionTriggerWithoutTimeoutEvent | ||
|} | |} | ||
Line 1,381: | Line 1,499: | ||
== GetUniquePadsFromNpad == | == GetUniquePadsFromNpad == | ||
Takes an input u32 [[#NpadIdType]], a type-0xA output buffer, and returns an output | Takes an input u32 [[#NpadIdType]], a type-0xA output buffer, and returns an output s64 for total output entries (which is copied to a s32 by official sw). | ||
The output buffer contains an array of u64 '''UniquePadId'''. | The output buffer contains an array of u64 '''UniquePadId'''. | ||
Line 1,389: | Line 1,507: | ||
== GetUniquePadIds == | == GetUniquePadIds == | ||
Takes a type-0xA output buffer, and returns an output | Takes a type-0xA output buffer, and returns an output s64 for total output entries (which is copied to a s32 by official sw). | ||
The output buffer contains an array of u64 '''UniquePadId'''. | The output buffer contains an array of u64 '''UniquePadId'''. | ||
Line 1,404: | Line 1,522: | ||
This sends subcommand 0x38 to the specified controller, for setting the pattern for the HOME button notification LED. The input structure is converted to the format used by this [https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_subcommands_notes.md#subcommand-0x38-set-home-light subcommand]. | This sends subcommand 0x38 to the specified controller, for setting the pattern for the HOME button notification LED. The input structure is converted to the format used by this [https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/blob/master/bluetooth_hid_subcommands_notes.md#subcommand-0x38-set-home-light subcommand]. | ||
[9.0.0+] This runs code similar to [[#SetNotificationLedPatternWithTimeout]], except it passes the following param values to an internal func: flag=1 and TimeSpan=0 (with [[#SetNotificationLedPatternWithTimeout]] these are flag=0 and TimeSpan={input value}). | |||
== SetNotificationLedPatternWithTimeout == | |||
Takes an input [[#NotificationLedPattern]], an u64 '''UniquePadId''', and an s64 TimeSpan, no output. | |||
== PrepareHidsForNotificationWake == | |||
Takes a type-0x9 input buffer containing an array of u64 '''UniquePadId''', no output. | |||
== GetHidbusSystemServiceObject == | == GetHidbusSystemServiceObject == | ||
No input, returns an [[#IHidbusSystemServer]]. | No input, returns an [[#IHidbusSystemServer]]. | ||
== IHidbusSystemServer == | |||
This is "nn::hidbus::IHidbusSystemServer". | |||
This was added with [5.0.0+]. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 500 || SetAppletResourceUserId | |||
|- | |||
| 501 || RegisterAppletResourceUserId | |||
|- | |||
| 502 || UnregisterAppletResourceUserId | |||
|} | |||
== NotificationLedPattern == | == NotificationLedPattern == | ||
Line 1,652: | Line 1,794: | ||
| System | | System | ||
| Generic controller. | | Generic controller. | ||
|} | |} | ||
Line 1,843: | Line 1,969: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || AcquireDevice | | 0 || [[#AcquireDevice]] | ||
|- | |- | ||
| 1 || ReleaseDevice | | 1 || [[#ReleaseDevice]] | ||
|- | |- | ||
| 2 || | | 2 || [[#GetCtrlSession]] | ||
|- | |- | ||
| 3 || | | 3 || [[#GetReadSession]] | ||
|- | |- | ||
| [1.0.0-2.3.0] | | 4 || [1.0.0-2.3.0] [[#GetWriteSession]] | ||
|} | |} | ||
== AcquireDevice == | |||
Takes an input s32, no output. | |||
== ReleaseDevice == | |||
Takes an input s32, no output. | |||
== GetCtrlSession == | |||
Takes an input u32, returns an [[#ICtrlSession]]. | |||
== GetReadSession == | |||
Takes an input u32, returns an [[#IReadSession]]. | |||
== GetWriteSession == | |||
Takes an input u32, returns an [[#IWriteSession]]. | |||
== ICtrlSession == | == ICtrlSession == | ||
Line 1,863: | Line 2,004: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || GetString | | 0 || GetString | ||
|- | |- | ||
| 1 || GetCodeBook | | 1 || GetCodeBook | ||
|- | |- | ||
| 2 || GetReport | | 2 || GetReport | ||
|- | |- | ||
| 3 || SetReport | | 3 || SetReport | ||
|- | |- | ||
| 4 || GetIdle | | 4 || GetIdle | ||
|- | |- | ||
| 5 || SetIdle | | 5 || SetIdle | ||
|- | |- | ||
| 6 || GetProtocol | | 6 || GetProtocol | ||
|- | |- | ||
| 7 || SetProtocol | | 7 || SetProtocol | ||
|- | |- | ||
| 8 || GetDescriptor | | 8 || GetDescriptor | ||
|- | |- | ||
| 9 || SetDescriptor | | 9 || SetDescriptor | ||
|- | |- | ||
| 10 || GetStateChangeEvent | | 10 || GetStateChangeEvent | ||
|- | |- | ||
| 11 || SignalStateChangeEvent | | 11 || SignalStateChangeEvent | ||
|- | |- | ||
| 12 || [3.0.0+] Write | | 12 || [3.0.0+] Write | ||
|} | |} | ||
All of these use USB [[USB_services|CtrlXfer]], except for | All of these use USB [[USB_services|CtrlXfer]], except for GetStateChangeEvent and SignalStateChangeEvent, and GetCodeBook which copies 0x4000-bytes from state to output. | ||
== IReadSession == | == IReadSession == | ||
Line 1,901: | Line 2,042: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || Read | | 0 || [[#Read]] | ||
|} | |} | ||
=== Read === | |||
Uses [[USB_services|PostBufferAsync]] etc with the INPUT endpoint. The size must be <=0x1000. The actual transfer size is returned in an output u64. The data is copied from the tmpbuf to the output buffer using the actual-transfer-size. | |||
[3.0.0+] | [3.0.0+] Now takes a total of 8-bytes of input. | ||
== IWriteSession == | == IWriteSession == | ||
Line 1,917: | Line 2,059: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || | | 0 || [[#Write]] | ||
|} | |} | ||
=== Write === | |||
This is the inverse of [[#IReadSession]] cmd0. Uses the OUTPUT endpoint with an input buffer. | |||
= ahid:hdr = | = ahid:hdr = | ||
Line 1,965: | Line 2,110: | ||
| 5 || CheckNfcDevicePower | | 5 || CheckNfcDevicePower | ||
|- | |- | ||
| 6 || [5.0.0+] | | 6 || [5.0.0+] SetMcuStateImmediate | ||
|- | |- | ||
| 10 || SetNfcEvent | | 10 || SetNfcEvent | ||
Line 2,031: | Line 2,176: | ||
| 12 || DisableJoyPollingReceiveMode | | 12 || DisableJoyPollingReceiveMode | ||
|- | |- | ||
| [5.0.0-6.2.0] | | 13 || [5.0.0-6.2.0] GetPollingData | ||
|- | |- | ||
| 14 || [6.0.0+] SetStatusManagerType | | 14 || [6.0.0+] SetStatusManagerType |