HID services: Difference between revisions
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1,237: | Line 1,237: | ||
==== MomentProcessorState ==== | ==== MomentProcessorState ==== | ||
This is "nn::irsensor::MomentProcessorState". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,267: | Line 1,269: | ||
==== ClusteringProcessorState ==== | ==== ClusteringProcessorState ==== | ||
This is "nn::irsensor::ClusteringProcessorState". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,309: | Line 1,313: | ||
==== PointingProcessorState ==== | ==== PointingProcessorState ==== | ||
This is "nn::irsensor::PointingProcessorState" and "nn::irsensor::PointingProcessorMarkerState". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,317: | Line 1,323: | ||
| 0x8 || 0x8 || TimeStamp | | 0x8 || 0x8 || TimeStamp | ||
|- | |- | ||
| 0x10 || | | 0x10 || 0x1 || PointingStatus | ||
|- | |||
| 0x11 || 0x3 || Reserved | |||
|- | |||
| 0x14 || 0x1C || Position | |||
|- | |||
| 0x30 || 0x1 || PointingStatus | |||
|- | |||
| 0x31 || 0x3 || Reserved | |||
|- | |||
| 0x34 || 0x1C || Position | |||
|- | |||
| 0x50 || 0x1 || PointingStatus | |||
|- | |||
| 0x51 || 0x3 || Reserved | |||
|- | |||
| 0x54 || 0x1C || Position | |||
|} | |} | ||
==== TeraPluginProcessorState ==== | ==== TeraPluginProcessorState ==== | ||
This is "nn::irsensor::TeraPluginProcessorState". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,329: | Line 1,353: | ||
| 0x8 || 0x8 || TimeStamp | | 0x8 || 0x8 || TimeStamp | ||
|- | |- | ||
| 0x10 || | | 0x10 || 0x4 || AmbientNoiseLevel | ||
|- | |||
| 0x14 || 0x12C || PluginData | |||
|} | |} | ||
=== | ==== AdaptiveClusteringProcessorState ==== | ||
This is "nn::irsensor::AdaptiveClusteringProcessorState". | |||
This is created from [[#TeraPluginProcessorState]]. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Offset || Size || Description | ! Offset || Size || Description | ||
|- | |- | ||
| 0x0 || 0x8 || | | 0x0 || 0x8 || SamplingNumber | ||
|- | |||
| 0x8 || 0x8 || Unknown | |||
|- | |||
| 0x10 || 0x4 || AmbientNoiseLevel | |||
|- | |||
| 0x14 || 0x4 || Unknown | |||
|- | |||
| 0x18 || 0x1 || ObjectCount | |||
|- | |||
| 0x19 || 0x1 || Unknown | |||
|- | |||
| 0x1A || 0x6 || Reserved | |||
|- | |- | ||
| | | 0x20 || 0x200 || Array of [[#AdaptiveClusteringData]] | ||
|} | |} | ||
== | The array of [[#AdaptiveClusteringData]] can hold up to 16 entries. | ||
===== AdaptiveClusteringData ===== | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x4 || Unknown | |||
|- | |||
| 0x4 || 0x4 || Unknown | |||
|- | |||
| 0x8 || 0x4 || Unknown | |||
|- | |||
| 0xC || 0x4 || Unknown | |||
|} | |||
== | ==== HandAnalysisImageState ==== | ||
This is "nn::irsensor::HandAnalysisImageState". | |||
This is created from [[#TeraPluginProcessorState]]. | |||
== | {| class="wikitable" border="1" | ||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x8 || SamplingNumber | |||
|- | |||
| 0x8 || 0x4 || AmbientNoiseLevel | |||
|- | |||
| 0xC || 0x960 || Image | |||
|- | |||
| 0x96C || 0x4 || Reserved | |||
|} | |||
==== HandAnalysisSilhouetteState ==== | |||
This is "nn::irsensor::HandAnalysisSilhouetteState". | |||
This is created from [[#TeraPluginProcessorState]]. | |||
== RunTeraPluginProcessor== | {| class="wikitable" border="1" | ||
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedTeraPluginProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output. | |- | ||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x8 || SamplingNumber | |||
|- | |||
| 0x8 || 0x4 || AmbientNoiseLevel | |||
|- | |||
| 0xC || 0x1354 || Unknown | |||
|} | |||
==== HandAnalysisSilhouetteStateWithFullFrameShape ==== | |||
This is "nn::irsensor::HandAnalysisSilhouetteStateWithFullFrameShape". | |||
This is created from [[#TeraPluginProcessorState]]. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x8 || SamplingNumber | |||
|- | |||
| 0x8 || 0x4 || AmbientNoiseLevel | |||
|- | |||
| 0xC || 0x156C || Unknown | |||
|} | |||
=== AruidFormat === | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x8 || IrSensorAruid | |||
|- | |||
| 0x8 || 0x8 || IrSensorAruidStatus | |||
|} | |||
== StopImageProcessor == | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output. | |||
== RunMomentProcessor == | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedMomentProcessorConfig]]. No output. | |||
== RunClusteringProcessor == | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedClusteringProcessorConfig]]. No output. | |||
== RunImageTransferProcessor == | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], a [[#PackedImageTransferProcessorConfig]], an u64 for the TransferMemory's size, and a TransferMemory handle. No output. | |||
The TransferMemory is created with an user specified buffer and permission none. | |||
== GetImageTransferProcessorState == | |||
Takes a PID-descriptor, a type-0x6 output buffer, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. Returns an [[#ImageTransferProcessorState]]. No output. | |||
== RunTeraPluginProcessor== | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedTeraPluginProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output. | |||
== GetNpadIrCameraHandle == | |||
Takes an input [[#NpadIdType]]. Returns an output [[#IrCameraHandle]]. | |||
== RunPointingProcessor == | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedPointingProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output. | |||
== SuspendImageProcessor == | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output. | |||
sdknso uses this from the Run*Processor funcs to suspend the current Processor when the current [[#PackedFunctionLevel|FunctionLevel]] is >= 0x1, prior to starting another Processor if needed (depending on what Processor was already active via a state field). Hence, this cmd is only used with [4.0.0+]. | |||
== CheckFirmwareVersion == | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedMcuVersion]], and an [[AM_services|AppletResourceUserId]]. No output. | |||
sdknso didn't actually use this until 4.x (the RequiredMcuVersion was also updated with that version). | |||
== SetFunctionLevel == | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedFunctionLevel]], and an [[AM_services|AppletResourceUserId]]. No output. | |||
== RunImageTransferExProcessor == | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], a [[#PackedImageTransferProcessorExConfig]], an u64 for the TransferMemory's size, and a TransferMemory handle. No output. | |||
The TransferMemory is created with an user specified buffer and permission none. | |||
== RunIrLedProcessor == | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], a [[#PackedIrLedProcessorConfig]] (immediately after the previous word), and an [[AM_services|AppletResourceUserId]]. No output. | |||
== StopImageProcessorAsync == | |||
Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output. | |||
== ActivateIrsensorWithFunctionLevel == | |||
Takes a PID-descriptor, an [[#PackedFunctionLevel]], and an [[AM_services|AppletResourceUserId]]. No output. | |||
= irs:sys = | |||
This is "nn::irsensor::IIrSensorSystemServer". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 500 || [[#SetAppletResourceUserId]] | |||
|- | |||
| 501 || [[#RegisterAppletResourceUserId]] | |||
|- | |||
| 502 || [[#UnregisterAppletResourceUserId]] | |||
|- | |||
| 503 || [[#EnableAppletToGetInput]] | |||
|} | |||
== | == SetAppletResourceUserId == | ||
Takes an | Takes an [[AM_services|AppletResourceUserId]]. No output. | ||
== | == RegisterAppletResourceUserId == | ||
Takes a | Takes a bool and an [[AM_services|AppletResourceUserId]]. No output. | ||
== | == UnregisterAppletResourceUserId == | ||
Takes | Takes an [[AM_services|AppletResourceUserId]]. No output. | ||
== EnableAppletToGetInput == | |||
Takes a bool and an [[AM_services|AppletResourceUserId]]. No output. | |||
= | = ahid:cd = | ||
This is "nn::ahid::IServerSession". | |||
Used for USB HID devices. | |||
This service no longer exists in [9.0.0+]. | |||
{| class="wikitable" border="1" | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| | | 0 || [[#AcquireDevice]] | ||
|- | |||
| 1 || [[#ReleaseDevice]] | |||
|- | |- | ||
| | | 2 || [[#GetCtrlSession]] | ||
|- | |- | ||
| | | 3 || [[#GetReadSession]] | ||
|- | |- | ||
| | | 4 || [1.0.0-2.3.0] [[#GetWriteSession]] | ||
|} | |} | ||
== AcquireDevice == | |||
== AcquireDevice == | |||
Takes an input s32, no output. | Takes an input s32, no output. | ||
Line 2,987: | Line 3,105: | ||
|- | |- | ||
| 0x4 || 0x4 || | | 0x4 || 0x4 || | ||
|} | |||
= HandAnalysisConfig = | |||
This is "nn::irsensor::HandAnalysisConfig". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x1 || [[#HandAnalysisMode]] | |||
|- | |||
| 0x1 || 0x3 || Reserved | |||
|} | |||
== HandAnalysisMode == | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 || None | |||
|- | |||
| 1 || Silhouette | |||
|- | |||
| 2 || Image | |||
|- | |||
| 3 || SilhouetteAndImage | |||
|- | |||
| 4 || SilhouetteOnly | |||
|} | |} | ||