h$TnN      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe-Inferred None/switchA constraint which indicates that a Nintendo Switch controller is able to turn portions of its internal flash memory into valid calibration information.switchA handle which represents a connected Nintendo Switch controller.switchThe types of Nintendo Switch controllers that are currently supported by this library.Repeat the configured home light configuration cycles forever.switchRepeat the configured home light configuration cycles a specific amount of times. It will always be limited to an interval between 1 and 15.switchA home light cycle consists of a target LED intensity, a fade factor which controls the time needed to reach that LED intensity, and a light factor which controls how long to keep the target LED intensity up.switchThe light duration factor of the home light. It will always be limited to an interval between 0 and 15 and is multiplied with the "7 to obtain the overall light duration in milliseconds. switchThe fade duration factor of the home light. It will always be limited to an interval between 0 and 15 and is multiplied with the "6 to obtain the overall fade duration in milliseconds.!switchThe LED intensity of the home light. It will always be limited to an interval between 0 and 100."switchThe base duration of a home light configuration in milliseconds. It will always be limited to an interval between 8ms and 175ms. It is called base duration because it will be multiplied with other factors in order to obtain the overall durations of fadings within home light configurations.#switchAn # is thrown if something goes wrong when sending commands to a Nintendo Switch controller.%switchA constraint which indicates that a Nintendo Switch controller supports multiple input modes (see -).&switchA constraint which indicates that a Nintendo Switch controller has player lights (i.e., the four LEDs which represent the player number; see :).'switchA constraint which indicates that a Nintendo Switch controller has a right-side rumble unit (see 2).(switchA constraint which indicates that a Nintendo Switch controller has a left-side rumble unit (see 1).)switchA constraint which indicates that a Nintendo Switch controller has a home light (see +).*switchA convenient home light configuration which pulsates the home light LED:   ( 100 ) -- Base duration factor is 100ms. ( 0 ) -- LED is turned off at the beginning (intensity 0). [ (100, 5, 1) -- Fade to LED intensity 100 in 500ms (100ms * 5) and stay there for 100ms (100ms * 1). , ( 0, 5, 1) ] -- Fade to LED intensity 0 in 500ms (100ms * 5) and stay there for 100ms (100ms * 1). ( Forever ) -- Repeat these two cycles forever, thus generating a pulse-like LED. +switchSets the home light (i.e., the LED ring around the home button) of a Nintendo Switch controller.Note: After sending a command like this to a controller, it is highly advised to check its corresponding  (!, to be exact) or at least call  once before sending another command to that controller. The function  is a convenient way to wait for a specific command reply from the controller.,switch Enables () or disables () the inertial measurement unit (i.e., accelerometer, gyroscope) of a Nintendo Switch controller. Inertial measurement is disabled by default.Note: After sending a command like this to a controller, it is highly advised to check its corresponding  (!, to be exact) or at least call  once before sending another command to that controller. The function  is a convenient way to wait for a specific command reply from the controller.-switch4Sets the input mode of a Nintendo Switch controller.Note: After sending a command like this to a controller, it is highly advised to check its corresponding  (!, to be exact) or at least call  once before sending another command to that controller. The function  is a convenient way to wait for a specific command reply from the controller..switchA convenient rumble configuration indicating a medium rumble strength.   {  = 800 ,  = 0.5 ,  = 330 ,  = 0.75 } /switch7A convenient rumble configuration indicating no rumble.0switch Enables () or disables () the rumble feature of a Nintendo Switch controller. The rumble feature is disabled by default.Note: After sending a command like this to a controller, it is highly advised to check its corresponding  (!, to be exact) or at least call  once before sending another command to that controller. The function  is a convenient way to wait for a specific command reply from the controller.1switch5Sets the left rumble of a Nintendo Switch controller.2switch6Sets the right rumble of a Nintendo Switch controller.3switchSets both the left rumble and right rumble of a Nintendo Switch controller. Note that this is more efficient than setting the left rumble and right rumble separately via 1 and 2.4switchA convenient player lights configuration where all LEDs are turned off.5switchA convenient player lights configuration indicating player one (i.e.,   is set).6switchA convenient player lights configuration indicating player two (i.e.,   is set).7switchA convenient player lights configuration indicating player three (i.e.,  is set).8switchA convenient player lights configuration indicating player four (i.e.,  is set).9switchA convenient player lights configuration where all LEDs are flashing.:switch7Sets the player lights of a Nintendo Switch controller.Note: After sending a command like this to a controller, it is highly advised to check its corresponding  (!, to be exact) or at least call  once before sending another command to that controller. The function  is a convenient way to wait for a specific command reply from the controller.3switch#The left-side rumble configuration.switch$The right-side rumble configuration.switch#The controller which should rumble.    !"#$%&'()*+,-./0123456789:None/5D;switchInformation about the battery of a Nintendo Switch controller. It is only returned by  (see |) if the controller sends a command reply or the input mode of the controller is .?switch3The battery status of a Nintendo Switch controller.Eswitch=The nine possible discrete positions of the analog stick in  input mode.OswitchThe direction of the left (y ) and right (z) analog sticks.PswitchIn 9 input mode, controllers send discrete stick directions.QswitchIn  input mode, controllers send analog stick directions. The first value is left/right (interval [-1,1]*), the second value is down/up (interval [-1,1]).RswitchData type that combines the command type and its corresponding acknowledgement.Xswitch?Whenever a command is sent to a controller (e.g., setting the #), the controller replies with an X.YswitchThe command was executed successfully, possibly holding some response data (e.g., if the command was a query of the internal SPI flash memory).Zswitch*The command was not executed successfully.[switchDepending on the , b can contain additional information: Replies to commands (e.g., an acknowledgement when sending a rumble command) and inertial sensor data (i.e., accelerometer and gyroscope).\switch=After sending commands to the controller (e.g., setting the ), a command reply is returned as extra data in the next input.]switchA controller provides inertial sensor data (i.e., accelerometer and gyroscope) only if it is in 7 input mode and inertial measurement is activated via .Regarding the x/y/z coordinate system, consider the left Joy-Con lying flat on a table, the analog stick pointing up. The x-axis then points towards the Z/ZL shoulder buttons (or alternatively: to where the up arrow button is pointing), the y-axis points to the opposite side of the SL/SR buttons (or alternatively: to where the left arrow button is pointing), and the z-axis points up in the air. The coordinate system is the same for all controller types.^switch1Indicates that there is no additional input data._switchGyroscope data consists of three measurements recorded in 15ms (i.e., the precision is 5ms). Each measurement is an x/y/z triple measured in radians per second.`switchAccelerometer data consists of three measurements recorded in 15ms (i.e., the precision is 5ms). Each measurement is an x/y/z triple measured in Gs.aswitch:The input provided by a Nintendo Switch controller, where s8 is the numeric type of the analog stick direction and e is the numeric type of the sensor readings (i.e., accelerometer and gyroscope).}switch3The input provided by a Nintendo Switch controller.~switchAn ~( is thrown if something goes wrong with .switchIndicates that an expected reply wasn't received in a specific time interval.switchIndicates that the controller input has an unexpected format. It essentially means that a specific part of the protocol has not been implemented yet. This should not occur as long as you stick to the public API of this library.switchA constraint which indicates that a Nintendo Switch controller can provide } (see ).switchA convenient constant that represents no input. This can be used to set specific buttons and stick directions in order to test functions without having a Nintendo Switch controller at hand, like:   { q = , y = P H } switch?Converts stick directions into x/y coordinates in the interval [-1,1]. Q values are taken as is, while P7 directions are converted to their analog counterpart.switchMerges the inputs of two Nintendo Switch controllers. The resulting input contains the left button states and left analog stick direction from one input, and the right button states and right analog stick direction from the other input. This can be used to unify the inputs of two controllers that belong together (e.g., a pair of left and right Joy-Cons).Note that the { and | information of the original inputs are discarded in the merged input (they are set to ^ and , respectively).switchReads input from a Nintendo Switch controller. Blocks until controller input is available.switchReads input from a Nintendo Switch controller. Blocks until controller input is available or a given time interval elapses.switchConsumes inputs from a Nintendo Switch controller until a specific command reply is encountered. Throws a  if the expected command reply is not encountered within a specified count of inputs.This function can be used to make sure that the controller is in an expected state after sending commands (e.g., to wait for an X after switching its ).switch!The left-side input to be merged.switch"The right-side input to be merged.switchThe merged input, without { and |.switch"The time interval in milliseconds.switch&The controller to read the input from.switchReturns  if the controller does not provide an input within the specified time interval.switch4The maximum count of inputs that should be consumed.switch The timeout per input read (see ).switch&The controller to read the input from.switch=?CBAD@ENMLKHFJIGOPQRWVUTSXZY[^]\_`abxwvutsrqponmlkjihgfedc{zy|}~None/Lg switchA  is thrown if something goes wrong when reading the internal data of a Nintendo Switch controller when connecting to it. This should not occur if you have an unmodified controller (i.e., you have not tampered with its internal SPI flash memory).switch=Indicates that a controller has no factory stick calibration.switch>Indicates that a controller has no factory sensor calibration.switchA constraint which indicates that a controller is a valid Nintendo Switch controller that can be detected and connected to.switchA handle which represents an unconnected Nintendo Switch controller.switchA handle which represents a virtual Nintendo Switch console. The handle is used to detect controllers and manage their connections.switchInitializes a Nintendo Switch console handle. In other words, it lets us pretend to be Nintendo Switch console in order to detect controllers and manage their connections. You must call this first before doing anything else.switchDestroys a virtual Nintendo Switch handle. You must call this when you are finished talking to the controllers.switchA convenient wrapper around  and .switch2Connects to a detected Nintendo Switch controller. Can throw a  if something is very wrong with your internal controller memory (i.e., if you have tampered with it).switchDisconnects a Nintendo Switch controller. You must not use the controller handle after disconnecting.switchA convenient wrapper around  and .switch6Detects all Nintendo Switch controllers of a specific #, usually connected via Bluetooth.'You may want to use this function with TypeApplications2 if the controller type cannot be inferred, like:   @' console switch(The detected Nintendo Switch controller.switch)The connected Nintendo Switch controller.(c) Michael Szvetits, 2021BSD3 (see the file LICENSE)typedbyte@qualified.namestableportableNoneM  !"#$%&'()*+,-./0123456789:;<=>?@DABCEGIJFHKLMNOQPRSTUVWXYZ[\]^_`ab|yz{cdefghijklmnopqrstuvwx}~-,}ab|yz{cdefghijklmnopqrstuvwxOQPEGIJFHKLMN;<=>?@DABC[\]^`_RSTUVWXYZ+"! *:  4567890123./~#$%)&(' Safe-InferredN !"#$%&''()*+,,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRRSTUVWXYZ[\]^_`abcde fghij klmnopqrstuvwxyz{|}~   switch-0.1.0.0-inplaceDevice.Nintendo.SwitchDevice.Nintendo.Switch.Utils!Device.Nintendo.Switch.ControllergetControllerInfosDevice.Nintendo.Switch.OutputgetInputInputbatteryAnalog stickLeft stickRightInertialextras CommandReplyDiscrete SetHomeLightwithCommandReplySetInertialMeasurement SetInputMode SetVibrationSetPlayerLightsDevice.Nintendo.Switch.InputStandardSimple InputModesetInertialMeasurement!Device.Nintendo.Switch.Connection Paths_switchHasCalibration ControllerControllerType LeftJoyCon RightJoyCon ProController LightModeLightOnLightOffFlashingPlayerLightsConfigled0led1led2led3 RumbleConfig highFrequency highAmplitude lowFrequency lowAmplitudeHomeLightConfigOffOnceCyclicRepeatBehaviour CycleConfig LightFactor FadeFactor Intensity BaseDurationOutputExceptionWriteException HasInputModeHasPlayerLightsHasRightRumble HasLeftRumble HasHomeLight endlessPulse setHomeLight setInputMode normalRumblenoRumble setVibration setLeftRumblesetRightRumble setRumblenoPlayerLights playerOne playerTwo playerThree playerFourflashAllsetPlayerLights BatteryInfo batteryStatuscharging BatteryStatusEmptyLowMediumGoodFull DirectionNoneLeftUpRightDownLeftUpLeftDownRightUp RightDownStickDirection ReplyDataAcknowledgementACKNACK ExtraInput Unavailable Gyroscope AccelerometerControllerInputbtnLbtnZLbtnMinus btnLeftStickbtnUpbtnLeftbtnRightbtnDown btnCapture btnLeftSL btnLeftSRbtnRbtnZRbtnPlusbtnXbtnYbtnAbtnB btnRightStickbtnHome btnRightSL btnRightSRInputExceptionNoReplyExceptionUnknownFormatExceptionHasInputnoInput coordinates mergeInputsgetTimeoutInputConnectionExceptionNoFactoryStickExceptionNoFactoryAxisException IsControllerControllerInfoConsoleinitexit withConsoleconnect disconnectwithController checkMaskclampcombinepairs discretize tripleZipWith tripleMaplittleEndianWord16Parser tripleParser calibrateStickCalibrationplusYcenterYminusYplusXcenterXminusX deadOuter deadCenterRawCalibration rawSensorCalrawRightStickCalrawLeftStickCalRawStickCalibrationrawPlusY rawCenterY rawMinusYrawPlusX rawCenterX rawMinusXRawSensorCalibrationrawGyroSensitivityrawGyrorawAccSensitivityrawAcc Calibration rightStickCal leftStickCal gyroCoeffs accCoeffs calibrationcounterhandle toAccCoeff toGyroCoeff toStickCalaxisCalibrationParseraxisUserParserparseStickUserCalibrationstickCalibrationParserleftStickCalibrationParserrightStickCalibrationParserstickFactoryParserstickUserParserForeverTimesghc-prim GHC.TypesTrueFalselightConfigCommandsetInputModeInternalneutralPartRumble neutralRumble sendCommandsendRawSubcommandsendSubcommandencodeHFencodeLFencodeHAencodeLArumblePartCommandsendRawRumbleCommand requestRawSPIbase GHC.MaybeNothingJustUnknownCommand RequestSPIRawInputconvert adjustSensor readRawInputreadRawTimeoutInput inputParsercommandDetailParser ackParsertoAckrequestSPIReplyParserhomeLightReplyParservibrationReplyParserinertialReplyParserinputModeReplyParserplayerLightsReplyParserunknownCommandParserstandardParser commandParserbuttonPushParser batteryParserbuttonStandardParserrawStickParser adjustStickwithRawSPIDatawithRawCommandReplyvendorID productIDversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName