nn::hid::CTR::PadReader

nn::hid::CTR::PadReader Class

Syntax

class PadReader : private nn::util::NonCopyable< PadReader >

Description

A class that reads sampling data from the gamepad (the gameplay buttons and the Circle Pad).

The gamepad is sampled every 4 milliseconds.

Enumerated Types

StickClampMode Enumerated type that indicates the Circle Pad clamp mode set by the SetStickClampMode function.

Member Constants

S MAX_READ_NUM const s8 The maximum number of data samples that can be read.

Member Functions

PadReader Constructor.
~PadReader Destructor.
Read Loads sampling data from the gamepad, starting with the most recent samples. Does not load any data that has been previously loaded.
ReadLatest Loads the most recent sampling data from the gamepad. Unlike the nn::hid::CTR::PadReader::Read function, this function can load the same sampling data more than once.
SetStickClamp Sets the clamp values for the Circle Pad.
GetStickClamp Gets the clamp values of the current clamp mode for the Circle Pad.
GetStickClampMode Gets the clamp mode for the Circle Pad.
SetStickClampMode Sets the clamp mode for the Circle Pad.
NormalizeStick Normalizes and returns the Circle Pad values obtained by the Read and ReadLatest functions to floating-point values between -1.0 and 1.0.
NormalizeStickWithScale Normalizes and returns the Circle Pad values obtained by the Read and ReadLatest functions to floating-point values between -1.0 and 1.0. Includes a sensitivity correction feature.
SetNormalizeStickScaleSettings Configures the NormalizeStickWithScale settings.
GetNormalizeStickScaleSettings Gets the NormalizeStickWithScale settings.

Class Hierarchy

nn::util::NonCopyable
  nn::hid::CTR::PadReader

Revision History

2011/10/09
Revised Japanese terminology for the Circle Pad.
2010/10/15
Added NormalizeStickWithScale, SetNormalizeStickScaleSettings, GetNormalizeStickScaleSettings.
2010/01/07
Initial version.

CONFIDENTIAL