HID services: Difference between revisions
No edit summary |
No edit summary |
||
(18 intermediate revisions by 2 users not shown) | |||
Line 1,229: | Line 1,229: | ||
| 0x8 || 0x8 || [[#IrSensorMode]] | | 0x8 || 0x8 || [[#IrSensorMode]] | ||
|- | |- | ||
| 0x10 || 0xE20 || | | 0x10 || 0xE20 || [[#ProcessorStateRingLifo]] | ||
|} | |} | ||
==== ProcessorStateRingLifo ==== | |||
This is "nn::irsensor::detail::RingLifo<X,Y>" where "X" is a specialized processor state (e.g.: "nn::irsensor::MomentProcessorState") and "Y" is the maximum element count (e.g.: 5). | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x8 || Start | |||
|- | |||
| 0x8 || 0x4 || Count | |||
|- | |||
| 0xC || 0x4 || Padding | |||
|- | |||
| 0x10 || Variable || ProcessorState | |||
|} | |||
The maximum element count is 6 for [[#PointingProcessorMarkerState]] or 5 for any of the other states. | |||
ProcessorState is specialized depending on the value of [[#IrSensorMode]]. | ProcessorState is specialized depending on the value of [[#IrSensorMode]]. | ||
===== MomentProcessorState ===== | |||
This is "nn::irsensor::MomentProcessorState". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,252: | Line 1,270: | ||
|} | |} | ||
The array of [[#MomentStatistic]] can hold up to 48 entries. | The array of [[#MomentStatistic]] can hold up to 48 entries. This array can be accessed as [y + x*8] (this is a 6x8 array). region_x = image_x/6, region_y = image_y/8. | ||
====== MomentStatistic ====== | |||
In sdknso GetMomentProcessorStates, this loops through each MomentProcessorState->MomentStatistic entry: <code>AverageIntensity *= scale;</code> The scale is calculated with: <code>scale = 76800.0f / (float)([[#PackedMomentProcessorConfig|WindowOfInterest]].width * [[#PackedMomentProcessorConfig|WindowOfInterest]].height);</code> Note that <code>76800 == 320*240</code>, hence with the default width/height the calculated scale is 1.0f. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Offset || Size || Description | ! Offset || Size || Description | ||
|- | |- | ||
| 0x0 || 0x4 || AverageIntensity | | 0x0 || 0x4 || float AverageIntensity | ||
|- | |- | ||
| 0x4 || 0x4 || CentroidX | | 0x4 || 0x4 || float CentroidX | ||
|- | |- | ||
| 0x8 || 0x4 || CentroidY | | 0x8 || 0x4 || float CentroidY | ||
|} | |} | ||
==== ClusteringProcessorState ==== | ===== ClusteringProcessorState ===== | ||
This is "nn::irsensor::ClusteringProcessorState". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,286: | Line 1,308: | ||
The array of [[#ClusteringData]] can hold up to 16 entries. | The array of [[#ClusteringData]] can hold up to 16 entries. | ||
===== ClusteringData ===== | ====== ClusteringData ====== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Offset || Size || Description | ! Offset || Size || Description | ||
|- | |- | ||
| 0x0 || 0x4 || AverageIntensity | | 0x0 || 0x4 || float AverageIntensity | ||
|- | |- | ||
| 0x4 || 0x4 || CentroidX | | 0x4 || 0x4 || float CentroidX | ||
|- | |- | ||
| 0x8 || 0x4 || CentroidY | | 0x8 || 0x4 || float CentroidY | ||
|- | |- | ||
| 0xC || 0x4 || PixelCount | | 0xC || 0x4 || PixelCount | ||
Line 1,308: | Line 1,330: | ||
|} | |} | ||
==== | ===== PointingProcessorMarkerState ===== | ||
This is "nn::irsensor::PointingProcessorMarkerState". | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
Line 1,317: | Line 1,341: | ||
| 0x8 || 0x8 || TimeStamp | | 0x8 || 0x8 || TimeStamp | ||
|- | |- | ||
| 0x10 || | | 0x10 || 0x1 || PointingStatus | ||
| | |- | ||
| 0x11 || 0xB || Reserved | |||
|- | |||
| 0x1C || 0x4 || float PositionX | |||
|- | |- | ||
| 0x20 || 0x4 || float PositionY | |||
|- | |- | ||
| | | 0x24 || 0xC || Reserved | ||
|- | |- | ||
| | | 0x30 || 0x1 || PointingStatus | ||
|- | |- | ||
| | | 0x31 || 0xB || Reserved | ||
|- | |- | ||
| 0x3C || 0x4 || float PositionX | |||
|- | |- | ||
| | | 0x40 || 0x4 || float PositionY | ||
|- | |- | ||
| | | 0x44 || 0xC || Reserved | ||
|- | |||
| 0x50 || 0x1 || PointingStatus | |||
|- | |||
| 0x51 || 0xB || Reserved | |||
|- | |||
| 0x5C || 0x4 || float PositionX | |||
|- | |||
| 0x60 || 0x4 || float PositionY | |||
|- | |||
| 0x64 || 0xC || Reserved | |||
|} | |} | ||
== | ===== PointingProcessorState ===== | ||
This is "nn::irsensor::PointingProcessorState". | |||
This is created from [[#PointingProcessorMarkerState]]. | |||
== | {| class="wikitable" border="1" | ||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x8 || SamplingNumber | |||
|- | |||
| 0x8 || 0x8 || TimeStamp | |||
|- | |||
| 0x10 || 0x4 || PointingStatus | |||
|- | |||
| 0x14 || 0x4 || float PositionX | |||
|- | |||
| 0x18 || 0x4 || float PositionY | |||
|- | |||
| 0x1C || 0x4 || Reserved | |||
|} | |||
== | ===== TeraPluginProcessorState ===== | ||
This is "nn::irsensor::TeraPluginProcessorState". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x8 || SamplingNumber | |||
|- | |||
| 0x8 || 0x8 || TimeStamp | |||
|- | |||
| 0x10 || 0x4 || AmbientNoiseLevel | |||
|- | |||
| 0x14 || 0x12C || PluginData | |||
|} | |||
== | ===== AdaptiveClusteringProcessorState ===== | ||
This is "nn::irsensor::AdaptiveClusteringProcessorState". | |||
This is created from [[#TeraPluginProcessorState]]. | |||
== | {| class="wikitable" border="1" | ||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x8 || SamplingNumber | |||
|- | |||
| 0x8 || 0x8 || TimeStamp | |||
|- | |||
| 0x10 || 0x4 || AmbientNoiseLevel | |||
|- | |||
| 0x14 || 0x4 || AccuracyLevel | |||
|- | |||
| 0x18 || 0x1 || ObjectCount | |||
|- | |||
| 0x19 || 0x1 || BackgroundIntensity | |||
|- | |||
| 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 || float CentroidX | |||
|- | |||
| 0x4 || 0x4 || float CentroidY | |||
|- | |||
| 0x8 || 0x4 || float Area | |||
|- | |||
| 0xC || 0x4 || IsIncomplete | |||
|} | |||
== | ===== 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]]. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! | ! 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 | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
| 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 an | Takes a PID-descriptor, an [[#IrCameraHandle]], and an [[AM_services|AppletResourceUserId]]. No output. | ||
== | == RunMomentProcessor == | ||
Takes an | Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedMomentProcessorConfig]]. No output. | ||
== | == RunClusteringProcessor == | ||
Takes an | Takes a PID-descriptor, an [[#IrCameraHandle]], an [[AM_services|AppletResourceUserId]], and a [[#PackedClusteringProcessorConfig]]. No output. | ||
== | == RunImageTransferProcessor == | ||
Takes an | 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". | |||
This | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 1,541: | Line 1,572: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| | | 500 || [[#SetAppletResourceUserId]] | ||
|- | |- | ||
| | | 501 || [[#RegisterAppletResourceUserId]] | ||
|- | |- | ||
| | | 502 || [[#UnregisterAppletResourceUserId]] | ||
|- | |- | ||
| | | 503 || [[#EnableAppletToGetInput]] | ||
| | |} | ||
| | |||
== SetAppletResourceUserId == | |||
| | Takes an [[AM_services|AppletResourceUserId]]. No output. | ||
== RegisterAppletResourceUserId == | |||
Takes a bool and an [[AM_services|AppletResourceUserId]]. No output. | |||
== UnregisterAppletResourceUserId == | |||
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+]. | |||
This | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 1,561: | Line 1,604: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || | | 0 || [[#AcquireDevice]] | ||
|- | |- | ||
| 1 || | | 1 || [[#ReleaseDevice]] | ||
|- | |- | ||
| 2 || | | 2 || [[#GetCtrlSession]] | ||
|- | |- | ||
| 3 || | | 3 || [[#GetReadSession]] | ||
|- | |- | ||
| 4 || | | 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 == | |||
This is "nn::ahid::ICtrlSession". | |||
This no longer exists in [9.0.0+]. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
| | ! Cmd || Name | ||
|- | |- | ||
| | | 0 || GetString | ||
|- | |- | ||
| | | 1 || GetCodeBook | ||
|- | |- | ||
| | | 2 || GetReport | ||
|- | |- | ||
| | | 3 || SetReport | ||
|- | |- | ||
| | | 4 || GetIdle | ||
|- | |- | ||
| | | 5 || SetIdle | ||
|- | |- | ||
| | | 6 || GetProtocol | ||
|- | |- | ||
| | | 7 || SetProtocol | ||
|- | |- | ||
| | | 8 || GetDescriptor | ||
|- | |- | ||
| | | 9 || SetDescriptor | ||
|- | |- | ||
| | | 10 || GetStateChangeEvent | ||
|- | |- | ||
| | | 11 || SignalStateChangeEvent | ||
|- | |- | ||
| | | 12 || [3.0.0+] Write | ||
|} | |||
All of these use USB [[USB_services|CtrlXfer]], except for GetStateChangeEvent and SignalStateChangeEvent, and GetCodeBook which copies 0x4000-bytes from state to output. | |||
== IReadSession == | |||
This is "nn::ahid::IReadSession". | |||
This no longer exists in [9.0.0+]. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |- | ||
| | | 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+] Now takes a total of 8-bytes of input. | ||
= | == IWriteSession == | ||
This is "nn:: | This is "nn::ahid::IWriteSession". | ||
This was | This was removed with [3.0.0+]. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 1,617: | Line 1,694: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| | | 0 || [[#Write]] | ||
|} | |||
=== Write === | |||
This is the inverse of [[#IReadSession]] cmd0. Uses the OUTPUT endpoint with an input buffer. | |||
= ahid:hdr = | |||
This is "nn::ahid::hdr::ISession". | |||
Used internally for USB HID devices. | |||
This service no longer exists in [9.0.0+]. | |||
{| class="wikitable" border="1" | |||
|- | |- | ||
| | ! Cmd || Name | ||
|- | |- | ||
| | | 0 || GetDeviceEntries | ||
|- | |- | ||
| | | 1 || GetDeviceList | ||
|- | |- | ||
| | | 2 || GetDeviceParameters | ||
|- | |- | ||
| | | 3 || AttachDevice | ||
|- | |- | ||
| | | 4 || DetachDevice | ||
|- | |- | ||
| | | 5 || [6.0.0+] SetDeviceFilter | ||
|- | |} | ||
| | |||
= xcd:sys = | |||
This is "nn::xcd::detail::ISystemServer". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 0 || GetDataFormat | |||
|- | |||
| 1 || SetDataFormat | |||
|- | |||
| 2 || GetMcuState | |||
|- | |- | ||
| | | 3 || SetMcuState | ||
|- | |- | ||
| | | 4 || GetMcuVersionForNfc | ||
|- | |- | ||
| | | 5 || CheckNfcDevicePower | ||
|- | |- | ||
| | | 6 || [5.0.0+] SetMcuStateImmediate | ||
|- | |- | ||
| 14 || | | 10 || SetNfcEvent | ||
| | |- | ||
| 11 || GetNfcInfo | |||
|- | |||
| 12 || StartNfcDiscovery | |||
|- | |||
| 13 || StopNfcDiscovery | |||
|- | |||
| 14 || StartNtagRead | |||
|- | |||
| 15 || StartNtagWrite | |||
|- | |||
| 16 || SendNfcRawData | |||
|- | |||
| 17 || RegisterMifareKey | |||
|- | |||
| 18 || ClearMifareKey | |||
|- | |||
| 19 || StartMifareRead | |||
|- | |||
| 20 || StartMifareWrite | |||
|- | |||
| 101 || GetAwakeTriggerReasonForLeftRail | |||
|- | |||
| 102 || GetAwakeTriggerReasonForRightRail | |||
|} | |||
[5.0.0+] SetDataFormat, SetMcuState, and ClearMifareKey: now takes a total of 0xC-bytes of input instead of 0x10. | |||
[6.0.0+]: The buffer type used by GetNfcInfo is now 0x32 instead of 0x1A. | |||
= | = hidbus = | ||
This is "nn::hidbus::IHidbusServer". | |||
This | This was added with [5.0.0+]. | ||
Official sw opens a temporary service-session for each func using this, with it being closed once done: no global session is kept open. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Cmd || Name | |||
|- | |||
| 1 || [[#GetBusHandle]] | |||
|- | |||
| 2 || [[#IsExternalDeviceConnected]] | |||
|- | |||
| 3 || [[#Initialize]] | |||
|- | |||
| 4 || [[#Finalize]] | |||
|- | |||
| 5 || [[#EnableExternalDevice]] | |||
|- | |||
| 6 || [[#GetExternalDeviceId]] | |||
|- | |||
| 7 || [[#SendCommandAsync]] | |||
|- | |||
| 8 || [[#GetSendCommandAsynceResult]] | |||
|- | |||
| 9 || [[#SetEventForSendCommandAsycResult]] | |||
|- | |||
| 10 || [[#GetSharedMemoryHandle]] | |||
|- | |||
| 11 || [[#EnableJoyPollingReceiveMode]] | |||
|- | |||
| 12 || [[#DisableJoyPollingReceiveMode]] | |||
|- | |||
| 13 || [5.0.0-6.2.0] GetPollingData | |||
|- | |||
| 14 || [6.0.0+] [[#SetStatusManagerType]] | |||
|} | |||
sdknso doesn't use the GetPollingData cmd. | |||
== GetExternalDeviceId == | == GetBusHandle == | ||
Takes an input [[#BusHandle]], returns an output u32 ExternalDeviceId. | Takes an input u32 [[#NpadIdType]], an u64 [[#BusType]], an u64 [[AM_services|AppletResourceUserId]], returns an output u8 bool and a [[#BusHandle]]. | ||
The bool indicates whether the [[#BusHandle]] is valid. | |||
Official sw will assert when [[#BusHandle]] InternalIndex is >=0x11 (>=0x13 with [6.0.0+]). This same check is also done for all funcs using [[#BusHandle]] as input. | |||
This cmd will throw an error when [[#BusType]] is invalid. | |||
== IsExternalDeviceConnected == | |||
Takes an input [[#BusHandle]], returns an output u8 bool. | |||
This is not used by sdknso. | |||
== Initialize == | |||
Takes an input [[#BusHandle]], an u64 [[AM_services|AppletResourceUserId]], no output. | |||
Prior to using this cmd, sdknso handles [[#GetSharedMemoryHandle|sharedmem]] mapping if not done previously. | |||
== Finalize == | |||
Takes an input [[#BusHandle]], an u64 [[AM_services|AppletResourceUserId]], no output. | |||
== EnableExternalDevice == | |||
Takes an input u8 bool, a [[#BusHandle]], an u64, an u64 [[AM_services|AppletResourceUserId]], no output. | |||
sdknso passes value 0x38900050018 (0x3A600050018 with 7.x+) for the u64. | |||
The bool flag indicates whether to enable the device (true = enable, false = disable). When false, this will use [[#DisableJoyPollingReceiveMode]] if needed. | |||
== GetExternalDeviceId == | |||
Takes an input [[#BusHandle]], returns an output u32 ExternalDeviceId. | |||
== SendCommandAsync == | == SendCommandAsync == | ||
Line 2,494: | Line 2,664: | ||
= IrCameraHandle = | = IrCameraHandle = | ||
This is "nn::irsensor::IrCameraHandle" | This is "nn::irsensor::IrCameraHandle". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 2,508: | Line 2,678: | ||
= IrCameraStatus = | = IrCameraStatus = | ||
This is "nn::irsensor::IrCameraStatus" | This is "nn::irsensor::IrCameraStatus". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 2,522: | Line 2,692: | ||
= IrCameraInternalStatus = | = IrCameraInternalStatus = | ||
This is "nn::irsensor::IrCameraInternalStatus" | This is "nn::irsensor::IrCameraInternalStatus". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 2,548: | Line 2,718: | ||
= IrSensorMode = | = IrSensorMode = | ||
This is "nn::irsensor::detail::StatusManager::IrSensorMode" | This is "nn::irsensor::detail::StatusManager::IrSensorMode". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 2,562: | Line 2,732: | ||
| 3 || [[#ImageTransferProcessorState|ImageTransferProcessor]] | | 3 || [[#ImageTransferProcessorState|ImageTransferProcessor]] | ||
|- | |- | ||
| 4 || [[# | | 4 || [[#PointingProcessorMarkerState|PointingProcessorMarker]] | ||
|- | |- | ||
| 5 || [[#TeraPluginProcessorState|TeraPluginProcessor]] | | 5 || [[#TeraPluginProcessorState|TeraPluginProcessor]] | ||
Line 2,570: | Line 2,740: | ||
= ImageProcessorStatus = | = ImageProcessorStatus = | ||
This is "nn::irsensor::ImageProcessorStatus" | This is "nn::irsensor::ImageProcessorStatus". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 2,582: | Line 2,752: | ||
= ImageTransferProcessorFormat = | = ImageTransferProcessorFormat = | ||
This is "nn::irsensor::ImageTransferProcessorFormat" | This is "nn::irsensor::ImageTransferProcessorFormat". | ||
This controls the IR Sensor image resolution. | This controls the IR Sensor image resolution. | ||
Line 2,632: | Line 2,802: | ||
= PackedMomentProcessorConfig = | = PackedMomentProcessorConfig = | ||
This is "nn::irsensor::PackedMomentProcessorConfig" | This is "nn::irsensor::PackedMomentProcessorConfig". | ||
This is converted from [[#MomentProcessorConfig]]. | This is converted from [[#MomentProcessorConfig]]. | ||
Line 2,702: | Line 2,872: | ||
= PackedClusteringProcessorConfig = | = PackedClusteringProcessorConfig = | ||
This is "nn::irsensor::PackedClusteringProcessorConfig" | This is "nn::irsensor::PackedClusteringProcessorConfig". | ||
This is converted from [[#ClusteringProcessorConfig]]. | This is converted from [[#ClusteringProcessorConfig]]. | ||
Line 2,762: | Line 2,932: | ||
= PackedImageTransferProcessorConfig = | = PackedImageTransferProcessorConfig = | ||
This is "nn::irsensor::PackedImageTransferProcessorConfig" | This is "nn::irsensor::PackedImageTransferProcessorConfig". | ||
This is converted from [[#ImageTransferProcessorConfig]]. | This is converted from [[#ImageTransferProcessorConfig]]. | ||
Line 2,788: | Line 2,958: | ||
= ImageTransferProcessorState = | = ImageTransferProcessorState = | ||
This is "nn::irsensor::ImageTransferProcessorState" | This is "nn::irsensor::ImageTransferProcessorState". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 2,796: | Line 2,966: | ||
| 0x0 || 0x8 || SamplingNumber | | 0x0 || 0x8 || SamplingNumber | ||
|- | |- | ||
| 0x8 || | | 0x8 || 0x4 || AmbientNoiseLevel | ||
|- | |- | ||
| | | 0xC || 0x4 || Reserved | ||
|} | |} | ||
Line 2,818: | Line 2,988: | ||
= PackedTeraPluginProcessorConfig = | = PackedTeraPluginProcessorConfig = | ||
This is "nn::irsensor::PackedTeraPluginProcessorConfig" | This is "nn::irsensor::PackedTeraPluginProcessorConfig". | ||
This is converted from [[#TeraPluginProcessorConfig]]. The data starting at offset 0x5 is only initialized by the user-process with [6.0.0+]. | This is converted from [[#TeraPluginProcessorConfig]]. The data starting at offset 0x5 is only initialized by the user-process with [6.0.0+]. | ||
Line 2,837: | Line 3,007: | ||
|- | |- | ||
| 0x7 || 0x1 || | | 0x7 || 0x1 || | ||
|} | |||
= PointingProcessorConfig = | |||
This is "nn::irsensor::PointingProcessorConfig". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x2 || WindowOfInterestX (default is 0) | |||
|- | |||
| 0x2 || 0x2 || WindowOfInterestY (default is 0) | |||
|- | |||
| 0x4 || 0x2 || WindowOfInterestWidth (default is 320) | |||
|- | |||
| 0x6 || 0x2 || WindowOfInterestHeight (default is 240) | |||
|} | |} | ||
= PackedPointingProcessorConfig = | = PackedPointingProcessorConfig = | ||
This is "nn::irsensor::PackedPointingProcessorConfig". This is | This is "nn::irsensor::PackedPointingProcessorConfig". | ||
This is converted from [[#PointingProcessorConfig]]. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 2,846: | Line 3,034: | ||
! Offset || Size || Description | ! Offset || Size || Description | ||
|- | |- | ||
| 0x0 || 0x2 || WindowOfInterestX | | 0x0 || 0x2 || WindowOfInterestX (default is 0) | ||
|- | |- | ||
| 0x2 || 0x2 || WindowOfInterestY | | 0x2 || 0x2 || WindowOfInterestY (default is 0) | ||
|- | |- | ||
| 0x4 || 0x2 || WindowOfInterestWidth | | 0x4 || 0x2 || WindowOfInterestWidth (default is 320) | ||
|- | |- | ||
| 0x6 || 0x2 || WindowOfInterestHeight | | 0x6 || 0x2 || WindowOfInterestHeight (default is 240) | ||
|- | |- | ||
| 0x8 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]] | | 0x8 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]] | ||
Line 2,858: | Line 3,046: | ||
= PackedMcuVersion = | = PackedMcuVersion = | ||
This is "nn::irsensor::PackedMcuVersion" | This is "nn::irsensor::PackedMcuVersion". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 2,886: | Line 3,074: | ||
= PackedFunctionLevel = | = PackedFunctionLevel = | ||
This is nn::irsensor::PackedFunctionLevel | This is nn::irsensor::PackedFunctionLevel. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 2,944: | Line 3,132: | ||
= PackedImageTransferProcessorExConfig = | = PackedImageTransferProcessorExConfig = | ||
This is "nn::irsensor::PackedImageTransferProcessorExConfig" | This is "nn::irsensor::PackedImageTransferProcessorExConfig". | ||
This is converted from [[#ImageTransferProcessorExConfig]]. | This is converted from [[#ImageTransferProcessorExConfig]]. | ||
Line 2,977: | Line 3,165: | ||
|} | |} | ||
= | = IrLedProcessorConfig = | ||
This is "nn::irsensor:: | This is "nn::irsensor::IrLedProcessorConfig". | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 2,984: | Line 3,172: | ||
! Offset || Size || Description | ! Offset || Size || Description | ||
|- | |- | ||
| 0x0 || 0x4 || | | 0x0 || 0x4 || LightTarget | ||
|} | |} | ||
= | = PackedIrLedProcessorConfig = | ||
This is "nn:: | This is "nn::irsensor::PackedIrLedProcessorConfig". | ||
This is converted from [[#IrLedProcessorConfig]]. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 2,996: | Line 3,184: | ||
! Offset || Size || Description | ! Offset || Size || Description | ||
|- | |- | ||
| 0x0 || 0x4 || | | 0x0 || 0x4 || [[#PackedMcuVersion|RequiredMcuVersion]] | ||
|- | |- | ||
| 0x4 || 0x1 || | | 0x4 || 0x1 || LightTarget | ||
|- | |- | ||
| 0x5 || | | 0x5 || 0x3 || Padding | ||
|} | |} | ||
= | = AdaptiveClusteringProcessorConfig = | ||
This is "nn:: | This is "nn::irsensor::AdaptiveClusteringProcessorConfig". | ||
AdaptiveClusteringProcessor was added with [5.0.0+]. | |||
This is copied from the entries in [[#EnableJoyPollingReceiveMode|TransferMemory]] by GetJoyPollingReceivedData. | This is converted to [[#TeraPluginProcessorConfig]] by the user-process. [[#TeraPluginProcessorConfig]]+0x3 is zero. | ||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x4 || [[#AdaptiveClusteringMode]] | |||
|- | |||
| 0x4 || 0x4 || [6.0.0+] [[#AdaptiveClusteringTargetDistance]] | |||
|} | |||
== AdaptiveClusteringMode == | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 || StaticFov | |||
|- | |||
| 1 || DynamicFov | |||
|} | |||
Controls the mode for [[#TeraPluginProcessorConfig]] (DynamicFov -> 0x10; StaticFov -> 0x0F). | |||
== AdaptiveClusteringTargetDistance == | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 || Near | |||
|- | |||
| 1 || Middle | |||
|- | |||
| 2 || Far | |||
|} | |||
Controls the second and third bytes for [[#TeraPluginProcessorConfig]] (Near-> 0x00, 0x00; Middle -> 0x01, 0x03; Far -> 0x01, 0x08). | |||
= HandAnalysisConfig = | |||
This is "nn::irsensor::HandAnalysisConfig". | |||
This is converted to [[#TeraPluginProcessorConfig]] by the user-process, which is all-zero except the mode. | |||
* pre-4.0.0: [[#TeraPluginProcessorConfig]] mode = [[#HandAnalysisMode]] - 1. | |||
* [4.0.0+]: Silhouette = 0x5, Image = 0x6, SilhouetteAndImage = 0x7, SilhouetteOnly = 0xA. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x4 || [[#HandAnalysisMode]] | |||
|} | |||
== HandAnalysisMode == | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 || None (invalid) | |||
|- | |||
| 1 || Silhouette | |||
|- | |||
| 2 || Image | |||
|- | |||
| 3 || SilhouetteAndImage | |||
|- | |||
| 4 || [4.0.0+] SilhouetteOnly | |||
|} | |||
= BusHandle = | |||
This is "nn::hidbus::BusHandle". | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset || Size || Description | |||
|- | |||
| 0x0 || 0x4 || AbstractedPadId | |||
|- | |||
| 0x4 || 0x1 || InternalIndex | |||
|- | |||
| 0x5 || 0x1 || PlayerNumber | |||
|- | |||
| 0x6 || 0x1 || BusTypeId | |||
|- | |||
| 0x7 || 0x1 || IsValid | |||
|} | |||
= JoyPollingReceivedData = | |||
This is "nn::hidbus::JoyPollingReceivedData". | |||
This is copied from the entries in [[#EnableJoyPollingReceiveMode|TransferMemory]] by GetJoyPollingReceivedData. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
Line 3,017: | Line 3,291: | ||
|- | |- | ||
| 0x0 || 0x30 || Data | | 0x0 || 0x30 || Data | ||
|- | |- | ||
| 0x30 || 0x8 || Size of data. | | 0x30 || 0x8 || Size of data. | ||
|- | |- | ||
| 0x38 || 0x8 || Timestamp | | 0x38 || 0x8 || Timestamp | ||
|} | |||
= BusType = | |||
This is "nn::hidbus::BusType". | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 || JoyLeftRail | |||
|- | |||
| 1 || JoyRightRail | |||
|- | |||
| 2 || [6.0.0+] LarkRightRail (for microphone) | |||
|} | |||
= JoyPollingMode = | |||
This is "nn::hidbus::JoyPollingMode". | |||
{| class="wikitable" border="1" | |||
! Value | |||
! Description | |||
|- | |||
| 0 || sdknso uses <code>GetJoyDisableSixAxisPollingDataAccessor</code> with this. | |||
|- | |||
| 1 || sdknso uses <code>GetJoyEnableSixAxisPollingDataAccessor</code> with this. | |||
|- | |||
| 2 || [6.0.0+] sdknso uses <code>GetJoyButtonOnlyPollingDataAccessor</code> with this. | |||
|} | |} | ||
Other values causes [[#EnableJoyPollingReceiveMode]] to assert. | |||
= ExternalDevices = | = ExternalDevices = |