2013-03-28 08:26:02 +01:00
|
|
|
#include "hidescriptorparser.h"
|
|
|
|
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::usagePageTitles0[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsagePageGenericDesktopControls,
|
|
|
|
pstrUsagePageSimulationControls,
|
|
|
|
pstrUsagePageVRControls,
|
|
|
|
pstrUsagePageSportControls,
|
|
|
|
pstrUsagePageGameControls,
|
|
|
|
pstrUsagePageGenericDeviceControls,
|
|
|
|
pstrUsagePageKeyboardKeypad,
|
|
|
|
pstrUsagePageLEDs,
|
|
|
|
pstrUsagePageButton,
|
|
|
|
pstrUsagePageOrdinal,
|
|
|
|
pstrUsagePageTelephone,
|
|
|
|
pstrUsagePageConsumer,
|
|
|
|
pstrUsagePageDigitizer,
|
|
|
|
pstrUsagePagePID,
|
|
|
|
pstrUsagePageUnicode
|
|
|
|
};
|
|
|
|
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::usagePageTitles1[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsagePageBarCodeScanner,
|
|
|
|
pstrUsagePageScale,
|
|
|
|
pstrUsagePageMSRDevices,
|
|
|
|
pstrUsagePagePointOfSale,
|
|
|
|
pstrUsagePageCameraControl,
|
|
|
|
pstrUsagePageArcade
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::genDesktopTitles0[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsagePointer,
|
|
|
|
pstrUsageMouse,
|
|
|
|
pstrUsageJoystick,
|
|
|
|
pstrUsageGamePad,
|
|
|
|
pstrUsageKeyboard,
|
|
|
|
pstrUsageKeypad,
|
|
|
|
pstrUsageMultiAxisController,
|
|
|
|
pstrUsageTabletPCSystemControls
|
|
|
|
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::genDesktopTitles1[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageX,
|
|
|
|
pstrUsageY,
|
|
|
|
pstrUsageZ,
|
|
|
|
pstrUsageRx,
|
|
|
|
pstrUsageRy,
|
|
|
|
pstrUsageRz,
|
|
|
|
pstrUsageSlider,
|
|
|
|
pstrUsageDial,
|
|
|
|
pstrUsageWheel,
|
|
|
|
pstrUsageHatSwitch,
|
|
|
|
pstrUsageCountedBuffer,
|
|
|
|
pstrUsageByteCount,
|
|
|
|
pstrUsageMotionWakeup,
|
|
|
|
pstrUsageStart,
|
|
|
|
pstrUsageSelect,
|
|
|
|
pstrUsagePageReserved,
|
|
|
|
pstrUsageVx,
|
|
|
|
pstrUsageVy,
|
|
|
|
pstrUsageVz,
|
|
|
|
pstrUsageVbrx,
|
|
|
|
pstrUsageVbry,
|
|
|
|
pstrUsageVbrz,
|
|
|
|
pstrUsageVno,
|
|
|
|
pstrUsageFeatureNotification,
|
|
|
|
pstrUsageResolutionMultiplier
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::genDesktopTitles2[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageSystemControl,
|
|
|
|
pstrUsageSystemPowerDown,
|
|
|
|
pstrUsageSystemSleep,
|
|
|
|
pstrUsageSystemWakeup,
|
|
|
|
pstrUsageSystemContextMenu,
|
|
|
|
pstrUsageSystemMainMenu,
|
|
|
|
pstrUsageSystemAppMenu,
|
|
|
|
pstrUsageSystemMenuHelp,
|
|
|
|
pstrUsageSystemMenuExit,
|
|
|
|
pstrUsageSystemMenuSelect,
|
|
|
|
pstrUsageSystemMenuRight,
|
|
|
|
pstrUsageSystemMenuLeft,
|
|
|
|
pstrUsageSystemMenuUp,
|
|
|
|
pstrUsageSystemMenuDown,
|
|
|
|
pstrUsageSystemColdRestart,
|
|
|
|
pstrUsageSystemWarmRestart,
|
|
|
|
pstrUsageDPadUp,
|
|
|
|
pstrUsageDPadDown,
|
|
|
|
pstrUsageDPadRight,
|
|
|
|
pstrUsageDPadLeft
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::genDesktopTitles3[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageSystemDock,
|
|
|
|
pstrUsageSystemUndock,
|
|
|
|
pstrUsageSystemSetup,
|
|
|
|
pstrUsageSystemBreak,
|
|
|
|
pstrUsageSystemDebuggerBreak,
|
|
|
|
pstrUsageApplicationBreak,
|
|
|
|
pstrUsageApplicationDebuggerBreak,
|
|
|
|
pstrUsageSystemSpeakerMute,
|
|
|
|
pstrUsageSystemHibernate
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::genDesktopTitles4[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageSystemDisplayInvert,
|
|
|
|
pstrUsageSystemDisplayInternal,
|
|
|
|
pstrUsageSystemDisplayExternal,
|
|
|
|
pstrUsageSystemDisplayBoth,
|
|
|
|
pstrUsageSystemDisplayDual,
|
|
|
|
pstrUsageSystemDisplayToggleIntExt,
|
|
|
|
pstrUsageSystemDisplaySwapPriSec,
|
|
|
|
pstrUsageSystemDisplayLCDAutoscale
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::simuTitles0[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageFlightSimulationDevice,
|
|
|
|
pstrUsageAutomobileSimulationDevice,
|
|
|
|
pstrUsageTankSimulationDevice,
|
|
|
|
pstrUsageSpaceshipSimulationDevice,
|
|
|
|
pstrUsageSubmarineSimulationDevice,
|
|
|
|
pstrUsageSailingSimulationDevice,
|
|
|
|
pstrUsageMotocicleSimulationDevice,
|
|
|
|
pstrUsageSportsSimulationDevice,
|
|
|
|
pstrUsageAirplaneSimulationDevice,
|
|
|
|
pstrUsageHelicopterSimulationDevice,
|
|
|
|
pstrUsageMagicCarpetSimulationDevice,
|
|
|
|
pstrUsageBicycleSimulationDevice
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::simuTitles1[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageFlightControlStick,
|
|
|
|
pstrUsageFlightStick,
|
|
|
|
pstrUsageCyclicControl,
|
|
|
|
pstrUsageCyclicTrim,
|
|
|
|
pstrUsageFlightYoke,
|
|
|
|
pstrUsageTrackControl
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::simuTitles2[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageAileron,
|
|
|
|
pstrUsageAileronTrim,
|
|
|
|
pstrUsageAntiTorqueControl,
|
|
|
|
pstrUsageAutopilotEnable,
|
|
|
|
pstrUsageChaffRelease,
|
|
|
|
pstrUsageCollectiveControl,
|
|
|
|
pstrUsageDiveBrake,
|
|
|
|
pstrUsageElectronicCountermeasures,
|
|
|
|
pstrUsageElevator,
|
|
|
|
pstrUsageElevatorTrim,
|
|
|
|
pstrUsageRudder,
|
|
|
|
pstrUsageThrottle,
|
|
|
|
pstrUsageFlightCommunications,
|
|
|
|
pstrUsageFlareRelease,
|
|
|
|
pstrUsageLandingGear,
|
|
|
|
pstrUsageToeBrake,
|
|
|
|
pstrUsageTrigger,
|
|
|
|
pstrUsageWeaponsArm,
|
|
|
|
pstrUsageWeaponsSelect,
|
|
|
|
pstrUsageWingFlaps,
|
|
|
|
pstrUsageAccelerator,
|
|
|
|
pstrUsageBrake,
|
|
|
|
pstrUsageClutch,
|
|
|
|
pstrUsageShifter,
|
|
|
|
pstrUsageSteering,
|
|
|
|
pstrUsageTurretDirection,
|
|
|
|
pstrUsageBarrelElevation,
|
|
|
|
pstrUsageDivePlane,
|
|
|
|
pstrUsageBallast,
|
|
|
|
pstrUsageBicycleCrank,
|
|
|
|
pstrUsageHandleBars,
|
|
|
|
pstrUsageFrontBrake,
|
|
|
|
pstrUsageRearBrake
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::vrTitles0[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageBelt,
|
|
|
|
pstrUsageBodySuit,
|
|
|
|
pstrUsageFlexor,
|
|
|
|
pstrUsageGlove,
|
|
|
|
pstrUsageHeadTracker,
|
|
|
|
pstrUsageHeadMountedDisplay,
|
|
|
|
pstrUsageHandTracker,
|
|
|
|
pstrUsageOculometer,
|
|
|
|
pstrUsageVest,
|
|
|
|
pstrUsageAnimatronicDevice
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::vrTitles1[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageStereoEnable,
|
|
|
|
pstrUsageDisplayEnable
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::sportsCtrlTitles0[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageBaseballBat,
|
|
|
|
pstrUsageGolfClub,
|
|
|
|
pstrUsageRowingMachine,
|
|
|
|
pstrUsageTreadmill
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::sportsCtrlTitles1[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageOar,
|
|
|
|
pstrUsageSlope,
|
|
|
|
pstrUsageRate,
|
|
|
|
pstrUsageStickSpeed,
|
|
|
|
pstrUsageStickFaceAngle,
|
|
|
|
pstrUsageStickHeelToe,
|
|
|
|
pstrUsageStickFollowThough,
|
|
|
|
pstrUsageStickTempo,
|
|
|
|
pstrUsageStickType,
|
|
|
|
pstrUsageStickHeight
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::sportsCtrlTitles2[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsagePutter,
|
|
|
|
pstrUsage1Iron,
|
|
|
|
pstrUsage2Iron,
|
|
|
|
pstrUsage3Iron,
|
|
|
|
pstrUsage4Iron,
|
|
|
|
pstrUsage5Iron,
|
|
|
|
pstrUsage6Iron,
|
|
|
|
pstrUsage7Iron,
|
|
|
|
pstrUsage8Iron,
|
|
|
|
pstrUsage9Iron,
|
|
|
|
pstrUsage10Iron,
|
|
|
|
pstrUsage11Iron,
|
|
|
|
pstrUsageSandWedge,
|
|
|
|
pstrUsageLoftWedge,
|
|
|
|
pstrUsagePowerWedge,
|
|
|
|
pstrUsage1Wood,
|
|
|
|
pstrUsage3Wood,
|
|
|
|
pstrUsage5Wood,
|
|
|
|
pstrUsage7Wood,
|
|
|
|
pstrUsage9Wood
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::gameTitles0[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsage3DGameController,
|
|
|
|
pstrUsagePinballDevice,
|
|
|
|
pstrUsageGunDevice
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::gameTitles1[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsagePointOfView,
|
|
|
|
pstrUsageTurnRightLeft,
|
|
|
|
pstrUsagePitchForwardBackward,
|
|
|
|
pstrUsageRollRightLeft,
|
|
|
|
pstrUsageMoveRightLeft,
|
|
|
|
pstrUsageMoveForwardBackward,
|
|
|
|
pstrUsageMoveUpDown,
|
|
|
|
pstrUsageLeanRightLeft,
|
|
|
|
pstrUsageLeanForwardBackward,
|
|
|
|
pstrUsageHeightOfPOV,
|
|
|
|
pstrUsageFlipper,
|
|
|
|
pstrUsageSecondaryFlipper,
|
|
|
|
pstrUsageBump,
|
|
|
|
pstrUsageNewGame,
|
|
|
|
pstrUsageShootBall,
|
|
|
|
pstrUsagePlayer,
|
|
|
|
pstrUsageGunBolt,
|
|
|
|
pstrUsageGunClip,
|
|
|
|
pstrUsageGunSelector,
|
|
|
|
pstrUsageGunSingleShot,
|
|
|
|
pstrUsageGunBurst,
|
|
|
|
pstrUsageGunAutomatic,
|
|
|
|
pstrUsageGunSafety,
|
|
|
|
pstrUsageGamepadFireJump,
|
|
|
|
pstrUsageGamepadTrigger
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::genDevCtrlTitles[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageBatteryStrength,
|
|
|
|
pstrUsageWirelessChannel,
|
|
|
|
pstrUsageWirelessID,
|
|
|
|
pstrUsageDiscoverWirelessControl,
|
|
|
|
pstrUsageSecurityCodeCharEntered,
|
|
|
|
pstrUsageSecurityCodeCharErased,
|
|
|
|
pstrUsageSecurityCodeCleared
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::ledTitles[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageNumLock,
|
|
|
|
pstrUsageCapsLock,
|
|
|
|
pstrUsageScrollLock,
|
|
|
|
pstrUsageCompose,
|
|
|
|
pstrUsageKana,
|
|
|
|
pstrUsagePower,
|
|
|
|
pstrUsageShift,
|
|
|
|
pstrUsageDoNotDisturb,
|
|
|
|
pstrUsageMute,
|
|
|
|
pstrUsageToneEnable,
|
|
|
|
pstrUsageHighCutFilter,
|
|
|
|
pstrUsageLowCutFilter,
|
|
|
|
pstrUsageEqualizerEnable,
|
|
|
|
pstrUsageSoundFieldOn,
|
|
|
|
pstrUsageSurroundOn,
|
|
|
|
pstrUsageRepeat,
|
|
|
|
pstrUsageStereo,
|
|
|
|
pstrUsageSamplingRateDetect,
|
|
|
|
pstrUsageSpinning,
|
|
|
|
pstrUsageCAV,
|
|
|
|
pstrUsageCLV,
|
|
|
|
pstrUsageRecordingFormatDetect,
|
|
|
|
pstrUsageOffHook,
|
|
|
|
pstrUsageRing,
|
|
|
|
pstrUsageMessageWaiting,
|
|
|
|
pstrUsageDataMode,
|
|
|
|
pstrUsageBatteryOperation,
|
|
|
|
pstrUsageBatteryOK,
|
|
|
|
pstrUsageBatteryLow,
|
|
|
|
pstrUsageSpeaker,
|
|
|
|
pstrUsageHeadSet,
|
|
|
|
pstrUsageHold,
|
|
|
|
pstrUsageMicrophone,
|
|
|
|
pstrUsageCoverage,
|
|
|
|
pstrUsageNightMode,
|
|
|
|
pstrUsageSendCalls,
|
|
|
|
pstrUsageCallPickup,
|
|
|
|
pstrUsageConference,
|
|
|
|
pstrUsageStandBy,
|
|
|
|
pstrUsageCameraOn,
|
|
|
|
pstrUsageCameraOff,
|
|
|
|
pstrUsageOnLine,
|
|
|
|
pstrUsageOffLine,
|
|
|
|
pstrUsageBusy,
|
|
|
|
pstrUsageReady,
|
|
|
|
pstrUsagePaperOut,
|
|
|
|
pstrUsagePaperJam,
|
|
|
|
pstrUsageRemote,
|
|
|
|
pstrUsageForward,
|
|
|
|
pstrUsageReverse,
|
|
|
|
pstrUsageStop,
|
|
|
|
pstrUsageRewind,
|
|
|
|
pstrUsageFastForward,
|
|
|
|
pstrUsagePlay,
|
|
|
|
pstrUsagePause,
|
|
|
|
pstrUsageRecord,
|
|
|
|
pstrUsageError,
|
|
|
|
pstrUsageSelectedIndicator,
|
|
|
|
pstrUsageInUseIndicator,
|
|
|
|
pstrUsageMultiModeIndicator,
|
|
|
|
pstrUsageIndicatorOn,
|
|
|
|
pstrUsageIndicatorFlash,
|
|
|
|
pstrUsageIndicatorSlowBlink,
|
|
|
|
pstrUsageIndicatorFastBlink,
|
|
|
|
pstrUsageIndicatorOff,
|
|
|
|
pstrUsageFlashOnTime,
|
|
|
|
pstrUsageSlowBlinkOnTime,
|
|
|
|
pstrUsageSlowBlinkOffTime,
|
|
|
|
pstrUsageFastBlinkOnTime,
|
|
|
|
pstrUsageFastBlinkOffTime,
|
|
|
|
pstrUsageIndicatorColor,
|
|
|
|
pstrUsageIndicatorRed,
|
|
|
|
pstrUsageIndicatorGreen,
|
|
|
|
pstrUsageIndicatorAmber,
|
|
|
|
pstrUsageGenericIndicator,
|
|
|
|
pstrUsageSystemSuspend,
|
|
|
|
pstrUsageExternalPowerConnected
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::telTitles0 [] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsagePhone,
|
|
|
|
pstrUsageAnsweringMachine,
|
|
|
|
pstrUsageMessageControls,
|
|
|
|
pstrUsageHandset,
|
|
|
|
pstrUsageHeadset,
|
|
|
|
pstrUsageTelephonyKeyPad,
|
|
|
|
pstrUsageProgrammableButton
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::telTitles1 [] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageHookSwitch,
|
|
|
|
pstrUsageFlash,
|
|
|
|
pstrUsageFeature,
|
|
|
|
pstrUsageHold,
|
|
|
|
pstrUsageRedial,
|
|
|
|
pstrUsageTransfer,
|
|
|
|
pstrUsageDrop,
|
|
|
|
pstrUsagePark,
|
|
|
|
pstrUsageForwardCalls,
|
|
|
|
pstrUsageAlternateFunction,
|
|
|
|
pstrUsageLine,
|
|
|
|
pstrUsageSpeakerPhone,
|
|
|
|
pstrUsageConference,
|
|
|
|
pstrUsageRingEnable,
|
|
|
|
pstrUsageRingSelect,
|
|
|
|
pstrUsagePhoneMute,
|
|
|
|
pstrUsageCallerID,
|
|
|
|
pstrUsageSend
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::telTitles2 [] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageSpeedDial,
|
|
|
|
pstrUsageStoreNumber,
|
|
|
|
pstrUsageRecallNumber,
|
|
|
|
pstrUsagePhoneDirectory
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::telTitles3 [] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageVoiceMail,
|
|
|
|
pstrUsageScreenCalls,
|
|
|
|
pstrUsageDoNotDisturb,
|
|
|
|
pstrUsageMessage,
|
|
|
|
pstrUsageAnswerOnOff
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::telTitles4 [] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageInsideDialTone,
|
|
|
|
pstrUsageOutsideDialTone,
|
|
|
|
pstrUsageInsideRingTone,
|
|
|
|
pstrUsageOutsideRingTone,
|
|
|
|
pstrUsagePriorityRingTone,
|
|
|
|
pstrUsageInsideRingback,
|
|
|
|
pstrUsagePriorityRingback,
|
|
|
|
pstrUsageLineBusyTone,
|
|
|
|
pstrUsageReorderTone,
|
|
|
|
pstrUsageCallWaitingTone,
|
|
|
|
pstrUsageConfirmationTone1,
|
|
|
|
pstrUsageConfirmationTone2,
|
|
|
|
pstrUsageTonesOff,
|
|
|
|
pstrUsageOutsideRingback,
|
|
|
|
pstrUsageRinger
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::telTitles5 [] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsagePhoneKey0,
|
|
|
|
pstrUsagePhoneKey1,
|
|
|
|
pstrUsagePhoneKey2,
|
|
|
|
pstrUsagePhoneKey3,
|
|
|
|
pstrUsagePhoneKey4,
|
|
|
|
pstrUsagePhoneKey5,
|
|
|
|
pstrUsagePhoneKey6,
|
|
|
|
pstrUsagePhoneKey7,
|
|
|
|
pstrUsagePhoneKey8,
|
|
|
|
pstrUsagePhoneKey9,
|
|
|
|
pstrUsagePhoneKeyStar,
|
|
|
|
pstrUsagePhoneKeyPound,
|
|
|
|
pstrUsagePhoneKeyA,
|
|
|
|
pstrUsagePhoneKeyB,
|
|
|
|
pstrUsagePhoneKeyC,
|
|
|
|
pstrUsagePhoneKeyD
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitles0[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageConsumerControl,
|
|
|
|
pstrUsageNumericKeyPad,
|
|
|
|
pstrUsageProgrammableButton,
|
|
|
|
pstrUsageMicrophone,
|
|
|
|
pstrUsageHeadphone,
|
|
|
|
pstrUsageGraphicEqualizer
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitles1[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsagePlus10,
|
|
|
|
pstrUsagePlus100,
|
|
|
|
pstrUsageAMPM
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitles2[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsagePower,
|
|
|
|
pstrUsageReset,
|
|
|
|
pstrUsageSleep,
|
|
|
|
pstrUsageSleepAfter,
|
|
|
|
pstrUsageSleepMode,
|
|
|
|
pstrUsageIllumination,
|
|
|
|
pstrUsageFunctionButtons
|
|
|
|
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitles3[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageMenu,
|
|
|
|
pstrUsageMenuPick,
|
|
|
|
pstrUsageMenuUp,
|
|
|
|
pstrUsageMenuDown,
|
|
|
|
pstrUsageMenuLeft,
|
|
|
|
pstrUsageMenuRight,
|
|
|
|
pstrUsageMenuEscape,
|
|
|
|
pstrUsageMenuValueIncrease,
|
|
|
|
pstrUsageMenuValueDecrease
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitles4[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageDataOnScreen,
|
|
|
|
pstrUsageClosedCaption,
|
|
|
|
pstrUsageClosedCaptionSelect,
|
|
|
|
pstrUsageVCRTV,
|
|
|
|
pstrUsageBroadcastMode,
|
|
|
|
pstrUsageSnapshot,
|
|
|
|
pstrUsageStill
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitles5[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageSelection,
|
|
|
|
pstrUsageAssignSelection,
|
|
|
|
pstrUsageModeStep,
|
|
|
|
pstrUsageRecallLast,
|
|
|
|
pstrUsageEnterChannel,
|
|
|
|
pstrUsageOrderMovie,
|
|
|
|
pstrUsageChannel,
|
|
|
|
pstrUsageMediaSelection,
|
|
|
|
pstrUsageMediaSelectComputer,
|
|
|
|
pstrUsageMediaSelectTV,
|
|
|
|
pstrUsageMediaSelectWWW,
|
|
|
|
pstrUsageMediaSelectDVD,
|
|
|
|
pstrUsageMediaSelectTelephone,
|
|
|
|
pstrUsageMediaSelectProgramGuide,
|
|
|
|
pstrUsageMediaSelectVideoPhone,
|
|
|
|
pstrUsageMediaSelectGames,
|
|
|
|
pstrUsageMediaSelectMessages,
|
|
|
|
pstrUsageMediaSelectCD,
|
|
|
|
pstrUsageMediaSelectVCR,
|
|
|
|
pstrUsageMediaSelectTuner,
|
|
|
|
pstrUsageQuit,
|
|
|
|
pstrUsageHelp,
|
|
|
|
pstrUsageMediaSelectTape,
|
|
|
|
pstrUsageMediaSelectCable,
|
|
|
|
pstrUsageMediaSelectSatellite,
|
|
|
|
pstrUsageMediaSelectSecurity,
|
|
|
|
pstrUsageMediaSelectHome,
|
|
|
|
pstrUsageMediaSelectCall,
|
|
|
|
pstrUsageChannelIncrement,
|
|
|
|
pstrUsageChannelDecrement,
|
|
|
|
pstrUsageMediaSelectSAP,
|
|
|
|
pstrUsagePageReserved,
|
|
|
|
pstrUsageVCRPlus,
|
|
|
|
pstrUsageOnce,
|
|
|
|
pstrUsageDaily,
|
|
|
|
pstrUsageWeekly,
|
|
|
|
pstrUsageMonthly
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitles6[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsagePlay,
|
|
|
|
pstrUsagePause,
|
|
|
|
pstrUsageRecord,
|
|
|
|
pstrUsageFastForward,
|
|
|
|
pstrUsageRewind,
|
|
|
|
pstrUsageScanNextTrack,
|
|
|
|
pstrUsageScanPreviousTrack,
|
|
|
|
pstrUsageStop,
|
|
|
|
pstrUsageEject,
|
|
|
|
pstrUsageRandomPlay,
|
|
|
|
pstrUsageSelectDisk,
|
|
|
|
pstrUsageEnterDisk,
|
|
|
|
pstrUsageRepeat,
|
|
|
|
pstrUsageTracking,
|
|
|
|
pstrUsageTrackNormal,
|
|
|
|
pstrUsageSlowTracking,
|
|
|
|
pstrUsageFrameForward,
|
|
|
|
pstrUsageFrameBackwards,
|
|
|
|
pstrUsageMark,
|
|
|
|
pstrUsageClearMark,
|
|
|
|
pstrUsageRepeatFromMark,
|
|
|
|
pstrUsageReturnToMark,
|
|
|
|
pstrUsageSearchMarkForward,
|
|
|
|
pstrUsageSearchMarkBackwards,
|
|
|
|
pstrUsageCounterReset,
|
|
|
|
pstrUsageShowCounter,
|
|
|
|
pstrUsageTrackingIncrement,
|
|
|
|
pstrUsageTrackingDecrement,
|
|
|
|
pstrUsageStopEject,
|
|
|
|
pstrUsagePlayPause,
|
|
|
|
pstrUsagePlaySkip
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitles7[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageVolume,
|
|
|
|
pstrUsageBalance,
|
|
|
|
pstrUsageMute,
|
|
|
|
pstrUsageBass,
|
|
|
|
pstrUsageTreble,
|
|
|
|
pstrUsageBassBoost,
|
|
|
|
pstrUsageSurroundMode,
|
|
|
|
pstrUsageLoudness,
|
|
|
|
pstrUsageMPX,
|
|
|
|
pstrUsageVolumeIncrement,
|
|
|
|
pstrUsageVolumeDecrement
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitles8[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageSpeedSelect,
|
|
|
|
pstrUsagePlaybackSpeed,
|
|
|
|
pstrUsageStandardPlay,
|
|
|
|
pstrUsageLongPlay,
|
|
|
|
pstrUsageExtendedPlay,
|
|
|
|
pstrUsageSlow
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitles9[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageFanEnable,
|
|
|
|
pstrUsageFanSpeed,
|
|
|
|
pstrUsageLightEnable,
|
|
|
|
pstrUsageLightIlluminationLevel,
|
|
|
|
pstrUsageClimateControlEnable,
|
|
|
|
pstrUsageRoomTemperature,
|
|
|
|
pstrUsageSecurityEnable,
|
|
|
|
pstrUsageFireAlarm,
|
|
|
|
pstrUsagePoliceAlarm,
|
|
|
|
pstrUsageProximity,
|
|
|
|
pstrUsageMotion,
|
|
|
|
pstrUsageDuresAlarm,
|
|
|
|
pstrUsageHoldupAlarm,
|
|
|
|
pstrUsageMedicalAlarm
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitlesA[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageBalanceRight,
|
|
|
|
pstrUsageBalanceLeft,
|
|
|
|
pstrUsageBassIncrement,
|
|
|
|
pstrUsageBassDecrement,
|
|
|
|
pstrUsageTrebleIncrement,
|
|
|
|
pstrUsageTrebleDecrement
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitlesB[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageSpeakerSystem,
|
|
|
|
pstrUsageChannelLeft,
|
|
|
|
pstrUsageChannelRight,
|
|
|
|
pstrUsageChannelCenter,
|
|
|
|
pstrUsageChannelFront,
|
|
|
|
pstrUsageChannelCenterFront,
|
|
|
|
pstrUsageChannelSide,
|
|
|
|
pstrUsageChannelSurround,
|
|
|
|
pstrUsageChannelLowFreqEnhancement,
|
|
|
|
pstrUsageChannelTop,
|
|
|
|
pstrUsageChannelUnknown
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitlesC[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageSubChannel,
|
|
|
|
pstrUsageSubChannelIncrement,
|
|
|
|
pstrUsageSubChannelDecrement,
|
|
|
|
pstrUsageAlternateAudioIncrement,
|
|
|
|
pstrUsageAlternateAudioDecrement
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitlesD[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageApplicationLaunchButtons,
|
|
|
|
pstrUsageALLaunchButtonConfigTool,
|
|
|
|
pstrUsageALProgrammableButton,
|
|
|
|
pstrUsageALConsumerControlConfig,
|
|
|
|
pstrUsageALWordProcessor,
|
|
|
|
pstrUsageALTextEditor,
|
|
|
|
pstrUsageALSpreadsheet,
|
|
|
|
pstrUsageALGraphicsEditor,
|
|
|
|
pstrUsageALPresentationApp,
|
|
|
|
pstrUsageALDatabaseApp,
|
|
|
|
pstrUsageALEmailReader,
|
|
|
|
pstrUsageALNewsreader,
|
|
|
|
pstrUsageALVoicemail,
|
|
|
|
pstrUsageALContactsAddressBook,
|
|
|
|
pstrUsageALCalendarSchedule,
|
|
|
|
pstrUsageALTaskProjectManager,
|
|
|
|
pstrUsageALLogJournalTimecard,
|
|
|
|
pstrUsageALCheckbookFinance,
|
|
|
|
pstrUsageALCalculator,
|
|
|
|
pstrUsageALAVCapturePlayback,
|
|
|
|
pstrUsageALLocalMachineBrowser,
|
|
|
|
pstrUsageALLANWANBrow,
|
|
|
|
pstrUsageALInternetBrowser,
|
|
|
|
pstrUsageALRemoteNetISPConnect,
|
|
|
|
pstrUsageALNetworkConference,
|
|
|
|
pstrUsageALNetworkChat,
|
|
|
|
pstrUsageALTelephonyDialer,
|
|
|
|
pstrUsageALLogon,
|
|
|
|
pstrUsageALLogoff,
|
|
|
|
pstrUsageALLogonLogoff,
|
|
|
|
pstrUsageALTermLockScrSav,
|
|
|
|
pstrUsageALControlPannel,
|
|
|
|
pstrUsageALCommandLineProcessorRun,
|
|
|
|
pstrUsageALProcessTaskManager,
|
|
|
|
pstrUsageALSelectTaskApplication,
|
|
|
|
pstrUsageALNextTaskApplication,
|
|
|
|
pstrUsageALPreviousTaskApplication,
|
|
|
|
pstrUsageALPreemptiveHaltTaskApp,
|
|
|
|
pstrUsageALIntegratedHelpCenter,
|
|
|
|
pstrUsageALDocuments,
|
|
|
|
pstrUsageALThesaurus,
|
|
|
|
pstrUsageALDictionary,
|
|
|
|
pstrUsageALDesktop,
|
|
|
|
pstrUsageALSpellCheck,
|
|
|
|
pstrUsageALGrammarCheck,
|
|
|
|
pstrUsageALWirelessStatus,
|
|
|
|
pstrUsageALKeyboardLayout,
|
|
|
|
pstrUsageALVirusProtection,
|
|
|
|
pstrUsageALEncryption,
|
|
|
|
pstrUsageALScreenSaver,
|
|
|
|
pstrUsageALAlarms,
|
|
|
|
pstrUsageALClock,
|
|
|
|
pstrUsageALFileBrowser,
|
|
|
|
pstrUsageALPowerStatus,
|
|
|
|
pstrUsageALImageBrowser,
|
|
|
|
pstrUsageALAudioBrowser,
|
|
|
|
pstrUsageALMovieBrowser,
|
|
|
|
pstrUsageALDigitalRightsManager,
|
|
|
|
pstrUsageALDigitalWallet,
|
|
|
|
pstrUsagePageReserved,
|
|
|
|
pstrUsageALInstantMessaging,
|
|
|
|
pstrUsageALOEMFeaturesBrowser,
|
|
|
|
pstrUsageALOEMHelp,
|
|
|
|
pstrUsageALOnlineCommunity,
|
|
|
|
pstrUsageALEntertainmentContentBrow,
|
|
|
|
pstrUsageALOnlineShoppingBrowser,
|
|
|
|
pstrUsageALSmartCardInfoHelp,
|
|
|
|
pstrUsageALMarketMonitorFinBrowser,
|
|
|
|
pstrUsageALCustomCorpNewsBrowser,
|
|
|
|
pstrUsageALOnlineActivityBrowser,
|
|
|
|
pstrUsageALResearchSearchBrowser,
|
|
|
|
pstrUsageALAudioPlayer
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::consTitlesE[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageGenericGUIAppControls,
|
|
|
|
pstrUsageACNew,
|
|
|
|
pstrUsageACOpen,
|
|
|
|
pstrUsageACClose,
|
|
|
|
pstrUsageACExit,
|
|
|
|
pstrUsageACMaximize,
|
|
|
|
pstrUsageACMinimize,
|
|
|
|
pstrUsageACSave,
|
|
|
|
pstrUsageACPrint,
|
|
|
|
pstrUsageACProperties,
|
|
|
|
pstrUsageACUndo,
|
|
|
|
pstrUsageACCopy,
|
|
|
|
pstrUsageACCut,
|
|
|
|
pstrUsageACPaste,
|
|
|
|
pstrUsageACSelectAll,
|
|
|
|
pstrUsageACFind,
|
|
|
|
pstrUsageACFindAndReplace,
|
|
|
|
pstrUsageACSearch,
|
|
|
|
pstrUsageACGoto,
|
|
|
|
pstrUsageACHome,
|
|
|
|
pstrUsageACBack,
|
|
|
|
pstrUsageACForward,
|
|
|
|
pstrUsageACStop,
|
|
|
|
pstrUsageACRefresh,
|
|
|
|
pstrUsageACPreviousLink,
|
|
|
|
pstrUsageACNextLink,
|
|
|
|
pstrUsageACBookmarks,
|
|
|
|
pstrUsageACHistory,
|
|
|
|
pstrUsageACSubscriptions,
|
|
|
|
pstrUsageACZoomIn,
|
|
|
|
pstrUsageACZoomOut,
|
|
|
|
pstrUsageACZoom,
|
|
|
|
pstrUsageACFullScreenView,
|
|
|
|
pstrUsageACNormalView,
|
|
|
|
pstrUsageACViewToggle,
|
|
|
|
pstrUsageACScrollUp,
|
|
|
|
pstrUsageACScrollDown,
|
|
|
|
pstrUsageACScroll,
|
|
|
|
pstrUsageACPanLeft,
|
|
|
|
pstrUsageACPanRight,
|
|
|
|
pstrUsageACPan,
|
|
|
|
pstrUsageACNewWindow,
|
|
|
|
pstrUsageACTileHoriz,
|
|
|
|
pstrUsageACTileVert,
|
|
|
|
pstrUsageACFormat,
|
|
|
|
pstrUsageACEdit,
|
|
|
|
pstrUsageACBold,
|
|
|
|
pstrUsageACItalics,
|
|
|
|
pstrUsageACUnderline,
|
|
|
|
pstrUsageACStrikethrough,
|
|
|
|
pstrUsageACSubscript,
|
|
|
|
pstrUsageACSuperscript,
|
|
|
|
pstrUsageACAllCaps,
|
|
|
|
pstrUsageACRotate,
|
|
|
|
pstrUsageACResize,
|
|
|
|
pstrUsageACFlipHorizontal,
|
|
|
|
pstrUsageACFlipVertical,
|
|
|
|
pstrUsageACMirrorHorizontal,
|
|
|
|
pstrUsageACMirrorVertical,
|
|
|
|
pstrUsageACFontSelect,
|
|
|
|
pstrUsageACFontColor,
|
|
|
|
pstrUsageACFontSize,
|
|
|
|
pstrUsageACJustifyLeft,
|
|
|
|
pstrUsageACJustifyCenterH,
|
|
|
|
pstrUsageACJustifyRight,
|
|
|
|
pstrUsageACJustifyBlockH,
|
|
|
|
pstrUsageACJustifyTop,
|
|
|
|
pstrUsageACJustifyCenterV,
|
|
|
|
pstrUsageACJustifyBottom,
|
|
|
|
pstrUsageACJustifyBlockV,
|
|
|
|
pstrUsageACIndentDecrease,
|
|
|
|
pstrUsageACIndentIncrease,
|
|
|
|
pstrUsageACNumberedList,
|
|
|
|
pstrUsageACRestartNumbering,
|
|
|
|
pstrUsageACBulletedList,
|
|
|
|
pstrUsageACPromote,
|
|
|
|
pstrUsageACDemote,
|
|
|
|
pstrUsageACYes,
|
|
|
|
pstrUsageACNo,
|
|
|
|
pstrUsageACCancel,
|
|
|
|
pstrUsageACCatalog,
|
|
|
|
pstrUsageACBuyChkout,
|
|
|
|
pstrUsageACAddToCart,
|
|
|
|
pstrUsageACExpand,
|
|
|
|
pstrUsageACExpandAll,
|
|
|
|
pstrUsageACCollapse,
|
|
|
|
pstrUsageACCollapseAll,
|
|
|
|
pstrUsageACPrintPreview,
|
|
|
|
pstrUsageACPasteSpecial,
|
|
|
|
pstrUsageACInsertMode,
|
|
|
|
pstrUsageACDelete,
|
|
|
|
pstrUsageACLock,
|
|
|
|
pstrUsageACUnlock,
|
|
|
|
pstrUsageACProtect,
|
|
|
|
pstrUsageACUnprotect,
|
|
|
|
pstrUsageACAttachComment,
|
|
|
|
pstrUsageACDeleteComment,
|
|
|
|
pstrUsageACViewComment,
|
|
|
|
pstrUsageACSelectWord,
|
|
|
|
pstrUsageACSelectSentence,
|
|
|
|
pstrUsageACSelectParagraph,
|
|
|
|
pstrUsageACSelectColumn,
|
|
|
|
pstrUsageACSelectRow,
|
|
|
|
pstrUsageACSelectTable,
|
|
|
|
pstrUsageACSelectObject,
|
|
|
|
pstrUsageACRedoRepeat,
|
|
|
|
pstrUsageACSort,
|
|
|
|
pstrUsageACSortAscending,
|
|
|
|
pstrUsageACSortDescending,
|
|
|
|
pstrUsageACFilter,
|
|
|
|
pstrUsageACSetClock,
|
|
|
|
pstrUsageACViewClock,
|
|
|
|
pstrUsageACSelectTimeZone,
|
|
|
|
pstrUsageACEditTimeZone,
|
|
|
|
pstrUsageACSetAlarm,
|
|
|
|
pstrUsageACClearAlarm,
|
|
|
|
pstrUsageACSnoozeAlarm,
|
|
|
|
pstrUsageACResetAlarm,
|
|
|
|
pstrUsageACSyncronize,
|
|
|
|
pstrUsageACSendReceive,
|
|
|
|
pstrUsageACSendTo,
|
|
|
|
pstrUsageACReply,
|
|
|
|
pstrUsageACReplyAll,
|
|
|
|
pstrUsageACForwardMessage,
|
|
|
|
pstrUsageACSend,
|
|
|
|
pstrUsageACAttachFile,
|
|
|
|
pstrUsageACUpload,
|
|
|
|
pstrUsageACDownload,
|
|
|
|
pstrUsageACSetBorders,
|
|
|
|
pstrUsageACInsertRow,
|
|
|
|
pstrUsageACInsertColumn,
|
|
|
|
pstrUsageACInsertFile,
|
|
|
|
pstrUsageACInsertPicture,
|
|
|
|
pstrUsageACInsertObject,
|
|
|
|
pstrUsageACInsertSymbol,
|
|
|
|
pstrUsageACSaveAndClose,
|
|
|
|
pstrUsageACRename,
|
|
|
|
pstrUsageACMerge,
|
|
|
|
pstrUsageACSplit,
|
|
|
|
pstrUsageACDistributeHorizontaly,
|
|
|
|
pstrUsageACDistributeVerticaly
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::digitTitles0[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageDigitizer,
|
|
|
|
pstrUsagePen,
|
|
|
|
pstrUsageLightPen,
|
|
|
|
pstrUsageTouchScreen,
|
|
|
|
pstrUsageTouchPad,
|
|
|
|
pstrUsageWhiteBoard,
|
|
|
|
pstrUsageCoordinateMeasuringMachine,
|
|
|
|
pstrUsage3DDigitizer,
|
|
|
|
pstrUsageStereoPlotter,
|
|
|
|
pstrUsageArticulatedArm,
|
|
|
|
pstrUsageArmature,
|
|
|
|
pstrUsageMultiplePointDigitizer,
|
|
|
|
pstrUsageFreeSpaceWand
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::digitTitles1[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageStylus,
|
|
|
|
pstrUsagePuck,
|
|
|
|
pstrUsageFinger
|
|
|
|
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::digitTitles2[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageTipPressure,
|
|
|
|
pstrUsageBarrelPressure,
|
|
|
|
pstrUsageInRange,
|
|
|
|
pstrUsageTouch,
|
|
|
|
pstrUsageUntouch,
|
|
|
|
pstrUsageTap,
|
|
|
|
pstrUsageQuality,
|
|
|
|
pstrUsageDataValid,
|
|
|
|
pstrUsageTransducerIndex,
|
|
|
|
pstrUsageTabletFunctionKeys,
|
|
|
|
pstrUsageProgramChangeKeys,
|
|
|
|
pstrUsageBatteryStrength,
|
|
|
|
pstrUsageInvert,
|
|
|
|
pstrUsageXTilt,
|
|
|
|
pstrUsageYTilt,
|
|
|
|
pstrUsageAzimuth,
|
|
|
|
pstrUsageAltitude,
|
|
|
|
pstrUsageTwist,
|
|
|
|
pstrUsageTipSwitch,
|
|
|
|
pstrUsageSecondaryTipSwitch,
|
|
|
|
pstrUsageBarrelSwitch,
|
|
|
|
pstrUsageEraser,
|
|
|
|
pstrUsageTabletPick
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::aplphanumTitles0[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageAlphanumericDisplay,
|
|
|
|
pstrUsageBitmappedDisplay
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::aplphanumTitles1[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageDisplayAttributesReport,
|
|
|
|
pstrUsageASCIICharacterSet,
|
|
|
|
pstrUsageDataReadBack,
|
|
|
|
pstrUsageFontReadBack,
|
|
|
|
pstrUsageDisplayControlReport,
|
|
|
|
pstrUsageClearDisplay,
|
|
|
|
pstrUsageDisplayEnable,
|
|
|
|
pstrUsageScreenSaverDelay,
|
|
|
|
pstrUsageScreenSaverEnable,
|
|
|
|
pstrUsageVerticalScroll,
|
|
|
|
pstrUsageHorizontalScroll,
|
|
|
|
pstrUsageCharacterReport,
|
|
|
|
pstrUsageDisplayData,
|
|
|
|
pstrUsageDisplayStatus,
|
|
|
|
pstrUsageStatusNotReady,
|
|
|
|
pstrUsageStatusReady,
|
|
|
|
pstrUsageErrorNotALoadableCharacter,
|
|
|
|
pstrUsageErrorFotDataCanNotBeRead,
|
|
|
|
pstrUsageCursorPositionReport,
|
|
|
|
pstrUsageRow,
|
|
|
|
pstrUsageColumn,
|
|
|
|
pstrUsageRows,
|
|
|
|
pstrUsageColumns,
|
|
|
|
pstrUsageCursorPixelPosition,
|
|
|
|
pstrUsageCursorMode,
|
|
|
|
pstrUsageCursorEnable,
|
|
|
|
pstrUsageCursorBlink,
|
|
|
|
pstrUsageFontReport,
|
|
|
|
pstrUsageFontData,
|
|
|
|
pstrUsageCharacterWidth,
|
|
|
|
pstrUsageCharacterHeight,
|
|
|
|
pstrUsageCharacterSpacingHorizontal,
|
|
|
|
pstrUsageCharacterSpacingVertical,
|
|
|
|
pstrUsageUnicodeCharset,
|
|
|
|
pstrUsageFont7Segment,
|
|
|
|
pstrUsage7SegmentDirectMap,
|
|
|
|
pstrUsageFont14Segment,
|
|
|
|
pstrUsage14SegmentDirectMap,
|
|
|
|
pstrUsageDisplayBrightness,
|
|
|
|
pstrUsageDisplayContrast,
|
|
|
|
pstrUsageCharacterAttribute,
|
|
|
|
pstrUsageAttributeReadback,
|
|
|
|
pstrUsageAttributeData,
|
|
|
|
pstrUsageCharAttributeEnhance,
|
|
|
|
pstrUsageCharAttributeUnderline,
|
|
|
|
pstrUsageCharAttributeBlink
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::aplphanumTitles2[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageBitmapSizeX,
|
|
|
|
pstrUsageBitmapSizeY,
|
|
|
|
pstrUsagePageReserved,
|
|
|
|
pstrUsageBitDepthFormat,
|
|
|
|
pstrUsageDisplayOrientation,
|
|
|
|
pstrUsagePaletteReport,
|
|
|
|
pstrUsagePaletteDataSize,
|
|
|
|
pstrUsagePaletteDataOffset,
|
|
|
|
pstrUsagePaletteData,
|
|
|
|
pstrUsageBlitReport,
|
|
|
|
pstrUsageBlitRectangleX1,
|
|
|
|
pstrUsageBlitRectangleY1,
|
|
|
|
pstrUsageBlitRectangleX2,
|
|
|
|
pstrUsageBlitRectangleY2,
|
|
|
|
pstrUsageBlitData,
|
|
|
|
pstrUsageSoftButton,
|
|
|
|
pstrUsageSoftButtonID,
|
|
|
|
pstrUsageSoftButtonSide,
|
|
|
|
pstrUsageSoftButtonOffset1,
|
|
|
|
pstrUsageSoftButtonOffset2,
|
|
|
|
pstrUsageSoftButtonReport
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::medInstrTitles0[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageVCRAcquisition,
|
|
|
|
pstrUsageFreezeThaw,
|
|
|
|
pstrUsageClipStore,
|
|
|
|
pstrUsageUpdate,
|
|
|
|
pstrUsageNext,
|
|
|
|
pstrUsageSave,
|
|
|
|
pstrUsagePrint,
|
|
|
|
pstrUsageMicrophoneEnable
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::medInstrTitles1[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageCine,
|
|
|
|
pstrUsageTransmitPower,
|
|
|
|
pstrUsageVolume,
|
|
|
|
pstrUsageFocus,
|
|
|
|
pstrUsageDepth
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::medInstrTitles2[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageSoftStepPrimary,
|
|
|
|
pstrUsageSoftStepSecondary
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::medInstrTitles3[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageZoomSelect,
|
|
|
|
pstrUsageZoomAdjust,
|
|
|
|
pstrUsageSpectralDopplerModeSelect,
|
|
|
|
pstrUsageSpectralDopplerModeAdjust,
|
|
|
|
pstrUsageColorDopplerModeSelect,
|
|
|
|
pstrUsageColorDopplerModeAdjust,
|
|
|
|
pstrUsageMotionModeSelect,
|
|
|
|
pstrUsageMotionModeAdjust,
|
|
|
|
pstrUsage2DModeSelect,
|
|
|
|
pstrUsage2DModeAdjust
|
|
|
|
};
|
2013-03-28 09:46:43 +01:00
|
|
|
const char * const ReportDescParserBase::medInstrTitles4[] PROGMEM = {
|
2013-03-28 08:26:02 +01:00
|
|
|
pstrUsageSoftControlSelect,
|
|
|
|
pstrUsageSoftControlAdjust
|
|
|
|
};
|
|
|
|
|
|
|
|
void ReportDescParserBase::Parse(const uint16_t len, const uint8_t *pbuf, const uint16_t &offset) {
|
2013-03-28 09:46:43 +01:00
|
|
|
uint16_t cntdn = (uint16_t)len;
|
|
|
|
uint8_t *p = (uint8_t*)pbuf;
|
2013-03-28 08:26:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
totalSize = 0;
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
while(cntdn) {
|
2013-06-12 05:11:43 +02:00
|
|
|
//USB_HOST_SERIAL.println("");
|
2013-03-28 08:26:02 +01:00
|
|
|
//PrintHex<uint16_t>(offset + len - cntdn);
|
2013-06-12 05:11:43 +02:00
|
|
|
//USB_HOST_SERIAL.print(":");
|
2013-03-28 08:26:02 +01:00
|
|
|
|
|
|
|
ParseItem(&p, &cntdn);
|
|
|
|
|
|
|
|
//if (ParseItem(&p, &cntdn))
|
|
|
|
// return;
|
|
|
|
}
|
|
|
|
//USBTRACE2("Total:", totalSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintValue(uint8_t *p, uint8_t len) {
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("("), 0x80);
|
2013-12-25 11:09:57 +01:00
|
|
|
for(; len; p++, len--)
|
2013-03-28 08:26:02 +01:00
|
|
|
PrintHex<uint8_t > (*p, 0x80);
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(")"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintByteValue(uint8_t data) {
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("("), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
PrintHex<uint8_t > (data, 0x80);
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(")"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintItemTitle(uint8_t prefix) {
|
2013-12-25 11:09:57 +01:00
|
|
|
switch(prefix & (TYPE_MASK | TAG_MASK)) {
|
2013-03-28 08:26:02 +01:00
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_PUSH):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nPush"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_POP):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nPop"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_USAGEPAGE):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nUsage Page"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMIN):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nLogical Min"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMAX):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nLogical Max"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMIN):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nPhysical Min"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMAX):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nPhysical Max"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_UNITEXP):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nUnit Exp"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_UNIT):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nUnit"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_REPORTSIZE):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nReport Size"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_REPORTCOUNT):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nReport Count"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_REPORTID):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nReport Id"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_LOCAL | TAG_LOCAL_USAGE):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nUsage"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_LOCAL | TAG_LOCAL_USAGEMIN):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nUsage Min"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_LOCAL | TAG_LOCAL_USAGEMAX):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nUsage Max"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_COLLECTION):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nCollection"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_ENDCOLLECTION):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nEnd Collection"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_INPUT):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nInput"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_OUTPUT):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nOutput"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_FEATURE):
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\nFeature"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
} // switch (**pp & (TYPE_MASK | TAG_MASK))
|
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t ReportDescParserBase::ParseItem(uint8_t **pp, uint16_t *pcntdn) {
|
|
|
|
//uint8_t ret = enErrorSuccess;
|
2013-12-05 00:40:23 +01:00
|
|
|
//reinterpret_cast<>(varBuffer);
|
2013-12-25 11:09:57 +01:00
|
|
|
switch(itemParseState) {
|
2013-03-28 08:26:02 +01:00
|
|
|
case 0:
|
2013-12-25 11:09:57 +01:00
|
|
|
if(**pp == HID_LONG_ITEM_PREFIX)
|
2013-03-28 08:26:02 +01:00
|
|
|
USBTRACE("\r\nLONG\r\n");
|
|
|
|
else {
|
|
|
|
uint8_t size = ((**pp) & DATA_SIZE_MASK);
|
|
|
|
|
|
|
|
itemPrefix = (**pp);
|
|
|
|
itemSize = 1 + ((size == DATA_SIZE_4) ? 4 : size);
|
|
|
|
|
|
|
|
PrintItemTitle(itemPrefix);
|
|
|
|
}
|
|
|
|
(*pp)++;
|
|
|
|
(*pcntdn)--;
|
|
|
|
itemSize--;
|
|
|
|
itemParseState = 1;
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
if(!itemSize)
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
if(!pcntdn)
|
2013-03-28 08:26:02 +01:00
|
|
|
return enErrorIncomplete;
|
|
|
|
case 1:
|
|
|
|
//USBTRACE2("\r\niSz:",itemSize);
|
|
|
|
|
|
|
|
theBuffer.valueSize = itemSize;
|
|
|
|
valParser.Initialize(&theBuffer);
|
|
|
|
itemParseState = 2;
|
|
|
|
case 2:
|
2013-12-25 11:09:57 +01:00
|
|
|
if(!valParser.Parse(pp, pcntdn))
|
2013-03-28 08:26:02 +01:00
|
|
|
return enErrorIncomplete;
|
|
|
|
itemParseState = 3;
|
|
|
|
case 3:
|
|
|
|
{
|
2013-03-28 09:46:43 +01:00
|
|
|
uint8_t data = *((uint8_t*)varBuffer);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
switch(itemPrefix & (TYPE_MASK | TAG_MASK)) {
|
2013-03-28 08:26:02 +01:00
|
|
|
case (TYPE_LOCAL | TAG_LOCAL_USAGE):
|
2013-12-25 11:09:57 +01:00
|
|
|
if(pfUsage) {
|
|
|
|
if(theBuffer.valueSize > 1) {
|
|
|
|
uint16_t* ui16 = reinterpret_cast<uint16_t *>(varBuffer);
|
2013-12-05 00:40:23 +01:00
|
|
|
pfUsage(*ui16);
|
|
|
|
} else
|
2013-03-28 08:26:02 +01:00
|
|
|
pfUsage(data);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_REPORTSIZE):
|
|
|
|
rptSize = data;
|
|
|
|
PrintByteValue(data);
|
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_REPORTCOUNT):
|
|
|
|
rptCount = data;
|
|
|
|
PrintByteValue(data);
|
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMIN):
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMAX):
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMIN):
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMAX):
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_REPORTID):
|
|
|
|
case (TYPE_LOCAL | TAG_LOCAL_USAGEMIN):
|
|
|
|
case (TYPE_LOCAL | TAG_LOCAL_USAGEMAX):
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_UNITEXP):
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_UNIT):
|
|
|
|
PrintValue(varBuffer, theBuffer.valueSize);
|
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_PUSH):
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_POP):
|
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_USAGEPAGE):
|
|
|
|
SetUsagePage(data);
|
|
|
|
PrintUsagePage(data);
|
|
|
|
PrintByteValue(data);
|
|
|
|
break;
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_COLLECTION):
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_ENDCOLLECTION):
|
2013-12-25 11:09:57 +01:00
|
|
|
switch(data) {
|
2013-03-28 08:26:02 +01:00
|
|
|
case 0x00:
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(" Physical"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case 0x01:
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(" Application"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case 0x02:
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(" Logical"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case 0x03:
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(" Report"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case 0x04:
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(" Named Array"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case 0x05:
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(" Usage Switch"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case 0x06:
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(" Usage Modifier"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
default:
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(" Vendor Defined("), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
PrintHex<uint8_t > (data, 0x80);
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(")"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_INPUT):
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_OUTPUT):
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_FEATURE):
|
2013-03-28 09:46:43 +01:00
|
|
|
totalSize += (uint16_t)rptSize * (uint16_t)rptCount;
|
2013-03-28 08:26:02 +01:00
|
|
|
rptSize = 0;
|
|
|
|
rptCount = 0;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("("), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
PrintBin<uint8_t > (data, 0x80);
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR(")"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
} // switch (**pp & (TYPE_MASK | TAG_MASK))
|
|
|
|
}
|
|
|
|
} // switch (itemParseState)
|
|
|
|
itemParseState = 0;
|
|
|
|
return enErrorSuccess;
|
|
|
|
}
|
|
|
|
|
2013-03-28 09:46:43 +01:00
|
|
|
ReportDescParserBase::UsagePageFunc ReportDescParserBase::usagePageFunctions[] /*PROGMEM*/ = {
|
2013-03-28 08:26:02 +01:00
|
|
|
&ReportDescParserBase::PrintGenericDesktopPageUsage,
|
|
|
|
&ReportDescParserBase::PrintSimulationControlsPageUsage,
|
|
|
|
&ReportDescParserBase::PrintVRControlsPageUsage,
|
|
|
|
&ReportDescParserBase::PrintSportsControlsPageUsage,
|
|
|
|
&ReportDescParserBase::PrintGameControlsPageUsage,
|
|
|
|
&ReportDescParserBase::PrintGenericDeviceControlsPageUsage,
|
|
|
|
NULL, // Keyboard/Keypad
|
|
|
|
&ReportDescParserBase::PrintLEDPageUsage,
|
|
|
|
&ReportDescParserBase::PrintButtonPageUsage,
|
|
|
|
&ReportDescParserBase::PrintOrdinalPageUsage,
|
|
|
|
&ReportDescParserBase::PrintTelephonyPageUsage,
|
|
|
|
&ReportDescParserBase::PrintConsumerPageUsage,
|
|
|
|
&ReportDescParserBase::PrintDigitizerPageUsage,
|
|
|
|
NULL, // Reserved
|
|
|
|
NULL, // PID
|
|
|
|
NULL // Unicode
|
|
|
|
};
|
|
|
|
|
|
|
|
void ReportDescParserBase::SetUsagePage(uint16_t page) {
|
|
|
|
pfUsage = NULL;
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
if(VALUE_BETWEEN(page, 0x00, 0x11))
|
2013-12-05 03:55:24 +01:00
|
|
|
pfUsage = (usagePageFunctions[page - 1]);
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
// Dead code...
|
|
|
|
//
|
|
|
|
// pfUsage = (UsagePageFunc)pgm_read_pointer(usagePageFunctions[page - 1]);
|
|
|
|
//else if (page > 0x7f && page < 0x84)
|
|
|
|
// E_Notify(pstrUsagePageMonitor);
|
|
|
|
//else if (page > 0x83 && page < 0x8c)
|
|
|
|
// E_Notify(pstrUsagePagePower);
|
|
|
|
//else if (page > 0x8b && page < 0x92)
|
|
|
|
// E_Notify((char*)pgm_read_pointer(&usagePageTitles1[page - 0x8c]));
|
|
|
|
//else if (page > 0xfeff && page <= 0xffff)
|
|
|
|
// E_Notify(pstrUsagePageVendorDefined);
|
|
|
|
//
|
2013-03-28 08:26:02 +01:00
|
|
|
else
|
2013-12-25 11:09:57 +01:00
|
|
|
switch(page) {
|
2013-03-28 08:26:02 +01:00
|
|
|
case 0x14:
|
|
|
|
pfUsage = &ReportDescParserBase::PrintAlphanumDisplayPageUsage;
|
|
|
|
break;
|
|
|
|
case 0x40:
|
|
|
|
pfUsage = &ReportDescParserBase::PrintMedicalInstrumentPageUsage;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintUsagePage(uint16_t page) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(page, 0x00, 0x11, w, E_Notify, usagePageTitles0, 0x80)
|
|
|
|
else output_if_between(page, 0x8b, 0x92, w, E_Notify, usagePageTitles1, 0x80)
|
2013-12-25 11:09:57 +01:00
|
|
|
else if(VALUE_BETWEEN(page, 0x7f, 0x84))
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrUsagePageMonitor, 0x80);
|
2013-12-25 11:09:57 +01:00
|
|
|
else if(VALUE_BETWEEN(page, 0x83, 0x8c))
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrUsagePagePower, 0x80);
|
2013-12-25 11:09:57 +01:00
|
|
|
else if(page > 0xfeff /* && page <= 0xffff */)
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrUsagePageVendorDefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
else
|
2013-12-25 11:09:57 +01:00
|
|
|
switch(page) {
|
2013-03-28 08:26:02 +01:00
|
|
|
case 0x14:
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrUsagePageAlphaNumericDisplay, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
case 0x40:
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrUsagePageMedicalInstruments, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
default:
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintButtonPageUsage(uint16_t usage) {
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
|
|
|
E_Notify(PSTR("Btn"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
PrintHex<uint16_t > (usage, 0x80);
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\n"), 0x80);
|
2013-06-12 05:11:43 +02:00
|
|
|
//USB_HOST_SERIAL.print(usage, HEX);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintOrdinalPageUsage(uint16_t usage) {
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
|
|
|
E_Notify(PSTR("Inst"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
// Sorry, HEX for now...
|
|
|
|
PrintHex<uint16_t > (usage, 0x80);
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\n"), 0x80);
|
2013-06-12 05:11:43 +02:00
|
|
|
//USB_HOST_SERIAL.print(usage, DEC);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintGenericDesktopPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(usage, 0x00, 0x0a, w, E_Notify, genDesktopTitles0, 0x80)
|
|
|
|
else output_if_between(usage, 0x2f, 0x49, w, E_Notify, genDesktopTitles1, 0x80)
|
|
|
|
else output_if_between(usage, 0x7f, 0x94, w, E_Notify, genDesktopTitles2, 0x80)
|
|
|
|
else output_if_between(usage, 0x9f, 0xa9, w, E_Notify, genDesktopTitles3, 0x80)
|
|
|
|
else output_if_between(usage, 0xaf, 0xb8, w, E_Notify, genDesktopTitles4, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintSimulationControlsPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(usage, 0x00, 0x0d, w, E_Notify, simuTitles0, 0x80)
|
|
|
|
else output_if_between(usage, 0x1f, 0x26, w, E_Notify, simuTitles1, 0x80)
|
|
|
|
else output_if_between(usage, 0xaf, 0xd1, w, E_Notify, simuTitles2, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintVRControlsPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(usage, 0x00, 0x0b, w, E_Notify, vrTitles0, 0x80)
|
|
|
|
else output_if_between(usage, 0x1f, 0x22, w, E_Notify, vrTitles1, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintSportsControlsPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(usage, 0x00, 0x05, w, E_Notify, sportsCtrlTitles0, 0x80)
|
|
|
|
else output_if_between(usage, 0x2f, 0x3a, w, E_Notify, sportsCtrlTitles1, 0x80)
|
|
|
|
else output_if_between(usage, 0x4f, 0x64, w, E_Notify, sportsCtrlTitles2, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintGameControlsPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(usage, 0x00, 0x04, w, E_Notify, gameTitles0, 0x80)
|
|
|
|
else output_if_between(usage, 0x1f, 0x3a, w, E_Notify, gameTitles1, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintGenericDeviceControlsPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(usage, 0x1f, 0x27, w, E_Notify, genDevCtrlTitles, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintLEDPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(usage, 0x00, 0x4e, w, E_Notify, ledTitles, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintTelephonyPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(usage, 0x00, 0x08, w, E_Notify, telTitles0, 0x80)
|
|
|
|
else output_if_between(usage, 0x1f, 0x32, w, E_Notify, telTitles1, 0x80)
|
|
|
|
else output_if_between(usage, 0x4f, 0x54, w, E_Notify, telTitles2, 0x80)
|
|
|
|
else output_if_between(usage, 0x6f, 0x75, w, E_Notify, telTitles3, 0x80)
|
|
|
|
else output_if_between(usage, 0x8f, 0x9f, w, E_Notify, telTitles4, 0x80)
|
|
|
|
else output_if_between(usage, 0xaf, 0xc0, w, E_Notify, telTitles5, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintConsumerPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(usage, 0x00, 0x07, w, E_Notify, consTitles0, 0x80)
|
|
|
|
else output_if_between(usage, 0x1f, 0x23, w, E_Notify, consTitles1, 0x80)
|
|
|
|
else output_if_between(usage, 0x2f, 0x37, w, E_Notify, consTitles2, 0x80)
|
|
|
|
else output_if_between(usage, 0x3f, 0x49, w, E_Notify, consTitles3, 0x80)
|
|
|
|
else output_if_between(usage, 0x5f, 0x67, w, E_Notify, consTitles4, 0x80)
|
|
|
|
else output_if_between(usage, 0x7f, 0xa5, w, E_Notify, consTitles5, 0x80)
|
|
|
|
else output_if_between(usage, 0xaf, 0xcf, w, E_Notify, consTitles6, 0x80)
|
|
|
|
else output_if_between(usage, 0xdf, 0xeb, w, E_Notify, consTitles7, 0x80)
|
|
|
|
else output_if_between(usage, 0xef, 0xf6, w, E_Notify, consTitles8, 0x80)
|
|
|
|
else output_if_between(usage, 0xff, 0x10e, w, E_Notify, consTitles9, 0x80)
|
|
|
|
else output_if_between(usage, 0x14f, 0x156, w, E_Notify, consTitlesA, 0x80)
|
|
|
|
else output_if_between(usage, 0x15f, 0x16b, w, E_Notify, consTitlesB, 0x80)
|
|
|
|
else output_if_between(usage, 0x16f, 0x175, w, E_Notify, consTitlesC, 0x80)
|
|
|
|
else output_if_between(usage, 0x17f, 0x1c8, w, E_Notify, consTitlesD, 0x80)
|
|
|
|
else output_if_between(usage, 0x1ff, 0x29d, w, E_Notify, consTitlesE, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintDigitizerPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(usage, 0x00, 0x0e, w, E_Notify, digitTitles0, 0x80)
|
|
|
|
else output_if_between(usage, 0x1f, 0x23, w, E_Notify, digitTitles1, 0x80)
|
|
|
|
else output_if_between(usage, 0x2f, 0x47, w, E_Notify, digitTitles2, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintAlphanumDisplayPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-05 08:06:07 +01:00
|
|
|
output_if_between(usage, 0x00, 0x03, w, E_Notify, aplphanumTitles0, 0x80)
|
|
|
|
else output_if_between(usage, 0x1f, 0x4e, w, E_Notify, aplphanumTitles1, 0x80)
|
|
|
|
else output_if_between(usage, 0x7f, 0x96, w, E_Notify, digitTitles2, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParserBase::PrintMedicalInstrumentPageUsage(uint16_t usage) {
|
2013-12-05 00:40:23 +01:00
|
|
|
const char * const * w;
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrSpace, 0x80);
|
2013-12-05 03:55:24 +01:00
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
if(usage == 1) E_Notify(pstrUsageMedicalUltrasound, 0x80);
|
|
|
|
else if(usage == 0x70)
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(pstrUsageDepthGainCompensation, 0x80);
|
2013-12-05 08:06:07 +01:00
|
|
|
else output_if_between(usage, 0x1f, 0x28, w, E_Notify, medInstrTitles0, 0x80)
|
|
|
|
else output_if_between(usage, 0x3f, 0x45, w, E_Notify, medInstrTitles1, 0x80)
|
|
|
|
else output_if_between(usage, 0x5f, 0x62, w, E_Notify, medInstrTitles2, 0x80)
|
|
|
|
else output_if_between(usage, 0x7f, 0x8a, w, E_Notify, medInstrTitles3, 0x80)
|
|
|
|
else output_if_between(usage, 0x9f, 0xa2, w, E_Notify, medInstrTitles4, 0x80)
|
2013-12-05 03:55:24 +01:00
|
|
|
else E_Notify(pstrUsagePageUndefined, 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
uint8_t ReportDescParser2::ParseItem(uint8_t **pp, uint16_t *pcntdn) {
|
|
|
|
//uint8_t ret = enErrorSuccess;
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
switch(itemParseState) {
|
2013-03-28 08:26:02 +01:00
|
|
|
case 0:
|
2013-12-25 11:09:57 +01:00
|
|
|
if(**pp == HID_LONG_ITEM_PREFIX)
|
2013-03-28 08:26:02 +01:00
|
|
|
USBTRACE("\r\nLONG\r\n");
|
|
|
|
else {
|
|
|
|
uint8_t size = ((**pp) & DATA_SIZE_MASK);
|
|
|
|
itemPrefix = (**pp);
|
|
|
|
itemSize = 1 + ((size == DATA_SIZE_4) ? 4 : size);
|
|
|
|
}
|
|
|
|
(*pp)++;
|
|
|
|
(*pcntdn)--;
|
|
|
|
itemSize--;
|
|
|
|
itemParseState = 1;
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
if(!itemSize)
|
2013-03-28 08:26:02 +01:00
|
|
|
break;
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
if(!pcntdn)
|
2013-03-28 08:26:02 +01:00
|
|
|
return enErrorIncomplete;
|
|
|
|
case 1:
|
|
|
|
theBuffer.valueSize = itemSize;
|
|
|
|
valParser.Initialize(&theBuffer);
|
|
|
|
itemParseState = 2;
|
|
|
|
case 2:
|
2013-12-25 11:09:57 +01:00
|
|
|
if(!valParser.Parse(pp, pcntdn))
|
2013-03-28 08:26:02 +01:00
|
|
|
return enErrorIncomplete;
|
|
|
|
itemParseState = 3;
|
|
|
|
case 3:
|
|
|
|
{
|
2013-03-28 09:46:43 +01:00
|
|
|
uint8_t data = *((uint8_t*)varBuffer);
|
2013-03-28 08:26:02 +01:00
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
switch(itemPrefix & (TYPE_MASK | TAG_MASK)) {
|
2013-03-28 08:26:02 +01:00
|
|
|
case (TYPE_LOCAL | TAG_LOCAL_USAGE):
|
2013-12-25 11:09:57 +01:00
|
|
|
if(pfUsage) {
|
|
|
|
if(theBuffer.valueSize > 1) {
|
|
|
|
uint16_t* ui16 = reinterpret_cast<uint16_t *>(varBuffer);
|
2013-12-05 00:40:23 +01:00
|
|
|
pfUsage(*ui16);
|
|
|
|
} else
|
2013-03-28 08:26:02 +01:00
|
|
|
pfUsage(data);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_REPORTSIZE):
|
|
|
|
rptSize = data;
|
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_REPORTCOUNT):
|
|
|
|
rptCount = data;
|
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_REPORTID):
|
|
|
|
rptId = data;
|
|
|
|
break;
|
|
|
|
case (TYPE_LOCAL | TAG_LOCAL_USAGEMIN):
|
|
|
|
useMin = data;
|
|
|
|
break;
|
|
|
|
case (TYPE_LOCAL | TAG_LOCAL_USAGEMAX):
|
|
|
|
useMax = data;
|
|
|
|
break;
|
|
|
|
case (TYPE_GLOBAL | TAG_GLOBAL_USAGEPAGE):
|
|
|
|
SetUsagePage(data);
|
|
|
|
break;
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_OUTPUT):
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_FEATURE):
|
|
|
|
rptSize = 0;
|
|
|
|
rptCount = 0;
|
|
|
|
useMin = 0;
|
|
|
|
useMax = 0;
|
|
|
|
break;
|
|
|
|
case (TYPE_MAIN | TAG_MAIN_INPUT):
|
|
|
|
OnInputItem(data);
|
|
|
|
|
2013-03-28 09:46:43 +01:00
|
|
|
totalSize += (uint16_t)rptSize * (uint16_t)rptCount;
|
2013-03-28 08:26:02 +01:00
|
|
|
|
|
|
|
rptSize = 0;
|
|
|
|
rptCount = 0;
|
|
|
|
useMin = 0;
|
|
|
|
useMax = 0;
|
|
|
|
break;
|
|
|
|
} // switch (**pp & (TYPE_MASK | TAG_MASK))
|
|
|
|
}
|
|
|
|
} // switch (itemParseState)
|
|
|
|
itemParseState = 0;
|
|
|
|
return enErrorSuccess;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ReportDescParser2::OnInputItem(uint8_t itm) {
|
|
|
|
uint8_t byte_offset = (totalSize >> 3); // calculate offset to the next unhandled byte i = (int)(totalCount / 8);
|
|
|
|
uint32_t tmp = (byte_offset << 3);
|
|
|
|
uint8_t bit_offset = totalSize - tmp; // number of bits in the current byte already handled
|
|
|
|
uint8_t *p = pBuf + byte_offset; // current byte pointer
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
if(bit_offset)
|
2013-03-28 08:26:02 +01:00
|
|
|
*p >>= bit_offset;
|
|
|
|
|
|
|
|
uint8_t usage = useMin;
|
|
|
|
|
|
|
|
bool print_usemin_usemax = ((useMin < useMax) && ((itm & 3) == 2) && pfUsage) ? true : false;
|
|
|
|
|
|
|
|
uint8_t bits_of_byte = 8;
|
|
|
|
|
|
|
|
// for each field in field array defined by rptCount
|
2013-12-25 11:09:57 +01:00
|
|
|
for(uint8_t field = 0; field < rptCount; field++, usage++) {
|
2013-03-28 08:26:02 +01:00
|
|
|
|
|
|
|
union {
|
|
|
|
uint8_t bResult[4];
|
|
|
|
uint16_t wResult[2];
|
|
|
|
uint32_t dwResult;
|
|
|
|
} result;
|
|
|
|
|
|
|
|
result.dwResult = 0;
|
|
|
|
uint8_t mask = 0;
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
if(print_usemin_usemax)
|
2013-03-28 08:26:02 +01:00
|
|
|
pfUsage(usage);
|
|
|
|
|
|
|
|
// bits_left - number of bits in the field(array of fields, depending on Report Count) left to process
|
|
|
|
// bits_of_byte - number of bits in current byte left to process
|
|
|
|
// bits_to_copy - number of bits to copy to result buffer
|
|
|
|
|
|
|
|
// for each bit in a field
|
2013-12-25 11:09:57 +01:00
|
|
|
for(uint8_t bits_left = rptSize, bits_to_copy = 0; bits_left;
|
2013-03-28 08:26:02 +01:00
|
|
|
bits_left -= bits_to_copy) {
|
|
|
|
bits_to_copy = (bits_left > bits_of_byte) ? bits_of_byte : bits_left;
|
|
|
|
|
|
|
|
result.dwResult <<= bits_to_copy; // Result buffer is shifted by the number of bits to be copied into it
|
|
|
|
|
|
|
|
uint8_t val = *p;
|
|
|
|
|
|
|
|
val >>= (8 - bits_of_byte); // Shift by the number of bits already processed
|
|
|
|
|
|
|
|
mask = 0;
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
for(uint8_t j = bits_to_copy; j; j--) {
|
2013-03-28 08:26:02 +01:00
|
|
|
mask <<= 1;
|
|
|
|
mask |= 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
result.bResult[0] = (result.bResult[0] | (val & mask));
|
|
|
|
|
|
|
|
bits_of_byte -= bits_to_copy;
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
if(bits_of_byte < 1) {
|
2013-03-28 08:26:02 +01:00
|
|
|
bits_of_byte = 8;
|
|
|
|
p++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
PrintByteValue(result.dwResult);
|
|
|
|
}
|
2013-06-18 22:00:35 +02:00
|
|
|
E_Notify(PSTR("\r\n"), 0x80);
|
2013-03-28 08:26:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void UniversalReportParser::Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf) {
|
|
|
|
ReportDescParser2 prs(len, buf);
|
|
|
|
|
|
|
|
uint8_t ret = hid->GetReportDescr(0, &prs);
|
|
|
|
|
2013-12-25 11:09:57 +01:00
|
|
|
if(ret)
|
2013-03-28 08:26:02 +01:00
|
|
|
ErrorMessage<uint8_t > (PSTR("GetReportDescr-2"), ret);
|
2013-03-30 15:29:16 +01:00
|
|
|
}
|