StartSampling

nn::hid::CTR::ExtraPad::StartSampling Member Function

Syntax

static nn::Result StartSampling(
     s32 samplingThreadPriority,
     s32 period
);

Parameters

Name Description
in samplingThreadPriority Sets the priority for the sampling thread. The higher the priority, the more stable you can expect the sampling to be.
in period Sets the sampling period. Set a value in the range from 8 to 32 milliseconds. The shorter the sampling period, the higher the load.

Return Values

Returns the function's result. Returns one of the Result values listed below.

Value Description
Result::IsSuccess Process succeeded and sampling of the Nintendo 3DS Circle Pad Pro has started.
MakeResultNoConnection The Nintendo 3DS Circle Pad Pro could not be found.
MakeResultInvalidCombination Inappropriate argument.
MakeResultNotInitialized Not initialized.

Description

Starts sampling the Nintendo 3DS Circle Pad Pro. When this function succeeds, a thread for sampling is created internally using application resources.

It takes approximately 50 to 200 milliseconds for the Circle Pad Pro to be connected successfully or up to approximately 100 milliseconds for the connection to fail. If this function is called when sampling has already started, it will disconnect and then connect. The sampling thread is released by a call to the StopSampling function.

Revision History

2011/10/06
Initial version.

CONFIDENTIAL