Library to use Arduino USB host shield on mbed

Dependents:   USBHOST_PS5

ArduinoのUSB Host Shield 2.0をmbedで使えるようにしたライブラリです。
大体のコードがArduinoからそのまま移植可能です。

Arduino UNOやMega用のホストシールド以外にもミニサイズのホストシールドでも使用可能です https://os.mbed.com/media/uploads/kotakku/dffgfddswa.png

シールドについて

3.3VのI/O用にシールドの改造が必要になりますがネット上に記事がたくさんあるのでそちらを参考にしてください

接続例

https://os.mbed.com/media/uploads/kotakku/esgsvfvhjrekldkcjxvb.png

使い方

Arduinoのコードと違うのはUSBのインスタンスの宣言部分のみです。
ピンを自分で指定できるようにしたので使いやすくなりました。

仕様

  • Arduinoのmillis関数、micros関数の移植のために内部でTimerクラスを使用しています。

main.cpp

#include "mbed.h"
#include <PS3BT.h>
#include <usbhub.h>

Serial pc(USBTX, USBRX, 115200);

//Nucleo f303k8用
USB Usb(A6, A5, A4, A3, A2); // mosi, miso, sclk, ssel, intr
BTD Btd(&Usb);
PS3BT PS3(&Btd);

int main()
{
    bool printAngle = false;

    if (Usb.Init() == -1)
    {
        pc.printf("\r\nOSC did not start");
        while (1); // Halt
    }
    pc.printf("\r\nPS3 USB Library Started");

    while (1)
    {
        Usb.Task();
        
        if (PS3.PS3Connected || PS3.PS3NavigationConnected) {
            if (PS3.getAnalogHat(LeftHatX) > 137 || PS3.getAnalogHat(LeftHatX) < 117 || PS3.getAnalogHat(LeftHatY) > 137 || PS3.getAnalogHat(LeftHatY) < 117 || PS3.getAnalogHat(RightHatX) > 137 || PS3.getAnalogHat(RightHatX) < 117 || PS3.getAnalogHat(RightHatY) > 137 || PS3.getAnalogHat(RightHatY) < 117)
            {
                pc.printf("\r\nLeftHatX: %d", PS3.getAnalogHat(LeftHatX));
                pc.printf("\tLeftHatY: %d", PS3.getAnalogHat(LeftHatY));
                if (PS3.PS3Connected)
                { // The Navigation controller only have one joystick
                    pc.printf("\tRightHatX: %d", PS3.getAnalogHat(RightHatX));
                    pc.printf("\tRightHatY: %d", PS3.getAnalogHat(RightHatY));
                }
            }
            // Analog button values can be read from almost all buttons
            if (PS3.getAnalogButton(L2) || PS3.getAnalogButton(R2))
            {
                pc.printf("\r\nL2: %d", PS3.getAnalogButton(L2));
                if (!PS3.PS3NavigationConnected)
                {
                    pc.printf("\tR2: %d", PS3.getAnalogButton(R2));
                }
            }
            if (PS3.getButtonClick(PS))
            {
                PS3.disconnect();
                pc.printf("\r\nPS");
            }
    
            if (PS3.getButtonClick(TRIANGLE))
                pc.printf("\r\nTriangle");
            if (PS3.getButtonClick(CIRCLE))
                pc.printf("\r\nCircle");
            if (PS3.getButtonClick(CROSS))
                pc.printf("\r\nCross");
            if (PS3.getButtonClick(SQUARE))
                pc.printf("\r\nSquare");
    
            if (PS3.getButtonClick(UP))
            {
                pc.printf("\r\nUp");
                PS3.setLedOff();
                PS3.setLedOn(CONTROLLER_LED4);
            }
            if (PS3.getButtonClick(RIGHT))
            {
                pc.printf("\r\nRight");
                PS3.setLedOff();
                PS3.setLedOn(CONTROLLER_LED1);
            }
            if (PS3.getButtonClick(DOWN))
            {
                pc.printf("\r\nDown");
                PS3.setLedOff();
                PS3.setLedOn(CONTROLLER_LED2);
            }
            if (PS3.getButtonClick(LEFT))
            {
                pc.printf("\r\nLeft");
                PS3.setLedOff();
                PS3.setLedOn(CONTROLLER_LED3);
            }
    
            if (PS3.getButtonClick(L1))
                pc.printf("\r\nL1");
            if (PS3.getButtonClick(L3))
                pc.printf("\r\nL3");
            if (PS3.getButtonClick(R1))
                pc.printf("\r\nR1");
            if (PS3.getButtonClick(R3))
                pc.printf("\r\nR3");
    
            if (PS3.getButtonClick(SELECT))
            {
                pc.printf("\r\nSelect - ");
                PS3.printStatusString();
            }
            if (PS3.getButtonClick(START))
            {
                pc.printf("\r\nStart");
                printAngle = !printAngle;
            }
            if (printAngle)
            {
                pc.printf("\r\nPitch: %.3lf", PS3.getAngle(Pitch));
                pc.printf("\tRoll: %.3lf", PS3.getAngle(Roll));
            }
        }
        else
        {
            pc.printf("not connect\n");
        }
    }
}
Committer:
robo_ichinoseki_a
Date:
Sat May 02 05:56:48 2020 +0000
Revision:
1:da31140f2a1c
Parent:
0:b1ce54272580
update

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kotakku 0:b1ce54272580 1 /* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.
kotakku 0:b1ce54272580 2
kotakku 0:b1ce54272580 3 This software may be distributed and modified under the terms of the GNU
kotakku 0:b1ce54272580 4 General Public License version 2 (GPL2) as published by the Free Software
kotakku 0:b1ce54272580 5 Foundation and appearing in the file GPL2.TXT included in the packaging of
kotakku 0:b1ce54272580 6 this file. Please note that GPL2 Section 2[b] requires that all works based
kotakku 0:b1ce54272580 7 on this software must also be made publicly available under the terms of
kotakku 0:b1ce54272580 8 the GPL2 ("Copyleft").
kotakku 0:b1ce54272580 9
kotakku 0:b1ce54272580 10 Contact information
kotakku 0:b1ce54272580 11 -------------------
kotakku 0:b1ce54272580 12
kotakku 0:b1ce54272580 13 Circuits At Home, LTD
kotakku 0:b1ce54272580 14 Web : http://www.circuitsathome.com
kotakku 0:b1ce54272580 15 e-mail : support@circuitsathome.com
kotakku 0:b1ce54272580 16 */
kotakku 0:b1ce54272580 17
kotakku 0:b1ce54272580 18 #include "hidescriptorparser.h"
kotakku 0:b1ce54272580 19
kotakku 0:b1ce54272580 20 const char * const ReportDescParserBase::usagePageTitles0[] PROGMEM = {
kotakku 0:b1ce54272580 21 pstrUsagePageGenericDesktopControls,
kotakku 0:b1ce54272580 22 pstrUsagePageSimulationControls,
kotakku 0:b1ce54272580 23 pstrUsagePageVRControls,
kotakku 0:b1ce54272580 24 pstrUsagePageSportControls,
kotakku 0:b1ce54272580 25 pstrUsagePageGameControls,
kotakku 0:b1ce54272580 26 pstrUsagePageGenericDeviceControls,
kotakku 0:b1ce54272580 27 pstrUsagePageKeyboardKeypad,
kotakku 0:b1ce54272580 28 pstrUsagePageLEDs,
kotakku 0:b1ce54272580 29 pstrUsagePageButton,
kotakku 0:b1ce54272580 30 pstrUsagePageOrdinal,
kotakku 0:b1ce54272580 31 pstrUsagePageTelephone,
kotakku 0:b1ce54272580 32 pstrUsagePageConsumer,
kotakku 0:b1ce54272580 33 pstrUsagePageDigitizer,
kotakku 0:b1ce54272580 34 pstrUsagePagePID,
kotakku 0:b1ce54272580 35 pstrUsagePageUnicode
kotakku 0:b1ce54272580 36 };
kotakku 0:b1ce54272580 37
kotakku 0:b1ce54272580 38 const char * const ReportDescParserBase::usagePageTitles1[] PROGMEM = {
kotakku 0:b1ce54272580 39 pstrUsagePageBarCodeScanner,
kotakku 0:b1ce54272580 40 pstrUsagePageScale,
kotakku 0:b1ce54272580 41 pstrUsagePageMSRDevices,
kotakku 0:b1ce54272580 42 pstrUsagePagePointOfSale,
kotakku 0:b1ce54272580 43 pstrUsagePageCameraControl,
kotakku 0:b1ce54272580 44 pstrUsagePageArcade
kotakku 0:b1ce54272580 45 };
kotakku 0:b1ce54272580 46 const char * const ReportDescParserBase::genDesktopTitles0[] PROGMEM = {
kotakku 0:b1ce54272580 47 pstrUsagePointer,
kotakku 0:b1ce54272580 48 pstrUsageMouse,
kotakku 0:b1ce54272580 49 pstrUsageJoystick,
kotakku 0:b1ce54272580 50 pstrUsageGamePad,
kotakku 0:b1ce54272580 51 pstrUsageKeyboard,
kotakku 0:b1ce54272580 52 pstrUsageKeypad,
kotakku 0:b1ce54272580 53 pstrUsageMultiAxisController,
kotakku 0:b1ce54272580 54 pstrUsageTabletPCSystemControls
kotakku 0:b1ce54272580 55
kotakku 0:b1ce54272580 56 };
kotakku 0:b1ce54272580 57 const char * const ReportDescParserBase::genDesktopTitles1[] PROGMEM = {
kotakku 0:b1ce54272580 58 pstrUsageX,
kotakku 0:b1ce54272580 59 pstrUsageY,
kotakku 0:b1ce54272580 60 pstrUsageZ,
kotakku 0:b1ce54272580 61 pstrUsageRx,
kotakku 0:b1ce54272580 62 pstrUsageRy,
kotakku 0:b1ce54272580 63 pstrUsageRz,
kotakku 0:b1ce54272580 64 pstrUsageSlider,
kotakku 0:b1ce54272580 65 pstrUsageDial,
kotakku 0:b1ce54272580 66 pstrUsageWheel,
kotakku 0:b1ce54272580 67 pstrUsageHatSwitch,
kotakku 0:b1ce54272580 68 pstrUsageCountedBuffer,
kotakku 0:b1ce54272580 69 pstrUsageByteCount,
kotakku 0:b1ce54272580 70 pstrUsageMotionWakeup,
kotakku 0:b1ce54272580 71 pstrUsageStart,
kotakku 0:b1ce54272580 72 pstrUsageSelect,
kotakku 0:b1ce54272580 73 pstrUsagePageReserved,
kotakku 0:b1ce54272580 74 pstrUsageVx,
kotakku 0:b1ce54272580 75 pstrUsageVy,
kotakku 0:b1ce54272580 76 pstrUsageVz,
kotakku 0:b1ce54272580 77 pstrUsageVbrx,
kotakku 0:b1ce54272580 78 pstrUsageVbry,
kotakku 0:b1ce54272580 79 pstrUsageVbrz,
kotakku 0:b1ce54272580 80 pstrUsageVno,
kotakku 0:b1ce54272580 81 pstrUsageFeatureNotification,
kotakku 0:b1ce54272580 82 pstrUsageResolutionMultiplier
kotakku 0:b1ce54272580 83 };
kotakku 0:b1ce54272580 84 const char * const ReportDescParserBase::genDesktopTitles2[] PROGMEM = {
kotakku 0:b1ce54272580 85 pstrUsageSystemControl,
kotakku 0:b1ce54272580 86 pstrUsageSystemPowerDown,
kotakku 0:b1ce54272580 87 pstrUsageSystemSleep,
kotakku 0:b1ce54272580 88 pstrUsageSystemWakeup,
kotakku 0:b1ce54272580 89 pstrUsageSystemContextMenu,
kotakku 0:b1ce54272580 90 pstrUsageSystemMainMenu,
kotakku 0:b1ce54272580 91 pstrUsageSystemAppMenu,
kotakku 0:b1ce54272580 92 pstrUsageSystemMenuHelp,
kotakku 0:b1ce54272580 93 pstrUsageSystemMenuExit,
kotakku 0:b1ce54272580 94 pstrUsageSystemMenuSelect,
kotakku 0:b1ce54272580 95 pstrUsageSystemMenuRight,
kotakku 0:b1ce54272580 96 pstrUsageSystemMenuLeft,
kotakku 0:b1ce54272580 97 pstrUsageSystemMenuUp,
kotakku 0:b1ce54272580 98 pstrUsageSystemMenuDown,
kotakku 0:b1ce54272580 99 pstrUsageSystemColdRestart,
kotakku 0:b1ce54272580 100 pstrUsageSystemWarmRestart,
kotakku 0:b1ce54272580 101 pstrUsageDPadUp,
kotakku 0:b1ce54272580 102 pstrUsageDPadDown,
kotakku 0:b1ce54272580 103 pstrUsageDPadRight,
kotakku 0:b1ce54272580 104 pstrUsageDPadLeft
kotakku 0:b1ce54272580 105 };
kotakku 0:b1ce54272580 106 const char * const ReportDescParserBase::genDesktopTitles3[] PROGMEM = {
kotakku 0:b1ce54272580 107 pstrUsageSystemDock,
kotakku 0:b1ce54272580 108 pstrUsageSystemUndock,
kotakku 0:b1ce54272580 109 pstrUsageSystemSetup,
kotakku 0:b1ce54272580 110 pstrUsageSystemBreak,
kotakku 0:b1ce54272580 111 pstrUsageSystemDebuggerBreak,
kotakku 0:b1ce54272580 112 pstrUsageApplicationBreak,
kotakku 0:b1ce54272580 113 pstrUsageApplicationDebuggerBreak,
kotakku 0:b1ce54272580 114 pstrUsageSystemSpeakerMute,
kotakku 0:b1ce54272580 115 pstrUsageSystemHibernate
kotakku 0:b1ce54272580 116 };
kotakku 0:b1ce54272580 117 const char * const ReportDescParserBase::genDesktopTitles4[] PROGMEM = {
kotakku 0:b1ce54272580 118 pstrUsageSystemDisplayInvert,
kotakku 0:b1ce54272580 119 pstrUsageSystemDisplayInternal,
kotakku 0:b1ce54272580 120 pstrUsageSystemDisplayExternal,
kotakku 0:b1ce54272580 121 pstrUsageSystemDisplayBoth,
kotakku 0:b1ce54272580 122 pstrUsageSystemDisplayDual,
kotakku 0:b1ce54272580 123 pstrUsageSystemDisplayToggleIntExt,
kotakku 0:b1ce54272580 124 pstrUsageSystemDisplaySwapPriSec,
kotakku 0:b1ce54272580 125 pstrUsageSystemDisplayLCDAutoscale
kotakku 0:b1ce54272580 126 };
kotakku 0:b1ce54272580 127 const char * const ReportDescParserBase::simuTitles0[] PROGMEM = {
kotakku 0:b1ce54272580 128 pstrUsageFlightSimulationDevice,
kotakku 0:b1ce54272580 129 pstrUsageAutomobileSimulationDevice,
kotakku 0:b1ce54272580 130 pstrUsageTankSimulationDevice,
kotakku 0:b1ce54272580 131 pstrUsageSpaceshipSimulationDevice,
kotakku 0:b1ce54272580 132 pstrUsageSubmarineSimulationDevice,
kotakku 0:b1ce54272580 133 pstrUsageSailingSimulationDevice,
kotakku 0:b1ce54272580 134 pstrUsageMotocicleSimulationDevice,
kotakku 0:b1ce54272580 135 pstrUsageSportsSimulationDevice,
kotakku 0:b1ce54272580 136 pstrUsageAirplaneSimulationDevice,
kotakku 0:b1ce54272580 137 pstrUsageHelicopterSimulationDevice,
kotakku 0:b1ce54272580 138 pstrUsageMagicCarpetSimulationDevice,
kotakku 0:b1ce54272580 139 pstrUsageBicycleSimulationDevice
kotakku 0:b1ce54272580 140 };
kotakku 0:b1ce54272580 141 const char * const ReportDescParserBase::simuTitles1[] PROGMEM = {
kotakku 0:b1ce54272580 142 pstrUsageFlightControlStick,
kotakku 0:b1ce54272580 143 pstrUsageFlightStick,
kotakku 0:b1ce54272580 144 pstrUsageCyclicControl,
kotakku 0:b1ce54272580 145 pstrUsageCyclicTrim,
kotakku 0:b1ce54272580 146 pstrUsageFlightYoke,
kotakku 0:b1ce54272580 147 pstrUsageTrackControl
kotakku 0:b1ce54272580 148 };
kotakku 0:b1ce54272580 149 const char * const ReportDescParserBase::simuTitles2[] PROGMEM = {
kotakku 0:b1ce54272580 150 pstrUsageAileron,
kotakku 0:b1ce54272580 151 pstrUsageAileronTrim,
kotakku 0:b1ce54272580 152 pstrUsageAntiTorqueControl,
kotakku 0:b1ce54272580 153 pstrUsageAutopilotEnable,
kotakku 0:b1ce54272580 154 pstrUsageChaffRelease,
kotakku 0:b1ce54272580 155 pstrUsageCollectiveControl,
kotakku 0:b1ce54272580 156 pstrUsageDiveBrake,
kotakku 0:b1ce54272580 157 pstrUsageElectronicCountermeasures,
kotakku 0:b1ce54272580 158 pstrUsageElevator,
kotakku 0:b1ce54272580 159 pstrUsageElevatorTrim,
kotakku 0:b1ce54272580 160 pstrUsageRudder,
kotakku 0:b1ce54272580 161 pstrUsageThrottle,
kotakku 0:b1ce54272580 162 pstrUsageFlightCommunications,
kotakku 0:b1ce54272580 163 pstrUsageFlareRelease,
kotakku 0:b1ce54272580 164 pstrUsageLandingGear,
kotakku 0:b1ce54272580 165 pstrUsageToeBrake,
kotakku 0:b1ce54272580 166 pstrUsageTrigger,
kotakku 0:b1ce54272580 167 pstrUsageWeaponsArm,
kotakku 0:b1ce54272580 168 pstrUsageWeaponsSelect,
kotakku 0:b1ce54272580 169 pstrUsageWingFlaps,
kotakku 0:b1ce54272580 170 pstrUsageAccelerator,
kotakku 0:b1ce54272580 171 pstrUsageBrake,
kotakku 0:b1ce54272580 172 pstrUsageClutch,
kotakku 0:b1ce54272580 173 pstrUsageShifter,
kotakku 0:b1ce54272580 174 pstrUsageSteering,
kotakku 0:b1ce54272580 175 pstrUsageTurretDirection,
kotakku 0:b1ce54272580 176 pstrUsageBarrelElevation,
kotakku 0:b1ce54272580 177 pstrUsageDivePlane,
kotakku 0:b1ce54272580 178 pstrUsageBallast,
kotakku 0:b1ce54272580 179 pstrUsageBicycleCrank,
kotakku 0:b1ce54272580 180 pstrUsageHandleBars,
kotakku 0:b1ce54272580 181 pstrUsageFrontBrake,
kotakku 0:b1ce54272580 182 pstrUsageRearBrake
kotakku 0:b1ce54272580 183 };
kotakku 0:b1ce54272580 184 const char * const ReportDescParserBase::vrTitles0[] PROGMEM = {
kotakku 0:b1ce54272580 185 pstrUsageBelt,
kotakku 0:b1ce54272580 186 pstrUsageBodySuit,
kotakku 0:b1ce54272580 187 pstrUsageFlexor,
kotakku 0:b1ce54272580 188 pstrUsageGlove,
kotakku 0:b1ce54272580 189 pstrUsageHeadTracker,
kotakku 0:b1ce54272580 190 pstrUsageHeadMountedDisplay,
kotakku 0:b1ce54272580 191 pstrUsageHandTracker,
kotakku 0:b1ce54272580 192 pstrUsageOculometer,
kotakku 0:b1ce54272580 193 pstrUsageVest,
kotakku 0:b1ce54272580 194 pstrUsageAnimatronicDevice
kotakku 0:b1ce54272580 195 };
kotakku 0:b1ce54272580 196 const char * const ReportDescParserBase::vrTitles1[] PROGMEM = {
kotakku 0:b1ce54272580 197 pstrUsageStereoEnable,
kotakku 0:b1ce54272580 198 pstrUsageDisplayEnable
kotakku 0:b1ce54272580 199 };
kotakku 0:b1ce54272580 200 const char * const ReportDescParserBase::sportsCtrlTitles0[] PROGMEM = {
kotakku 0:b1ce54272580 201 pstrUsageBaseballBat,
kotakku 0:b1ce54272580 202 pstrUsageGolfClub,
kotakku 0:b1ce54272580 203 pstrUsageRowingMachine,
kotakku 0:b1ce54272580 204 pstrUsageTreadmill
kotakku 0:b1ce54272580 205 };
kotakku 0:b1ce54272580 206 const char * const ReportDescParserBase::sportsCtrlTitles1[] PROGMEM = {
kotakku 0:b1ce54272580 207 pstrUsageOar,
kotakku 0:b1ce54272580 208 pstrUsageSlope,
kotakku 0:b1ce54272580 209 pstrUsageRate,
kotakku 0:b1ce54272580 210 pstrUsageStickSpeed,
kotakku 0:b1ce54272580 211 pstrUsageStickFaceAngle,
kotakku 0:b1ce54272580 212 pstrUsageStickHeelToe,
kotakku 0:b1ce54272580 213 pstrUsageStickFollowThough,
kotakku 0:b1ce54272580 214 pstrUsageStickTempo,
kotakku 0:b1ce54272580 215 pstrUsageStickType,
kotakku 0:b1ce54272580 216 pstrUsageStickHeight
kotakku 0:b1ce54272580 217 };
kotakku 0:b1ce54272580 218 const char * const ReportDescParserBase::sportsCtrlTitles2[] PROGMEM = {
kotakku 0:b1ce54272580 219 pstrUsagePutter,
kotakku 0:b1ce54272580 220 pstrUsage1Iron,
kotakku 0:b1ce54272580 221 pstrUsage2Iron,
kotakku 0:b1ce54272580 222 pstrUsage3Iron,
kotakku 0:b1ce54272580 223 pstrUsage4Iron,
kotakku 0:b1ce54272580 224 pstrUsage5Iron,
kotakku 0:b1ce54272580 225 pstrUsage6Iron,
kotakku 0:b1ce54272580 226 pstrUsage7Iron,
kotakku 0:b1ce54272580 227 pstrUsage8Iron,
kotakku 0:b1ce54272580 228 pstrUsage9Iron,
kotakku 0:b1ce54272580 229 pstrUsage10Iron,
kotakku 0:b1ce54272580 230 pstrUsage11Iron,
kotakku 0:b1ce54272580 231 pstrUsageSandWedge,
kotakku 0:b1ce54272580 232 pstrUsageLoftWedge,
kotakku 0:b1ce54272580 233 pstrUsagePowerWedge,
kotakku 0:b1ce54272580 234 pstrUsage1Wood,
kotakku 0:b1ce54272580 235 pstrUsage3Wood,
kotakku 0:b1ce54272580 236 pstrUsage5Wood,
kotakku 0:b1ce54272580 237 pstrUsage7Wood,
kotakku 0:b1ce54272580 238 pstrUsage9Wood
kotakku 0:b1ce54272580 239 };
kotakku 0:b1ce54272580 240 const char * const ReportDescParserBase::gameTitles0[] PROGMEM = {
kotakku 0:b1ce54272580 241 pstrUsage3DGameController,
kotakku 0:b1ce54272580 242 pstrUsagePinballDevice,
kotakku 0:b1ce54272580 243 pstrUsageGunDevice
kotakku 0:b1ce54272580 244 };
kotakku 0:b1ce54272580 245 const char * const ReportDescParserBase::gameTitles1[] PROGMEM = {
kotakku 0:b1ce54272580 246 pstrUsagePointOfView,
kotakku 0:b1ce54272580 247 pstrUsageTurnRightLeft,
kotakku 0:b1ce54272580 248 pstrUsagePitchForwardBackward,
kotakku 0:b1ce54272580 249 pstrUsageRollRightLeft,
kotakku 0:b1ce54272580 250 pstrUsageMoveRightLeft,
kotakku 0:b1ce54272580 251 pstrUsageMoveForwardBackward,
kotakku 0:b1ce54272580 252 pstrUsageMoveUpDown,
kotakku 0:b1ce54272580 253 pstrUsageLeanRightLeft,
kotakku 0:b1ce54272580 254 pstrUsageLeanForwardBackward,
kotakku 0:b1ce54272580 255 pstrUsageHeightOfPOV,
kotakku 0:b1ce54272580 256 pstrUsageFlipper,
kotakku 0:b1ce54272580 257 pstrUsageSecondaryFlipper,
kotakku 0:b1ce54272580 258 pstrUsageBump,
kotakku 0:b1ce54272580 259 pstrUsageNewGame,
kotakku 0:b1ce54272580 260 pstrUsageShootBall,
kotakku 0:b1ce54272580 261 pstrUsagePlayer,
kotakku 0:b1ce54272580 262 pstrUsageGunBolt,
kotakku 0:b1ce54272580 263 pstrUsageGunClip,
kotakku 0:b1ce54272580 264 pstrUsageGunSelector,
kotakku 0:b1ce54272580 265 pstrUsageGunSingleShot,
kotakku 0:b1ce54272580 266 pstrUsageGunBurst,
kotakku 0:b1ce54272580 267 pstrUsageGunAutomatic,
kotakku 0:b1ce54272580 268 pstrUsageGunSafety,
kotakku 0:b1ce54272580 269 pstrUsageGamepadFireJump,
kotakku 0:b1ce54272580 270 pstrUsageGamepadTrigger
kotakku 0:b1ce54272580 271 };
kotakku 0:b1ce54272580 272 const char * const ReportDescParserBase::genDevCtrlTitles[] PROGMEM = {
kotakku 0:b1ce54272580 273 pstrUsageBatteryStrength,
kotakku 0:b1ce54272580 274 pstrUsageWirelessChannel,
kotakku 0:b1ce54272580 275 pstrUsageWirelessID,
kotakku 0:b1ce54272580 276 pstrUsageDiscoverWirelessControl,
kotakku 0:b1ce54272580 277 pstrUsageSecurityCodeCharEntered,
kotakku 0:b1ce54272580 278 pstrUsageSecurityCodeCharErased,
kotakku 0:b1ce54272580 279 pstrUsageSecurityCodeCleared
kotakku 0:b1ce54272580 280 };
kotakku 0:b1ce54272580 281 const char * const ReportDescParserBase::ledTitles[] PROGMEM = {
kotakku 0:b1ce54272580 282 pstrUsageNumLock,
kotakku 0:b1ce54272580 283 pstrUsageCapsLock,
kotakku 0:b1ce54272580 284 pstrUsageScrollLock,
kotakku 0:b1ce54272580 285 pstrUsageCompose,
kotakku 0:b1ce54272580 286 pstrUsageKana,
kotakku 0:b1ce54272580 287 pstrUsagePower,
kotakku 0:b1ce54272580 288 pstrUsageShift,
kotakku 0:b1ce54272580 289 pstrUsageDoNotDisturb,
kotakku 0:b1ce54272580 290 pstrUsageMute,
kotakku 0:b1ce54272580 291 pstrUsageToneEnable,
kotakku 0:b1ce54272580 292 pstrUsageHighCutFilter,
kotakku 0:b1ce54272580 293 pstrUsageLowCutFilter,
kotakku 0:b1ce54272580 294 pstrUsageEqualizerEnable,
kotakku 0:b1ce54272580 295 pstrUsageSoundFieldOn,
kotakku 0:b1ce54272580 296 pstrUsageSurroundOn,
kotakku 0:b1ce54272580 297 pstrUsageRepeat,
kotakku 0:b1ce54272580 298 pstrUsageStereo,
kotakku 0:b1ce54272580 299 pstrUsageSamplingRateDetect,
kotakku 0:b1ce54272580 300 pstrUsageSpinning,
kotakku 0:b1ce54272580 301 pstrUsageCAV,
kotakku 0:b1ce54272580 302 pstrUsageCLV,
kotakku 0:b1ce54272580 303 pstrUsageRecordingFormatDetect,
kotakku 0:b1ce54272580 304 pstrUsageOffHook,
kotakku 0:b1ce54272580 305 pstrUsageRing,
kotakku 0:b1ce54272580 306 pstrUsageMessageWaiting,
kotakku 0:b1ce54272580 307 pstrUsageDataMode,
kotakku 0:b1ce54272580 308 pstrUsageBatteryOperation,
kotakku 0:b1ce54272580 309 pstrUsageBatteryOK,
kotakku 0:b1ce54272580 310 pstrUsageBatteryLow,
kotakku 0:b1ce54272580 311 pstrUsageSpeaker,
kotakku 0:b1ce54272580 312 pstrUsageHeadSet,
kotakku 0:b1ce54272580 313 pstrUsageHold,
kotakku 0:b1ce54272580 314 pstrUsageMicrophone,
kotakku 0:b1ce54272580 315 pstrUsageCoverage,
kotakku 0:b1ce54272580 316 pstrUsageNightMode,
kotakku 0:b1ce54272580 317 pstrUsageSendCalls,
kotakku 0:b1ce54272580 318 pstrUsageCallPickup,
kotakku 0:b1ce54272580 319 pstrUsageConference,
kotakku 0:b1ce54272580 320 pstrUsageStandBy,
kotakku 0:b1ce54272580 321 pstrUsageCameraOn,
kotakku 0:b1ce54272580 322 pstrUsageCameraOff,
kotakku 0:b1ce54272580 323 pstrUsageOnLine,
kotakku 0:b1ce54272580 324 pstrUsageOffLine,
kotakku 0:b1ce54272580 325 pstrUsageBusy,
kotakku 0:b1ce54272580 326 pstrUsageReady,
kotakku 0:b1ce54272580 327 pstrUsagePaperOut,
kotakku 0:b1ce54272580 328 pstrUsagePaperJam,
kotakku 0:b1ce54272580 329 pstrUsageRemote,
kotakku 0:b1ce54272580 330 pstrUsageForward,
kotakku 0:b1ce54272580 331 pstrUsageReverse,
kotakku 0:b1ce54272580 332 pstrUsageStop,
kotakku 0:b1ce54272580 333 pstrUsageRewind,
kotakku 0:b1ce54272580 334 pstrUsageFastForward,
kotakku 0:b1ce54272580 335 pstrUsagePlay,
kotakku 0:b1ce54272580 336 pstrUsagePause,
kotakku 0:b1ce54272580 337 pstrUsageRecord,
kotakku 0:b1ce54272580 338 pstrUsageError,
kotakku 0:b1ce54272580 339 pstrUsageSelectedIndicator,
kotakku 0:b1ce54272580 340 pstrUsageInUseIndicator,
kotakku 0:b1ce54272580 341 pstrUsageMultiModeIndicator,
kotakku 0:b1ce54272580 342 pstrUsageIndicatorOn,
kotakku 0:b1ce54272580 343 pstrUsageIndicatorFlash,
kotakku 0:b1ce54272580 344 pstrUsageIndicatorSlowBlink,
kotakku 0:b1ce54272580 345 pstrUsageIndicatorFastBlink,
kotakku 0:b1ce54272580 346 pstrUsageIndicatorOff,
kotakku 0:b1ce54272580 347 pstrUsageFlashOnTime,
kotakku 0:b1ce54272580 348 pstrUsageSlowBlinkOnTime,
kotakku 0:b1ce54272580 349 pstrUsageSlowBlinkOffTime,
kotakku 0:b1ce54272580 350 pstrUsageFastBlinkOnTime,
kotakku 0:b1ce54272580 351 pstrUsageFastBlinkOffTime,
kotakku 0:b1ce54272580 352 pstrUsageIndicatorColor,
kotakku 0:b1ce54272580 353 pstrUsageIndicatorRed,
kotakku 0:b1ce54272580 354 pstrUsageIndicatorGreen,
kotakku 0:b1ce54272580 355 pstrUsageIndicatorAmber,
kotakku 0:b1ce54272580 356 pstrUsageGenericIndicator,
kotakku 0:b1ce54272580 357 pstrUsageSystemSuspend,
kotakku 0:b1ce54272580 358 pstrUsageExternalPowerConnected
kotakku 0:b1ce54272580 359 };
kotakku 0:b1ce54272580 360 const char * const ReportDescParserBase::telTitles0 [] PROGMEM = {
kotakku 0:b1ce54272580 361 pstrUsagePhone,
kotakku 0:b1ce54272580 362 pstrUsageAnsweringMachine,
kotakku 0:b1ce54272580 363 pstrUsageMessageControls,
kotakku 0:b1ce54272580 364 pstrUsageHandset,
kotakku 0:b1ce54272580 365 pstrUsageHeadset,
kotakku 0:b1ce54272580 366 pstrUsageTelephonyKeyPad,
kotakku 0:b1ce54272580 367 pstrUsageProgrammableButton
kotakku 0:b1ce54272580 368 };
kotakku 0:b1ce54272580 369 const char * const ReportDescParserBase::telTitles1 [] PROGMEM = {
kotakku 0:b1ce54272580 370 pstrUsageHookSwitch,
kotakku 0:b1ce54272580 371 pstrUsageFlash,
kotakku 0:b1ce54272580 372 pstrUsageFeature,
kotakku 0:b1ce54272580 373 pstrUsageHold,
kotakku 0:b1ce54272580 374 pstrUsageRedial,
kotakku 0:b1ce54272580 375 pstrUsageTransfer,
kotakku 0:b1ce54272580 376 pstrUsageDrop,
kotakku 0:b1ce54272580 377 pstrUsagePark,
kotakku 0:b1ce54272580 378 pstrUsageForwardCalls,
kotakku 0:b1ce54272580 379 pstrUsageAlternateFunction,
kotakku 0:b1ce54272580 380 pstrUsageLine,
kotakku 0:b1ce54272580 381 pstrUsageSpeakerPhone,
kotakku 0:b1ce54272580 382 pstrUsageConference,
kotakku 0:b1ce54272580 383 pstrUsageRingEnable,
kotakku 0:b1ce54272580 384 pstrUsageRingSelect,
kotakku 0:b1ce54272580 385 pstrUsagePhoneMute,
kotakku 0:b1ce54272580 386 pstrUsageCallerID,
kotakku 0:b1ce54272580 387 pstrUsageSend
kotakku 0:b1ce54272580 388 };
kotakku 0:b1ce54272580 389 const char * const ReportDescParserBase::telTitles2 [] PROGMEM = {
kotakku 0:b1ce54272580 390 pstrUsageSpeedDial,
kotakku 0:b1ce54272580 391 pstrUsageStoreNumber,
kotakku 0:b1ce54272580 392 pstrUsageRecallNumber,
kotakku 0:b1ce54272580 393 pstrUsagePhoneDirectory
kotakku 0:b1ce54272580 394 };
kotakku 0:b1ce54272580 395 const char * const ReportDescParserBase::telTitles3 [] PROGMEM = {
kotakku 0:b1ce54272580 396 pstrUsageVoiceMail,
kotakku 0:b1ce54272580 397 pstrUsageScreenCalls,
kotakku 0:b1ce54272580 398 pstrUsageDoNotDisturb,
kotakku 0:b1ce54272580 399 pstrUsageMessage,
kotakku 0:b1ce54272580 400 pstrUsageAnswerOnOff
kotakku 0:b1ce54272580 401 };
kotakku 0:b1ce54272580 402 const char * const ReportDescParserBase::telTitles4 [] PROGMEM = {
kotakku 0:b1ce54272580 403 pstrUsageInsideDialTone,
kotakku 0:b1ce54272580 404 pstrUsageOutsideDialTone,
kotakku 0:b1ce54272580 405 pstrUsageInsideRingTone,
kotakku 0:b1ce54272580 406 pstrUsageOutsideRingTone,
kotakku 0:b1ce54272580 407 pstrUsagePriorityRingTone,
kotakku 0:b1ce54272580 408 pstrUsageInsideRingback,
kotakku 0:b1ce54272580 409 pstrUsagePriorityRingback,
kotakku 0:b1ce54272580 410 pstrUsageLineBusyTone,
kotakku 0:b1ce54272580 411 pstrUsageReorderTone,
kotakku 0:b1ce54272580 412 pstrUsageCallWaitingTone,
kotakku 0:b1ce54272580 413 pstrUsageConfirmationTone1,
kotakku 0:b1ce54272580 414 pstrUsageConfirmationTone2,
kotakku 0:b1ce54272580 415 pstrUsageTonesOff,
kotakku 0:b1ce54272580 416 pstrUsageOutsideRingback,
kotakku 0:b1ce54272580 417 pstrUsageRinger
kotakku 0:b1ce54272580 418 };
kotakku 0:b1ce54272580 419 const char * const ReportDescParserBase::telTitles5 [] PROGMEM = {
kotakku 0:b1ce54272580 420 pstrUsagePhoneKey0,
kotakku 0:b1ce54272580 421 pstrUsagePhoneKey1,
kotakku 0:b1ce54272580 422 pstrUsagePhoneKey2,
kotakku 0:b1ce54272580 423 pstrUsagePhoneKey3,
kotakku 0:b1ce54272580 424 pstrUsagePhoneKey4,
kotakku 0:b1ce54272580 425 pstrUsagePhoneKey5,
kotakku 0:b1ce54272580 426 pstrUsagePhoneKey6,
kotakku 0:b1ce54272580 427 pstrUsagePhoneKey7,
kotakku 0:b1ce54272580 428 pstrUsagePhoneKey8,
kotakku 0:b1ce54272580 429 pstrUsagePhoneKey9,
kotakku 0:b1ce54272580 430 pstrUsagePhoneKeyStar,
kotakku 0:b1ce54272580 431 pstrUsagePhoneKeyPound,
kotakku 0:b1ce54272580 432 pstrUsagePhoneKeyA,
kotakku 0:b1ce54272580 433 pstrUsagePhoneKeyB,
kotakku 0:b1ce54272580 434 pstrUsagePhoneKeyC,
kotakku 0:b1ce54272580 435 pstrUsagePhoneKeyD
kotakku 0:b1ce54272580 436 };
kotakku 0:b1ce54272580 437 const char * const ReportDescParserBase::consTitles0[] PROGMEM = {
kotakku 0:b1ce54272580 438 pstrUsageConsumerControl,
kotakku 0:b1ce54272580 439 pstrUsageNumericKeyPad,
kotakku 0:b1ce54272580 440 pstrUsageProgrammableButton,
kotakku 0:b1ce54272580 441 pstrUsageMicrophone,
kotakku 0:b1ce54272580 442 pstrUsageHeadphone,
kotakku 0:b1ce54272580 443 pstrUsageGraphicEqualizer
kotakku 0:b1ce54272580 444 };
kotakku 0:b1ce54272580 445 const char * const ReportDescParserBase::consTitles1[] PROGMEM = {
kotakku 0:b1ce54272580 446 pstrUsagePlus10,
kotakku 0:b1ce54272580 447 pstrUsagePlus100,
kotakku 0:b1ce54272580 448 pstrUsageAMPM
kotakku 0:b1ce54272580 449 };
kotakku 0:b1ce54272580 450 const char * const ReportDescParserBase::consTitles2[] PROGMEM = {
kotakku 0:b1ce54272580 451 pstrUsagePower,
kotakku 0:b1ce54272580 452 pstrUsageReset,
kotakku 0:b1ce54272580 453 pstrUsageSleep,
kotakku 0:b1ce54272580 454 pstrUsageSleepAfter,
kotakku 0:b1ce54272580 455 pstrUsageSleepMode,
kotakku 0:b1ce54272580 456 pstrUsageIllumination,
kotakku 0:b1ce54272580 457 pstrUsageFunctionButtons
kotakku 0:b1ce54272580 458
kotakku 0:b1ce54272580 459 };
kotakku 0:b1ce54272580 460 const char * const ReportDescParserBase::consTitles3[] PROGMEM = {
kotakku 0:b1ce54272580 461 pstrUsageMenu,
kotakku 0:b1ce54272580 462 pstrUsageMenuPick,
kotakku 0:b1ce54272580 463 pstrUsageMenuUp,
kotakku 0:b1ce54272580 464 pstrUsageMenuDown,
kotakku 0:b1ce54272580 465 pstrUsageMenuLeft,
kotakku 0:b1ce54272580 466 pstrUsageMenuRight,
kotakku 0:b1ce54272580 467 pstrUsageMenuEscape,
kotakku 0:b1ce54272580 468 pstrUsageMenuValueIncrease,
kotakku 0:b1ce54272580 469 pstrUsageMenuValueDecrease
kotakku 0:b1ce54272580 470 };
kotakku 0:b1ce54272580 471 const char * const ReportDescParserBase::consTitles4[] PROGMEM = {
kotakku 0:b1ce54272580 472 pstrUsageDataOnScreen,
kotakku 0:b1ce54272580 473 pstrUsageClosedCaption,
kotakku 0:b1ce54272580 474 pstrUsageClosedCaptionSelect,
kotakku 0:b1ce54272580 475 pstrUsageVCRTV,
kotakku 0:b1ce54272580 476 pstrUsageBroadcastMode,
kotakku 0:b1ce54272580 477 pstrUsageSnapshot,
kotakku 0:b1ce54272580 478 pstrUsageStill
kotakku 0:b1ce54272580 479 };
kotakku 0:b1ce54272580 480 const char * const ReportDescParserBase::consTitles5[] PROGMEM = {
kotakku 0:b1ce54272580 481 pstrUsageSelection,
kotakku 0:b1ce54272580 482 pstrUsageAssignSelection,
kotakku 0:b1ce54272580 483 pstrUsageModeStep,
kotakku 0:b1ce54272580 484 pstrUsageRecallLast,
kotakku 0:b1ce54272580 485 pstrUsageEnterChannel,
kotakku 0:b1ce54272580 486 pstrUsageOrderMovie,
kotakku 0:b1ce54272580 487 pstrUsageChannel,
kotakku 0:b1ce54272580 488 pstrUsageMediaSelection,
kotakku 0:b1ce54272580 489 pstrUsageMediaSelectComputer,
kotakku 0:b1ce54272580 490 pstrUsageMediaSelectTV,
kotakku 0:b1ce54272580 491 pstrUsageMediaSelectWWW,
kotakku 0:b1ce54272580 492 pstrUsageMediaSelectDVD,
kotakku 0:b1ce54272580 493 pstrUsageMediaSelectTelephone,
kotakku 0:b1ce54272580 494 pstrUsageMediaSelectProgramGuide,
kotakku 0:b1ce54272580 495 pstrUsageMediaSelectVideoPhone,
kotakku 0:b1ce54272580 496 pstrUsageMediaSelectGames,
kotakku 0:b1ce54272580 497 pstrUsageMediaSelectMessages,
kotakku 0:b1ce54272580 498 pstrUsageMediaSelectCD,
kotakku 0:b1ce54272580 499 pstrUsageMediaSelectVCR,
kotakku 0:b1ce54272580 500 pstrUsageMediaSelectTuner,
kotakku 0:b1ce54272580 501 pstrUsageQuit,
kotakku 0:b1ce54272580 502 pstrUsageHelp,
kotakku 0:b1ce54272580 503 pstrUsageMediaSelectTape,
kotakku 0:b1ce54272580 504 pstrUsageMediaSelectCable,
kotakku 0:b1ce54272580 505 pstrUsageMediaSelectSatellite,
kotakku 0:b1ce54272580 506 pstrUsageMediaSelectSecurity,
kotakku 0:b1ce54272580 507 pstrUsageMediaSelectHome,
kotakku 0:b1ce54272580 508 pstrUsageMediaSelectCall,
kotakku 0:b1ce54272580 509 pstrUsageChannelIncrement,
kotakku 0:b1ce54272580 510 pstrUsageChannelDecrement,
kotakku 0:b1ce54272580 511 pstrUsageMediaSelectSAP,
kotakku 0:b1ce54272580 512 pstrUsagePageReserved,
kotakku 0:b1ce54272580 513 pstrUsageVCRPlus,
kotakku 0:b1ce54272580 514 pstrUsageOnce,
kotakku 0:b1ce54272580 515 pstrUsageDaily,
kotakku 0:b1ce54272580 516 pstrUsageWeekly,
kotakku 0:b1ce54272580 517 pstrUsageMonthly
kotakku 0:b1ce54272580 518 };
kotakku 0:b1ce54272580 519 const char * const ReportDescParserBase::consTitles6[] PROGMEM = {
kotakku 0:b1ce54272580 520 pstrUsagePlay,
kotakku 0:b1ce54272580 521 pstrUsagePause,
kotakku 0:b1ce54272580 522 pstrUsageRecord,
kotakku 0:b1ce54272580 523 pstrUsageFastForward,
kotakku 0:b1ce54272580 524 pstrUsageRewind,
kotakku 0:b1ce54272580 525 pstrUsageScanNextTrack,
kotakku 0:b1ce54272580 526 pstrUsageScanPreviousTrack,
kotakku 0:b1ce54272580 527 pstrUsageStop,
kotakku 0:b1ce54272580 528 pstrUsageEject,
kotakku 0:b1ce54272580 529 pstrUsageRandomPlay,
kotakku 0:b1ce54272580 530 pstrUsageSelectDisk,
kotakku 0:b1ce54272580 531 pstrUsageEnterDisk,
kotakku 0:b1ce54272580 532 pstrUsageRepeat,
kotakku 0:b1ce54272580 533 pstrUsageTracking,
kotakku 0:b1ce54272580 534 pstrUsageTrackNormal,
kotakku 0:b1ce54272580 535 pstrUsageSlowTracking,
kotakku 0:b1ce54272580 536 pstrUsageFrameForward,
kotakku 0:b1ce54272580 537 pstrUsageFrameBackwards,
kotakku 0:b1ce54272580 538 pstrUsageMark,
kotakku 0:b1ce54272580 539 pstrUsageClearMark,
kotakku 0:b1ce54272580 540 pstrUsageRepeatFromMark,
kotakku 0:b1ce54272580 541 pstrUsageReturnToMark,
kotakku 0:b1ce54272580 542 pstrUsageSearchMarkForward,
kotakku 0:b1ce54272580 543 pstrUsageSearchMarkBackwards,
kotakku 0:b1ce54272580 544 pstrUsageCounterReset,
kotakku 0:b1ce54272580 545 pstrUsageShowCounter,
kotakku 0:b1ce54272580 546 pstrUsageTrackingIncrement,
kotakku 0:b1ce54272580 547 pstrUsageTrackingDecrement,
kotakku 0:b1ce54272580 548 pstrUsageStopEject,
kotakku 0:b1ce54272580 549 pstrUsagePlayPause,
kotakku 0:b1ce54272580 550 pstrUsagePlaySkip
kotakku 0:b1ce54272580 551 };
kotakku 0:b1ce54272580 552 const char * const ReportDescParserBase::consTitles7[] PROGMEM = {
kotakku 0:b1ce54272580 553 pstrUsageVolume,
kotakku 0:b1ce54272580 554 pstrUsageBalance,
kotakku 0:b1ce54272580 555 pstrUsageMute,
kotakku 0:b1ce54272580 556 pstrUsageBass,
kotakku 0:b1ce54272580 557 pstrUsageTreble,
kotakku 0:b1ce54272580 558 pstrUsageBassBoost,
kotakku 0:b1ce54272580 559 pstrUsageSurroundMode,
kotakku 0:b1ce54272580 560 pstrUsageLoudness,
kotakku 0:b1ce54272580 561 pstrUsageMPX,
kotakku 0:b1ce54272580 562 pstrUsageVolumeIncrement,
kotakku 0:b1ce54272580 563 pstrUsageVolumeDecrement
kotakku 0:b1ce54272580 564 };
kotakku 0:b1ce54272580 565 const char * const ReportDescParserBase::consTitles8[] PROGMEM = {
kotakku 0:b1ce54272580 566 pstrUsageSpeedSelect,
kotakku 0:b1ce54272580 567 pstrUsagePlaybackSpeed,
kotakku 0:b1ce54272580 568 pstrUsageStandardPlay,
kotakku 0:b1ce54272580 569 pstrUsageLongPlay,
kotakku 0:b1ce54272580 570 pstrUsageExtendedPlay,
kotakku 0:b1ce54272580 571 pstrUsageSlow
kotakku 0:b1ce54272580 572 };
kotakku 0:b1ce54272580 573 const char * const ReportDescParserBase::consTitles9[] PROGMEM = {
kotakku 0:b1ce54272580 574 pstrUsageFanEnable,
kotakku 0:b1ce54272580 575 pstrUsageFanSpeed,
kotakku 0:b1ce54272580 576 pstrUsageLightEnable,
kotakku 0:b1ce54272580 577 pstrUsageLightIlluminationLevel,
kotakku 0:b1ce54272580 578 pstrUsageClimateControlEnable,
kotakku 0:b1ce54272580 579 pstrUsageRoomTemperature,
kotakku 0:b1ce54272580 580 pstrUsageSecurityEnable,
kotakku 0:b1ce54272580 581 pstrUsageFireAlarm,
kotakku 0:b1ce54272580 582 pstrUsagePoliceAlarm,
kotakku 0:b1ce54272580 583 pstrUsageProximity,
kotakku 0:b1ce54272580 584 pstrUsageMotion,
kotakku 0:b1ce54272580 585 pstrUsageDuresAlarm,
kotakku 0:b1ce54272580 586 pstrUsageHoldupAlarm,
kotakku 0:b1ce54272580 587 pstrUsageMedicalAlarm
kotakku 0:b1ce54272580 588 };
kotakku 0:b1ce54272580 589 const char * const ReportDescParserBase::consTitlesA[] PROGMEM = {
kotakku 0:b1ce54272580 590 pstrUsageBalanceRight,
kotakku 0:b1ce54272580 591 pstrUsageBalanceLeft,
kotakku 0:b1ce54272580 592 pstrUsageBassIncrement,
kotakku 0:b1ce54272580 593 pstrUsageBassDecrement,
kotakku 0:b1ce54272580 594 pstrUsageTrebleIncrement,
kotakku 0:b1ce54272580 595 pstrUsageTrebleDecrement
kotakku 0:b1ce54272580 596 };
kotakku 0:b1ce54272580 597 const char * const ReportDescParserBase::consTitlesB[] PROGMEM = {
kotakku 0:b1ce54272580 598 pstrUsageSpeakerSystem,
kotakku 0:b1ce54272580 599 pstrUsageChannelLeft,
kotakku 0:b1ce54272580 600 pstrUsageChannelRight,
kotakku 0:b1ce54272580 601 pstrUsageChannelCenter,
kotakku 0:b1ce54272580 602 pstrUsageChannelFront,
kotakku 0:b1ce54272580 603 pstrUsageChannelCenterFront,
kotakku 0:b1ce54272580 604 pstrUsageChannelSide,
kotakku 0:b1ce54272580 605 pstrUsageChannelSurround,
kotakku 0:b1ce54272580 606 pstrUsageChannelLowFreqEnhancement,
kotakku 0:b1ce54272580 607 pstrUsageChannelTop,
kotakku 0:b1ce54272580 608 pstrUsageChannelUnknown
kotakku 0:b1ce54272580 609 };
kotakku 0:b1ce54272580 610 const char * const ReportDescParserBase::consTitlesC[] PROGMEM = {
kotakku 0:b1ce54272580 611 pstrUsageSubChannel,
kotakku 0:b1ce54272580 612 pstrUsageSubChannelIncrement,
kotakku 0:b1ce54272580 613 pstrUsageSubChannelDecrement,
kotakku 0:b1ce54272580 614 pstrUsageAlternateAudioIncrement,
kotakku 0:b1ce54272580 615 pstrUsageAlternateAudioDecrement
kotakku 0:b1ce54272580 616 };
kotakku 0:b1ce54272580 617 const char * const ReportDescParserBase::consTitlesD[] PROGMEM = {
kotakku 0:b1ce54272580 618 pstrUsageApplicationLaunchButtons,
kotakku 0:b1ce54272580 619 pstrUsageALLaunchButtonConfigTool,
kotakku 0:b1ce54272580 620 pstrUsageALProgrammableButton,
kotakku 0:b1ce54272580 621 pstrUsageALConsumerControlConfig,
kotakku 0:b1ce54272580 622 pstrUsageALWordProcessor,
kotakku 0:b1ce54272580 623 pstrUsageALTextEditor,
kotakku 0:b1ce54272580 624 pstrUsageALSpreadsheet,
kotakku 0:b1ce54272580 625 pstrUsageALGraphicsEditor,
kotakku 0:b1ce54272580 626 pstrUsageALPresentationApp,
kotakku 0:b1ce54272580 627 pstrUsageALDatabaseApp,
kotakku 0:b1ce54272580 628 pstrUsageALEmailReader,
kotakku 0:b1ce54272580 629 pstrUsageALNewsreader,
kotakku 0:b1ce54272580 630 pstrUsageALVoicemail,
kotakku 0:b1ce54272580 631 pstrUsageALContactsAddressBook,
kotakku 0:b1ce54272580 632 pstrUsageALCalendarSchedule,
kotakku 0:b1ce54272580 633 pstrUsageALTaskProjectManager,
kotakku 0:b1ce54272580 634 pstrUsageALLogJournalTimecard,
kotakku 0:b1ce54272580 635 pstrUsageALCheckbookFinance,
kotakku 0:b1ce54272580 636 pstrUsageALCalculator,
kotakku 0:b1ce54272580 637 pstrUsageALAVCapturePlayback,
kotakku 0:b1ce54272580 638 pstrUsageALLocalMachineBrowser,
kotakku 0:b1ce54272580 639 pstrUsageALLANWANBrow,
kotakku 0:b1ce54272580 640 pstrUsageALInternetBrowser,
kotakku 0:b1ce54272580 641 pstrUsageALRemoteNetISPConnect,
kotakku 0:b1ce54272580 642 pstrUsageALNetworkConference,
kotakku 0:b1ce54272580 643 pstrUsageALNetworkChat,
kotakku 0:b1ce54272580 644 pstrUsageALTelephonyDialer,
kotakku 0:b1ce54272580 645 pstrUsageALLogon,
kotakku 0:b1ce54272580 646 pstrUsageALLogoff,
kotakku 0:b1ce54272580 647 pstrUsageALLogonLogoff,
kotakku 0:b1ce54272580 648 pstrUsageALTermLockScrSav,
kotakku 0:b1ce54272580 649 pstrUsageALControlPannel,
kotakku 0:b1ce54272580 650 pstrUsageALCommandLineProcessorRun,
kotakku 0:b1ce54272580 651 pstrUsageALProcessTaskManager,
kotakku 0:b1ce54272580 652 pstrUsageALSelectTaskApplication,
kotakku 0:b1ce54272580 653 pstrUsageALNextTaskApplication,
kotakku 0:b1ce54272580 654 pstrUsageALPreviousTaskApplication,
kotakku 0:b1ce54272580 655 pstrUsageALPreemptiveHaltTaskApp,
kotakku 0:b1ce54272580 656 pstrUsageALIntegratedHelpCenter,
kotakku 0:b1ce54272580 657 pstrUsageALDocuments,
kotakku 0:b1ce54272580 658 pstrUsageALThesaurus,
kotakku 0:b1ce54272580 659 pstrUsageALDictionary,
kotakku 0:b1ce54272580 660 pstrUsageALDesktop,
kotakku 0:b1ce54272580 661 pstrUsageALSpellCheck,
kotakku 0:b1ce54272580 662 pstrUsageALGrammarCheck,
kotakku 0:b1ce54272580 663 pstrUsageALWirelessStatus,
kotakku 0:b1ce54272580 664 pstrUsageALKeyboardLayout,
kotakku 0:b1ce54272580 665 pstrUsageALVirusProtection,
kotakku 0:b1ce54272580 666 pstrUsageALEncryption,
kotakku 0:b1ce54272580 667 pstrUsageALScreenSaver,
kotakku 0:b1ce54272580 668 pstrUsageALAlarms,
kotakku 0:b1ce54272580 669 pstrUsageALClock,
kotakku 0:b1ce54272580 670 pstrUsageALFileBrowser,
kotakku 0:b1ce54272580 671 pstrUsageALPowerStatus,
kotakku 0:b1ce54272580 672 pstrUsageALImageBrowser,
kotakku 0:b1ce54272580 673 pstrUsageALAudioBrowser,
kotakku 0:b1ce54272580 674 pstrUsageALMovieBrowser,
kotakku 0:b1ce54272580 675 pstrUsageALDigitalRightsManager,
kotakku 0:b1ce54272580 676 pstrUsageALDigitalWallet,
kotakku 0:b1ce54272580 677 pstrUsagePageReserved,
kotakku 0:b1ce54272580 678 pstrUsageALInstantMessaging,
kotakku 0:b1ce54272580 679 pstrUsageALOEMFeaturesBrowser,
kotakku 0:b1ce54272580 680 pstrUsageALOEMHelp,
kotakku 0:b1ce54272580 681 pstrUsageALOnlineCommunity,
kotakku 0:b1ce54272580 682 pstrUsageALEntertainmentContentBrow,
kotakku 0:b1ce54272580 683 pstrUsageALOnlineShoppingBrowser,
kotakku 0:b1ce54272580 684 pstrUsageALSmartCardInfoHelp,
kotakku 0:b1ce54272580 685 pstrUsageALMarketMonitorFinBrowser,
kotakku 0:b1ce54272580 686 pstrUsageALCustomCorpNewsBrowser,
kotakku 0:b1ce54272580 687 pstrUsageALOnlineActivityBrowser,
kotakku 0:b1ce54272580 688 pstrUsageALResearchSearchBrowser,
kotakku 0:b1ce54272580 689 pstrUsageALAudioPlayer
kotakku 0:b1ce54272580 690 };
kotakku 0:b1ce54272580 691 const char * const ReportDescParserBase::consTitlesE[] PROGMEM = {
kotakku 0:b1ce54272580 692 pstrUsageGenericGUIAppControls,
kotakku 0:b1ce54272580 693 pstrUsageACNew,
kotakku 0:b1ce54272580 694 pstrUsageACOpen,
kotakku 0:b1ce54272580 695 pstrUsageACClose,
kotakku 0:b1ce54272580 696 pstrUsageACExit,
kotakku 0:b1ce54272580 697 pstrUsageACMaximize,
kotakku 0:b1ce54272580 698 pstrUsageACMinimize,
kotakku 0:b1ce54272580 699 pstrUsageACSave,
kotakku 0:b1ce54272580 700 pstrUsageACPrint,
kotakku 0:b1ce54272580 701 pstrUsageACProperties,
kotakku 0:b1ce54272580 702 pstrUsageACUndo,
kotakku 0:b1ce54272580 703 pstrUsageACCopy,
kotakku 0:b1ce54272580 704 pstrUsageACCut,
kotakku 0:b1ce54272580 705 pstrUsageACPaste,
kotakku 0:b1ce54272580 706 pstrUsageACSelectAll,
kotakku 0:b1ce54272580 707 pstrUsageACFind,
kotakku 0:b1ce54272580 708 pstrUsageACFindAndReplace,
kotakku 0:b1ce54272580 709 pstrUsageACSearch,
kotakku 0:b1ce54272580 710 pstrUsageACGoto,
kotakku 0:b1ce54272580 711 pstrUsageACHome,
kotakku 0:b1ce54272580 712 pstrUsageACBack,
kotakku 0:b1ce54272580 713 pstrUsageACForward,
kotakku 0:b1ce54272580 714 pstrUsageACStop,
kotakku 0:b1ce54272580 715 pstrUsageACRefresh,
kotakku 0:b1ce54272580 716 pstrUsageACPreviousLink,
kotakku 0:b1ce54272580 717 pstrUsageACNextLink,
kotakku 0:b1ce54272580 718 pstrUsageACBookmarks,
kotakku 0:b1ce54272580 719 pstrUsageACHistory,
kotakku 0:b1ce54272580 720 pstrUsageACSubscriptions,
kotakku 0:b1ce54272580 721 pstrUsageACZoomIn,
kotakku 0:b1ce54272580 722 pstrUsageACZoomOut,
kotakku 0:b1ce54272580 723 pstrUsageACZoom,
kotakku 0:b1ce54272580 724 pstrUsageACFullScreenView,
kotakku 0:b1ce54272580 725 pstrUsageACNormalView,
kotakku 0:b1ce54272580 726 pstrUsageACViewToggle,
kotakku 0:b1ce54272580 727 pstrUsageACScrollUp,
kotakku 0:b1ce54272580 728 pstrUsageACScrollDown,
kotakku 0:b1ce54272580 729 pstrUsageACScroll,
kotakku 0:b1ce54272580 730 pstrUsageACPanLeft,
kotakku 0:b1ce54272580 731 pstrUsageACPanRight,
kotakku 0:b1ce54272580 732 pstrUsageACPan,
kotakku 0:b1ce54272580 733 pstrUsageACNewWindow,
kotakku 0:b1ce54272580 734 pstrUsageACTileHoriz,
kotakku 0:b1ce54272580 735 pstrUsageACTileVert,
kotakku 0:b1ce54272580 736 pstrUsageACFormat,
kotakku 0:b1ce54272580 737 pstrUsageACEdit,
kotakku 0:b1ce54272580 738 pstrUsageACBold,
kotakku 0:b1ce54272580 739 pstrUsageACItalics,
kotakku 0:b1ce54272580 740 pstrUsageACUnderline,
kotakku 0:b1ce54272580 741 pstrUsageACStrikethrough,
kotakku 0:b1ce54272580 742 pstrUsageACSubscript,
kotakku 0:b1ce54272580 743 pstrUsageACSuperscript,
kotakku 0:b1ce54272580 744 pstrUsageACAllCaps,
kotakku 0:b1ce54272580 745 pstrUsageACRotate,
kotakku 0:b1ce54272580 746 pstrUsageACResize,
kotakku 0:b1ce54272580 747 pstrUsageACFlipHorizontal,
kotakku 0:b1ce54272580 748 pstrUsageACFlipVertical,
kotakku 0:b1ce54272580 749 pstrUsageACMirrorHorizontal,
kotakku 0:b1ce54272580 750 pstrUsageACMirrorVertical,
kotakku 0:b1ce54272580 751 pstrUsageACFontSelect,
kotakku 0:b1ce54272580 752 pstrUsageACFontColor,
kotakku 0:b1ce54272580 753 pstrUsageACFontSize,
kotakku 0:b1ce54272580 754 pstrUsageACJustifyLeft,
kotakku 0:b1ce54272580 755 pstrUsageACJustifyCenterH,
kotakku 0:b1ce54272580 756 pstrUsageACJustifyRight,
kotakku 0:b1ce54272580 757 pstrUsageACJustifyBlockH,
kotakku 0:b1ce54272580 758 pstrUsageACJustifyTop,
kotakku 0:b1ce54272580 759 pstrUsageACJustifyCenterV,
kotakku 0:b1ce54272580 760 pstrUsageACJustifyBottom,
kotakku 0:b1ce54272580 761 pstrUsageACJustifyBlockV,
kotakku 0:b1ce54272580 762 pstrUsageACIndentDecrease,
kotakku 0:b1ce54272580 763 pstrUsageACIndentIncrease,
kotakku 0:b1ce54272580 764 pstrUsageACNumberedList,
kotakku 0:b1ce54272580 765 pstrUsageACRestartNumbering,
kotakku 0:b1ce54272580 766 pstrUsageACBulletedList,
kotakku 0:b1ce54272580 767 pstrUsageACPromote,
kotakku 0:b1ce54272580 768 pstrUsageACDemote,
kotakku 0:b1ce54272580 769 pstrUsageACYes,
kotakku 0:b1ce54272580 770 pstrUsageACNo,
kotakku 0:b1ce54272580 771 pstrUsageACCancel,
kotakku 0:b1ce54272580 772 pstrUsageACCatalog,
kotakku 0:b1ce54272580 773 pstrUsageACBuyChkout,
kotakku 0:b1ce54272580 774 pstrUsageACAddToCart,
kotakku 0:b1ce54272580 775 pstrUsageACExpand,
kotakku 0:b1ce54272580 776 pstrUsageACExpandAll,
kotakku 0:b1ce54272580 777 pstrUsageACCollapse,
kotakku 0:b1ce54272580 778 pstrUsageACCollapseAll,
kotakku 0:b1ce54272580 779 pstrUsageACPrintPreview,
kotakku 0:b1ce54272580 780 pstrUsageACPasteSpecial,
kotakku 0:b1ce54272580 781 pstrUsageACInsertMode,
kotakku 0:b1ce54272580 782 pstrUsageACDelete,
kotakku 0:b1ce54272580 783 pstrUsageACLock,
kotakku 0:b1ce54272580 784 pstrUsageACUnlock,
kotakku 0:b1ce54272580 785 pstrUsageACProtect,
kotakku 0:b1ce54272580 786 pstrUsageACUnprotect,
kotakku 0:b1ce54272580 787 pstrUsageACAttachComment,
kotakku 0:b1ce54272580 788 pstrUsageACDeleteComment,
kotakku 0:b1ce54272580 789 pstrUsageACViewComment,
kotakku 0:b1ce54272580 790 pstrUsageACSelectWord,
kotakku 0:b1ce54272580 791 pstrUsageACSelectSentence,
kotakku 0:b1ce54272580 792 pstrUsageACSelectParagraph,
kotakku 0:b1ce54272580 793 pstrUsageACSelectColumn,
kotakku 0:b1ce54272580 794 pstrUsageACSelectRow,
kotakku 0:b1ce54272580 795 pstrUsageACSelectTable,
kotakku 0:b1ce54272580 796 pstrUsageACSelectObject,
kotakku 0:b1ce54272580 797 pstrUsageACRedoRepeat,
kotakku 0:b1ce54272580 798 pstrUsageACSort,
kotakku 0:b1ce54272580 799 pstrUsageACSortAscending,
kotakku 0:b1ce54272580 800 pstrUsageACSortDescending,
kotakku 0:b1ce54272580 801 pstrUsageACFilter,
kotakku 0:b1ce54272580 802 pstrUsageACSetClock,
kotakku 0:b1ce54272580 803 pstrUsageACViewClock,
kotakku 0:b1ce54272580 804 pstrUsageACSelectTimeZone,
kotakku 0:b1ce54272580 805 pstrUsageACEditTimeZone,
kotakku 0:b1ce54272580 806 pstrUsageACSetAlarm,
kotakku 0:b1ce54272580 807 pstrUsageACClearAlarm,
kotakku 0:b1ce54272580 808 pstrUsageACSnoozeAlarm,
kotakku 0:b1ce54272580 809 pstrUsageACResetAlarm,
kotakku 0:b1ce54272580 810 pstrUsageACSyncronize,
kotakku 0:b1ce54272580 811 pstrUsageACSendReceive,
kotakku 0:b1ce54272580 812 pstrUsageACSendTo,
kotakku 0:b1ce54272580 813 pstrUsageACReply,
kotakku 0:b1ce54272580 814 pstrUsageACReplyAll,
kotakku 0:b1ce54272580 815 pstrUsageACForwardMessage,
kotakku 0:b1ce54272580 816 pstrUsageACSend,
kotakku 0:b1ce54272580 817 pstrUsageACAttachFile,
kotakku 0:b1ce54272580 818 pstrUsageACUpload,
kotakku 0:b1ce54272580 819 pstrUsageACDownload,
kotakku 0:b1ce54272580 820 pstrUsageACSetBorders,
kotakku 0:b1ce54272580 821 pstrUsageACInsertRow,
kotakku 0:b1ce54272580 822 pstrUsageACInsertColumn,
kotakku 0:b1ce54272580 823 pstrUsageACInsertFile,
kotakku 0:b1ce54272580 824 pstrUsageACInsertPicture,
kotakku 0:b1ce54272580 825 pstrUsageACInsertObject,
kotakku 0:b1ce54272580 826 pstrUsageACInsertSymbol,
kotakku 0:b1ce54272580 827 pstrUsageACSaveAndClose,
kotakku 0:b1ce54272580 828 pstrUsageACRename,
kotakku 0:b1ce54272580 829 pstrUsageACMerge,
kotakku 0:b1ce54272580 830 pstrUsageACSplit,
kotakku 0:b1ce54272580 831 pstrUsageACDistributeHorizontaly,
kotakku 0:b1ce54272580 832 pstrUsageACDistributeVerticaly
kotakku 0:b1ce54272580 833 };
kotakku 0:b1ce54272580 834 const char * const ReportDescParserBase::digitTitles0[] PROGMEM = {
kotakku 0:b1ce54272580 835 pstrUsageDigitizer,
kotakku 0:b1ce54272580 836 pstrUsagePen,
kotakku 0:b1ce54272580 837 pstrUsageLightPen,
kotakku 0:b1ce54272580 838 pstrUsageTouchScreen,
kotakku 0:b1ce54272580 839 pstrUsageTouchPad,
kotakku 0:b1ce54272580 840 pstrUsageWhiteBoard,
kotakku 0:b1ce54272580 841 pstrUsageCoordinateMeasuringMachine,
kotakku 0:b1ce54272580 842 pstrUsage3DDigitizer,
kotakku 0:b1ce54272580 843 pstrUsageStereoPlotter,
kotakku 0:b1ce54272580 844 pstrUsageArticulatedArm,
kotakku 0:b1ce54272580 845 pstrUsageArmature,
kotakku 0:b1ce54272580 846 pstrUsageMultiplePointDigitizer,
kotakku 0:b1ce54272580 847 pstrUsageFreeSpaceWand
kotakku 0:b1ce54272580 848 };
kotakku 0:b1ce54272580 849 const char * const ReportDescParserBase::digitTitles1[] PROGMEM = {
kotakku 0:b1ce54272580 850 pstrUsageStylus,
kotakku 0:b1ce54272580 851 pstrUsagePuck,
kotakku 0:b1ce54272580 852 pstrUsageFinger
kotakku 0:b1ce54272580 853
kotakku 0:b1ce54272580 854 };
kotakku 0:b1ce54272580 855 const char * const ReportDescParserBase::digitTitles2[] PROGMEM = {
kotakku 0:b1ce54272580 856 pstrUsageTipPressure,
kotakku 0:b1ce54272580 857 pstrUsageBarrelPressure,
kotakku 0:b1ce54272580 858 pstrUsageInRange,
kotakku 0:b1ce54272580 859 pstrUsageTouch,
kotakku 0:b1ce54272580 860 pstrUsageUntouch,
kotakku 0:b1ce54272580 861 pstrUsageTap,
kotakku 0:b1ce54272580 862 pstrUsageQuality,
kotakku 0:b1ce54272580 863 pstrUsageDataValid,
kotakku 0:b1ce54272580 864 pstrUsageTransducerIndex,
kotakku 0:b1ce54272580 865 pstrUsageTabletFunctionKeys,
kotakku 0:b1ce54272580 866 pstrUsageProgramChangeKeys,
kotakku 0:b1ce54272580 867 pstrUsageBatteryStrength,
kotakku 0:b1ce54272580 868 pstrUsageInvert,
kotakku 0:b1ce54272580 869 pstrUsageXTilt,
kotakku 0:b1ce54272580 870 pstrUsageYTilt,
kotakku 0:b1ce54272580 871 pstrUsageAzimuth,
kotakku 0:b1ce54272580 872 pstrUsageAltitude,
kotakku 0:b1ce54272580 873 pstrUsageTwist,
kotakku 0:b1ce54272580 874 pstrUsageTipSwitch,
kotakku 0:b1ce54272580 875 pstrUsageSecondaryTipSwitch,
kotakku 0:b1ce54272580 876 pstrUsageBarrelSwitch,
kotakku 0:b1ce54272580 877 pstrUsageEraser,
kotakku 0:b1ce54272580 878 pstrUsageTabletPick
kotakku 0:b1ce54272580 879 };
kotakku 0:b1ce54272580 880 const char * const ReportDescParserBase::aplphanumTitles0[] PROGMEM = {
kotakku 0:b1ce54272580 881 pstrUsageAlphanumericDisplay,
kotakku 0:b1ce54272580 882 pstrUsageBitmappedDisplay
kotakku 0:b1ce54272580 883 };
kotakku 0:b1ce54272580 884 const char * const ReportDescParserBase::aplphanumTitles1[] PROGMEM = {
kotakku 0:b1ce54272580 885 pstrUsageDisplayAttributesReport,
kotakku 0:b1ce54272580 886 pstrUsageASCIICharacterSet,
kotakku 0:b1ce54272580 887 pstrUsageDataReadBack,
kotakku 0:b1ce54272580 888 pstrUsageFontReadBack,
kotakku 0:b1ce54272580 889 pstrUsageDisplayControlReport,
kotakku 0:b1ce54272580 890 pstrUsageClearDisplay,
kotakku 0:b1ce54272580 891 pstrUsageDisplayEnable,
kotakku 0:b1ce54272580 892 pstrUsageScreenSaverDelay,
kotakku 0:b1ce54272580 893 pstrUsageScreenSaverEnable,
kotakku 0:b1ce54272580 894 pstrUsageVerticalScroll,
kotakku 0:b1ce54272580 895 pstrUsageHorizontalScroll,
kotakku 0:b1ce54272580 896 pstrUsageCharacterReport,
kotakku 0:b1ce54272580 897 pstrUsageDisplayData,
kotakku 0:b1ce54272580 898 pstrUsageDisplayStatus,
kotakku 0:b1ce54272580 899 pstrUsageStatusNotReady,
kotakku 0:b1ce54272580 900 pstrUsageStatusReady,
kotakku 0:b1ce54272580 901 pstrUsageErrorNotALoadableCharacter,
kotakku 0:b1ce54272580 902 pstrUsageErrorFotDataCanNotBeRead,
kotakku 0:b1ce54272580 903 pstrUsageCursorPositionReport,
kotakku 0:b1ce54272580 904 pstrUsageRow,
kotakku 0:b1ce54272580 905 pstrUsageColumn,
kotakku 0:b1ce54272580 906 pstrUsageRows,
kotakku 0:b1ce54272580 907 pstrUsageColumns,
kotakku 0:b1ce54272580 908 pstrUsageCursorPixelPosition,
kotakku 0:b1ce54272580 909 pstrUsageCursorMode,
kotakku 0:b1ce54272580 910 pstrUsageCursorEnable,
kotakku 0:b1ce54272580 911 pstrUsageCursorBlink,
kotakku 0:b1ce54272580 912 pstrUsageFontReport,
kotakku 0:b1ce54272580 913 pstrUsageFontData,
kotakku 0:b1ce54272580 914 pstrUsageCharacterWidth,
kotakku 0:b1ce54272580 915 pstrUsageCharacterHeight,
kotakku 0:b1ce54272580 916 pstrUsageCharacterSpacingHorizontal,
kotakku 0:b1ce54272580 917 pstrUsageCharacterSpacingVertical,
kotakku 0:b1ce54272580 918 pstrUsageUnicodeCharset,
kotakku 0:b1ce54272580 919 pstrUsageFont7Segment,
kotakku 0:b1ce54272580 920 pstrUsage7SegmentDirectMap,
kotakku 0:b1ce54272580 921 pstrUsageFont14Segment,
kotakku 0:b1ce54272580 922 pstrUsage14SegmentDirectMap,
kotakku 0:b1ce54272580 923 pstrUsageDisplayBrightness,
kotakku 0:b1ce54272580 924 pstrUsageDisplayContrast,
kotakku 0:b1ce54272580 925 pstrUsageCharacterAttribute,
kotakku 0:b1ce54272580 926 pstrUsageAttributeReadback,
kotakku 0:b1ce54272580 927 pstrUsageAttributeData,
kotakku 0:b1ce54272580 928 pstrUsageCharAttributeEnhance,
kotakku 0:b1ce54272580 929 pstrUsageCharAttributeUnderline,
kotakku 0:b1ce54272580 930 pstrUsageCharAttributeBlink
kotakku 0:b1ce54272580 931 };
kotakku 0:b1ce54272580 932 const char * const ReportDescParserBase::aplphanumTitles2[] PROGMEM = {
kotakku 0:b1ce54272580 933 pstrUsageBitmapSizeX,
kotakku 0:b1ce54272580 934 pstrUsageBitmapSizeY,
kotakku 0:b1ce54272580 935 pstrUsagePageReserved,
kotakku 0:b1ce54272580 936 pstrUsageBitDepthFormat,
kotakku 0:b1ce54272580 937 pstrUsageDisplayOrientation,
kotakku 0:b1ce54272580 938 pstrUsagePaletteReport,
kotakku 0:b1ce54272580 939 pstrUsagePaletteDataSize,
kotakku 0:b1ce54272580 940 pstrUsagePaletteDataOffset,
kotakku 0:b1ce54272580 941 pstrUsagePaletteData,
kotakku 0:b1ce54272580 942 pstrUsageBlitReport,
kotakku 0:b1ce54272580 943 pstrUsageBlitRectangleX1,
kotakku 0:b1ce54272580 944 pstrUsageBlitRectangleY1,
kotakku 0:b1ce54272580 945 pstrUsageBlitRectangleX2,
kotakku 0:b1ce54272580 946 pstrUsageBlitRectangleY2,
kotakku 0:b1ce54272580 947 pstrUsageBlitData,
kotakku 0:b1ce54272580 948 pstrUsageSoftButton,
kotakku 0:b1ce54272580 949 pstrUsageSoftButtonID,
kotakku 0:b1ce54272580 950 pstrUsageSoftButtonSide,
kotakku 0:b1ce54272580 951 pstrUsageSoftButtonOffset1,
kotakku 0:b1ce54272580 952 pstrUsageSoftButtonOffset2,
kotakku 0:b1ce54272580 953 pstrUsageSoftButtonReport
kotakku 0:b1ce54272580 954 };
kotakku 0:b1ce54272580 955 const char * const ReportDescParserBase::medInstrTitles0[] PROGMEM = {
kotakku 0:b1ce54272580 956 pstrUsageVCRAcquisition,
kotakku 0:b1ce54272580 957 pstrUsageFreezeThaw,
kotakku 0:b1ce54272580 958 pstrUsageClipStore,
kotakku 0:b1ce54272580 959 pstrUsageUpdate,
kotakku 0:b1ce54272580 960 pstrUsageNext,
kotakku 0:b1ce54272580 961 pstrUsageSave,
kotakku 0:b1ce54272580 962 pstrUsagePrint,
kotakku 0:b1ce54272580 963 pstrUsageMicrophoneEnable
kotakku 0:b1ce54272580 964 };
kotakku 0:b1ce54272580 965 const char * const ReportDescParserBase::medInstrTitles1[] PROGMEM = {
kotakku 0:b1ce54272580 966 pstrUsageCine,
kotakku 0:b1ce54272580 967 pstrUsageTransmitPower,
kotakku 0:b1ce54272580 968 pstrUsageVolume,
kotakku 0:b1ce54272580 969 pstrUsageFocus,
kotakku 0:b1ce54272580 970 pstrUsageDepth
kotakku 0:b1ce54272580 971 };
kotakku 0:b1ce54272580 972 const char * const ReportDescParserBase::medInstrTitles2[] PROGMEM = {
kotakku 0:b1ce54272580 973 pstrUsageSoftStepPrimary,
kotakku 0:b1ce54272580 974 pstrUsageSoftStepSecondary
kotakku 0:b1ce54272580 975 };
kotakku 0:b1ce54272580 976 const char * const ReportDescParserBase::medInstrTitles3[] PROGMEM = {
kotakku 0:b1ce54272580 977 pstrUsageZoomSelect,
kotakku 0:b1ce54272580 978 pstrUsageZoomAdjust,
kotakku 0:b1ce54272580 979 pstrUsageSpectralDopplerModeSelect,
kotakku 0:b1ce54272580 980 pstrUsageSpectralDopplerModeAdjust,
kotakku 0:b1ce54272580 981 pstrUsageColorDopplerModeSelect,
kotakku 0:b1ce54272580 982 pstrUsageColorDopplerModeAdjust,
kotakku 0:b1ce54272580 983 pstrUsageMotionModeSelect,
kotakku 0:b1ce54272580 984 pstrUsageMotionModeAdjust,
kotakku 0:b1ce54272580 985 pstrUsage2DModeSelect,
kotakku 0:b1ce54272580 986 pstrUsage2DModeAdjust
kotakku 0:b1ce54272580 987 };
kotakku 0:b1ce54272580 988 const char * const ReportDescParserBase::medInstrTitles4[] PROGMEM = {
kotakku 0:b1ce54272580 989 pstrUsageSoftControlSelect,
kotakku 0:b1ce54272580 990 pstrUsageSoftControlAdjust
kotakku 0:b1ce54272580 991 };
kotakku 0:b1ce54272580 992
kotakku 0:b1ce54272580 993 void ReportDescParserBase::Parse(const uint16_t len, const uint8_t *pbuf, const uint16_t &offset __attribute__((unused))) {
kotakku 0:b1ce54272580 994 uint16_t cntdn = (uint16_t)len;
kotakku 0:b1ce54272580 995 uint8_t *p = (uint8_t*)pbuf;
kotakku 0:b1ce54272580 996
kotakku 0:b1ce54272580 997
kotakku 0:b1ce54272580 998 totalSize = 0;
kotakku 0:b1ce54272580 999
kotakku 0:b1ce54272580 1000 while(cntdn) {
kotakku 0:b1ce54272580 1001 //USB_HOST_SERIAL.println("");
kotakku 0:b1ce54272580 1002 //PrintHex<uint16_t>(offset + len - cntdn);
kotakku 0:b1ce54272580 1003 //USB_HOST_SERIAL.print(":");
kotakku 0:b1ce54272580 1004
kotakku 0:b1ce54272580 1005 ParseItem(&p, &cntdn);
kotakku 0:b1ce54272580 1006
kotakku 0:b1ce54272580 1007 //if (ParseItem(&p, &cntdn))
kotakku 0:b1ce54272580 1008 // return;
kotakku 0:b1ce54272580 1009 }
kotakku 0:b1ce54272580 1010 //USBTRACE2("Total:", totalSize);
kotakku 0:b1ce54272580 1011 }
kotakku 0:b1ce54272580 1012
kotakku 0:b1ce54272580 1013 void ReportDescParserBase::PrintValue(uint8_t *p, uint8_t len) {
kotakku 0:b1ce54272580 1014 E_Notify(PSTR("("), 0x80);
kotakku 0:b1ce54272580 1015 for(; len; p++, len--)
kotakku 0:b1ce54272580 1016 PrintHex<uint8_t > (*p, 0x80);
kotakku 0:b1ce54272580 1017 E_Notify(PSTR(")"), 0x80);
kotakku 0:b1ce54272580 1018 }
kotakku 0:b1ce54272580 1019
kotakku 0:b1ce54272580 1020 void ReportDescParserBase::PrintByteValue(uint8_t data) {
kotakku 0:b1ce54272580 1021 E_Notify(PSTR("("), 0x80);
kotakku 0:b1ce54272580 1022 PrintHex<uint8_t > (data, 0x80);
kotakku 0:b1ce54272580 1023 E_Notify(PSTR(")"), 0x80);
kotakku 0:b1ce54272580 1024 }
kotakku 0:b1ce54272580 1025
kotakku 0:b1ce54272580 1026 void ReportDescParserBase::PrintItemTitle(uint8_t prefix) {
kotakku 0:b1ce54272580 1027 switch(prefix & (TYPE_MASK | TAG_MASK)) {
kotakku 0:b1ce54272580 1028 case (TYPE_GLOBAL | TAG_GLOBAL_PUSH):
kotakku 0:b1ce54272580 1029 E_Notify(PSTR("\r\nPush"), 0x80);
kotakku 0:b1ce54272580 1030 break;
kotakku 0:b1ce54272580 1031 case (TYPE_GLOBAL | TAG_GLOBAL_POP):
kotakku 0:b1ce54272580 1032 E_Notify(PSTR("\r\nPop"), 0x80);
kotakku 0:b1ce54272580 1033 break;
kotakku 0:b1ce54272580 1034 case (TYPE_GLOBAL | TAG_GLOBAL_USAGEPAGE):
kotakku 0:b1ce54272580 1035 E_Notify(PSTR("\r\nUsage Page"), 0x80);
kotakku 0:b1ce54272580 1036 break;
kotakku 0:b1ce54272580 1037 case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMIN):
kotakku 0:b1ce54272580 1038 E_Notify(PSTR("\r\nLogical Min"), 0x80);
kotakku 0:b1ce54272580 1039 break;
kotakku 0:b1ce54272580 1040 case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMAX):
kotakku 0:b1ce54272580 1041 E_Notify(PSTR("\r\nLogical Max"), 0x80);
kotakku 0:b1ce54272580 1042 break;
kotakku 0:b1ce54272580 1043 case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMIN):
kotakku 0:b1ce54272580 1044 E_Notify(PSTR("\r\nPhysical Min"), 0x80);
kotakku 0:b1ce54272580 1045 break;
kotakku 0:b1ce54272580 1046 case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMAX):
kotakku 0:b1ce54272580 1047 E_Notify(PSTR("\r\nPhysical Max"), 0x80);
kotakku 0:b1ce54272580 1048 break;
kotakku 0:b1ce54272580 1049 case (TYPE_GLOBAL | TAG_GLOBAL_UNITEXP):
kotakku 0:b1ce54272580 1050 E_Notify(PSTR("\r\nUnit Exp"), 0x80);
kotakku 0:b1ce54272580 1051 break;
kotakku 0:b1ce54272580 1052 case (TYPE_GLOBAL | TAG_GLOBAL_UNIT):
kotakku 0:b1ce54272580 1053 E_Notify(PSTR("\r\nUnit"), 0x80);
kotakku 0:b1ce54272580 1054 break;
kotakku 0:b1ce54272580 1055 case (TYPE_GLOBAL | TAG_GLOBAL_REPORTSIZE):
kotakku 0:b1ce54272580 1056 E_Notify(PSTR("\r\nReport Size"), 0x80);
kotakku 0:b1ce54272580 1057 break;
kotakku 0:b1ce54272580 1058 case (TYPE_GLOBAL | TAG_GLOBAL_REPORTCOUNT):
kotakku 0:b1ce54272580 1059 E_Notify(PSTR("\r\nReport Count"), 0x80);
kotakku 0:b1ce54272580 1060 break;
kotakku 0:b1ce54272580 1061 case (TYPE_GLOBAL | TAG_GLOBAL_REPORTID):
kotakku 0:b1ce54272580 1062 E_Notify(PSTR("\r\nReport Id"), 0x80);
kotakku 0:b1ce54272580 1063 break;
kotakku 0:b1ce54272580 1064 case (TYPE_LOCAL | TAG_LOCAL_USAGE):
kotakku 0:b1ce54272580 1065 E_Notify(PSTR("\r\nUsage"), 0x80);
kotakku 0:b1ce54272580 1066 break;
kotakku 0:b1ce54272580 1067 case (TYPE_LOCAL | TAG_LOCAL_USAGEMIN):
kotakku 0:b1ce54272580 1068 E_Notify(PSTR("\r\nUsage Min"), 0x80);
kotakku 0:b1ce54272580 1069 break;
kotakku 0:b1ce54272580 1070 case (TYPE_LOCAL | TAG_LOCAL_USAGEMAX):
kotakku 0:b1ce54272580 1071 E_Notify(PSTR("\r\nUsage Max"), 0x80);
kotakku 0:b1ce54272580 1072 break;
kotakku 0:b1ce54272580 1073 case (TYPE_MAIN | TAG_MAIN_COLLECTION):
kotakku 0:b1ce54272580 1074 E_Notify(PSTR("\r\nCollection"), 0x80);
kotakku 0:b1ce54272580 1075 break;
kotakku 0:b1ce54272580 1076 case (TYPE_MAIN | TAG_MAIN_ENDCOLLECTION):
kotakku 0:b1ce54272580 1077 E_Notify(PSTR("\r\nEnd Collection"), 0x80);
kotakku 0:b1ce54272580 1078 break;
kotakku 0:b1ce54272580 1079 case (TYPE_MAIN | TAG_MAIN_INPUT):
kotakku 0:b1ce54272580 1080 E_Notify(PSTR("\r\nInput"), 0x80);
kotakku 0:b1ce54272580 1081 break;
kotakku 0:b1ce54272580 1082 case (TYPE_MAIN | TAG_MAIN_OUTPUT):
kotakku 0:b1ce54272580 1083 E_Notify(PSTR("\r\nOutput"), 0x80);
kotakku 0:b1ce54272580 1084 break;
kotakku 0:b1ce54272580 1085 case (TYPE_MAIN | TAG_MAIN_FEATURE):
kotakku 0:b1ce54272580 1086 E_Notify(PSTR("\r\nFeature"), 0x80);
kotakku 0:b1ce54272580 1087 break;
kotakku 0:b1ce54272580 1088 } // switch (**pp & (TYPE_MASK | TAG_MASK))
kotakku 0:b1ce54272580 1089 }
kotakku 0:b1ce54272580 1090
kotakku 0:b1ce54272580 1091 uint8_t ReportDescParserBase::ParseItem(uint8_t **pp, uint16_t *pcntdn) {
kotakku 0:b1ce54272580 1092 //uint8_t ret = enErrorSuccess;
kotakku 0:b1ce54272580 1093 //reinterpret_cast<>(varBuffer);
kotakku 0:b1ce54272580 1094 switch(itemParseState) {
kotakku 0:b1ce54272580 1095 case 0:
kotakku 0:b1ce54272580 1096 if(**pp == HID_LONG_ITEM_PREFIX)
kotakku 0:b1ce54272580 1097 USBTRACE("\r\nLONG\r\n");
kotakku 0:b1ce54272580 1098 else {
kotakku 0:b1ce54272580 1099 uint8_t size = ((**pp) & DATA_SIZE_MASK);
kotakku 0:b1ce54272580 1100
kotakku 0:b1ce54272580 1101 itemPrefix = (**pp);
kotakku 0:b1ce54272580 1102 itemSize = 1 + ((size == DATA_SIZE_4) ? 4 : size);
kotakku 0:b1ce54272580 1103
kotakku 0:b1ce54272580 1104 PrintItemTitle(itemPrefix);
kotakku 0:b1ce54272580 1105 }
kotakku 0:b1ce54272580 1106 (*pp)++;
kotakku 0:b1ce54272580 1107 (*pcntdn)--;
kotakku 0:b1ce54272580 1108 itemSize--;
kotakku 0:b1ce54272580 1109 itemParseState = 1;
kotakku 0:b1ce54272580 1110
kotakku 0:b1ce54272580 1111 if(!itemSize)
kotakku 0:b1ce54272580 1112 break;
kotakku 0:b1ce54272580 1113
kotakku 0:b1ce54272580 1114 if(!pcntdn)
kotakku 0:b1ce54272580 1115 return enErrorIncomplete;
kotakku 0:b1ce54272580 1116 case 1:
kotakku 0:b1ce54272580 1117 //USBTRACE2("\r\niSz:",itemSize);
kotakku 0:b1ce54272580 1118
kotakku 0:b1ce54272580 1119 theBuffer.valueSize = itemSize;
kotakku 0:b1ce54272580 1120 valParser.Initialize(&theBuffer);
kotakku 0:b1ce54272580 1121 itemParseState = 2;
kotakku 0:b1ce54272580 1122 case 2:
kotakku 0:b1ce54272580 1123 if(!valParser.Parse(pp, pcntdn))
kotakku 0:b1ce54272580 1124 return enErrorIncomplete;
kotakku 0:b1ce54272580 1125 itemParseState = 3;
kotakku 0:b1ce54272580 1126 case 3:
kotakku 0:b1ce54272580 1127 {
kotakku 0:b1ce54272580 1128 uint8_t data = *((uint8_t*)varBuffer);
kotakku 0:b1ce54272580 1129
kotakku 0:b1ce54272580 1130 switch(itemPrefix & (TYPE_MASK | TAG_MASK)) {
kotakku 0:b1ce54272580 1131 case (TYPE_LOCAL | TAG_LOCAL_USAGE):
kotakku 0:b1ce54272580 1132 if(pfUsage) {
kotakku 0:b1ce54272580 1133 if(theBuffer.valueSize > 1) {
kotakku 0:b1ce54272580 1134 uint16_t* ui16 = reinterpret_cast<uint16_t *>(varBuffer);
kotakku 0:b1ce54272580 1135 pfUsage(*ui16);
kotakku 0:b1ce54272580 1136 } else
kotakku 0:b1ce54272580 1137 pfUsage(data);
kotakku 0:b1ce54272580 1138 }
kotakku 0:b1ce54272580 1139 break;
kotakku 0:b1ce54272580 1140 case (TYPE_GLOBAL | TAG_GLOBAL_REPORTSIZE):
kotakku 0:b1ce54272580 1141 rptSize = data;
kotakku 0:b1ce54272580 1142 PrintByteValue(data);
kotakku 0:b1ce54272580 1143 break;
kotakku 0:b1ce54272580 1144 case (TYPE_GLOBAL | TAG_GLOBAL_REPORTCOUNT):
kotakku 0:b1ce54272580 1145 rptCount = data;
kotakku 0:b1ce54272580 1146 PrintByteValue(data);
kotakku 0:b1ce54272580 1147 break;
kotakku 0:b1ce54272580 1148 case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMIN):
kotakku 0:b1ce54272580 1149 case (TYPE_GLOBAL | TAG_GLOBAL_LOGICALMAX):
kotakku 0:b1ce54272580 1150 case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMIN):
kotakku 0:b1ce54272580 1151 case (TYPE_GLOBAL | TAG_GLOBAL_PHYSMAX):
kotakku 0:b1ce54272580 1152 case (TYPE_GLOBAL | TAG_GLOBAL_REPORTID):
kotakku 0:b1ce54272580 1153 case (TYPE_LOCAL | TAG_LOCAL_USAGEMIN):
kotakku 0:b1ce54272580 1154 case (TYPE_LOCAL | TAG_LOCAL_USAGEMAX):
kotakku 0:b1ce54272580 1155 case (TYPE_GLOBAL | TAG_GLOBAL_UNITEXP):
kotakku 0:b1ce54272580 1156 case (TYPE_GLOBAL | TAG_GLOBAL_UNIT):
kotakku 0:b1ce54272580 1157 PrintValue(varBuffer, theBuffer.valueSize);
kotakku 0:b1ce54272580 1158 break;
kotakku 0:b1ce54272580 1159 case (TYPE_GLOBAL | TAG_GLOBAL_PUSH):
kotakku 0:b1ce54272580 1160 case (TYPE_GLOBAL | TAG_GLOBAL_POP):
kotakku 0:b1ce54272580 1161 break;
kotakku 0:b1ce54272580 1162 case (TYPE_GLOBAL | TAG_GLOBAL_USAGEPAGE):
kotakku 0:b1ce54272580 1163 SetUsagePage(data);
kotakku 0:b1ce54272580 1164 PrintUsagePage(data);
kotakku 0:b1ce54272580 1165 PrintByteValue(data);
kotakku 0:b1ce54272580 1166 break;
kotakku 0:b1ce54272580 1167 case (TYPE_MAIN | TAG_MAIN_COLLECTION):
kotakku 0:b1ce54272580 1168 case (TYPE_MAIN | TAG_MAIN_ENDCOLLECTION):
kotakku 0:b1ce54272580 1169 switch(data) {
kotakku 0:b1ce54272580 1170 case 0x00:
kotakku 0:b1ce54272580 1171 E_Notify(PSTR(" Physical"), 0x80);
kotakku 0:b1ce54272580 1172 break;
kotakku 0:b1ce54272580 1173 case 0x01:
kotakku 0:b1ce54272580 1174 E_Notify(PSTR(" Application"), 0x80);
kotakku 0:b1ce54272580 1175 break;
kotakku 0:b1ce54272580 1176 case 0x02:
kotakku 0:b1ce54272580 1177 E_Notify(PSTR(" Logical"), 0x80);
kotakku 0:b1ce54272580 1178 break;
kotakku 0:b1ce54272580 1179 case 0x03:
kotakku 0:b1ce54272580 1180 E_Notify(PSTR(" Report"), 0x80);
kotakku 0:b1ce54272580 1181 break;
kotakku 0:b1ce54272580 1182 case 0x04:
kotakku 0:b1ce54272580 1183 E_Notify(PSTR(" Named Array"), 0x80);
kotakku 0:b1ce54272580 1184 break;
kotakku 0:b1ce54272580 1185 case 0x05:
kotakku 0:b1ce54272580 1186 E_Notify(PSTR(" Usage Switch"), 0x80);
kotakku 0:b1ce54272580 1187 break;
kotakku 0:b1ce54272580 1188 case 0x06:
kotakku 0:b1ce54272580 1189 E_Notify(PSTR(" Usage Modifier"), 0x80);
kotakku 0:b1ce54272580 1190 break;
kotakku 0:b1ce54272580 1191 default:
kotakku 0:b1ce54272580 1192 E_Notify(PSTR(" Vendor Defined("), 0x80);
kotakku 0:b1ce54272580 1193 PrintHex<uint8_t > (data, 0x80);
kotakku 0:b1ce54272580 1194 E_Notify(PSTR(")"), 0x80);
kotakku 0:b1ce54272580 1195 }
kotakku 0:b1ce54272580 1196 break;
kotakku 0:b1ce54272580 1197 case (TYPE_MAIN | TAG_MAIN_INPUT):
kotakku 0:b1ce54272580 1198 case (TYPE_MAIN | TAG_MAIN_OUTPUT):
kotakku 0:b1ce54272580 1199 case (TYPE_MAIN | TAG_MAIN_FEATURE):
kotakku 0:b1ce54272580 1200 totalSize += (uint16_t)rptSize * (uint16_t)rptCount;
kotakku 0:b1ce54272580 1201 rptSize = 0;
kotakku 0:b1ce54272580 1202 rptCount = 0;
kotakku 0:b1ce54272580 1203 E_Notify(PSTR("("), 0x80);
kotakku 0:b1ce54272580 1204 PrintBin<uint8_t > (data, 0x80);
kotakku 0:b1ce54272580 1205 E_Notify(PSTR(")"), 0x80);
kotakku 0:b1ce54272580 1206 break;
kotakku 0:b1ce54272580 1207 } // switch (**pp & (TYPE_MASK | TAG_MASK))
kotakku 0:b1ce54272580 1208 }
kotakku 0:b1ce54272580 1209 } // switch (itemParseState)
kotakku 0:b1ce54272580 1210 itemParseState = 0;
kotakku 0:b1ce54272580 1211 return enErrorSuccess;
kotakku 0:b1ce54272580 1212 }
kotakku 0:b1ce54272580 1213
kotakku 0:b1ce54272580 1214 ReportDescParserBase::UsagePageFunc ReportDescParserBase::usagePageFunctions[] /*PROGMEM*/ = {
kotakku 0:b1ce54272580 1215 &ReportDescParserBase::PrintGenericDesktopPageUsage,
kotakku 0:b1ce54272580 1216 &ReportDescParserBase::PrintSimulationControlsPageUsage,
kotakku 0:b1ce54272580 1217 &ReportDescParserBase::PrintVRControlsPageUsage,
kotakku 0:b1ce54272580 1218 &ReportDescParserBase::PrintSportsControlsPageUsage,
kotakku 0:b1ce54272580 1219 &ReportDescParserBase::PrintGameControlsPageUsage,
kotakku 0:b1ce54272580 1220 &ReportDescParserBase::PrintGenericDeviceControlsPageUsage,
kotakku 0:b1ce54272580 1221 NULL, // Keyboard/Keypad
kotakku 0:b1ce54272580 1222 &ReportDescParserBase::PrintLEDPageUsage,
kotakku 0:b1ce54272580 1223 &ReportDescParserBase::PrintButtonPageUsage,
kotakku 0:b1ce54272580 1224 &ReportDescParserBase::PrintOrdinalPageUsage,
kotakku 0:b1ce54272580 1225 &ReportDescParserBase::PrintTelephonyPageUsage,
kotakku 0:b1ce54272580 1226 &ReportDescParserBase::PrintConsumerPageUsage,
kotakku 0:b1ce54272580 1227 &ReportDescParserBase::PrintDigitizerPageUsage,
kotakku 0:b1ce54272580 1228 NULL, // Reserved
kotakku 0:b1ce54272580 1229 NULL, // PID
kotakku 0:b1ce54272580 1230 NULL // Unicode
kotakku 0:b1ce54272580 1231 };
kotakku 0:b1ce54272580 1232
kotakku 0:b1ce54272580 1233 void ReportDescParserBase::SetUsagePage(uint16_t page) {
kotakku 0:b1ce54272580 1234 pfUsage = NULL;
kotakku 0:b1ce54272580 1235
kotakku 0:b1ce54272580 1236 if(VALUE_BETWEEN(page, 0x00, 0x11)) {
kotakku 0:b1ce54272580 1237 pfUsage = (usagePageFunctions[page - 1]);
kotakku 0:b1ce54272580 1238
kotakku 0:b1ce54272580 1239 } else {
kotakku 0:b1ce54272580 1240 switch(page) {
kotakku 0:b1ce54272580 1241 case 0x14:
kotakku 0:b1ce54272580 1242 pfUsage = &ReportDescParserBase::PrintAlphanumDisplayPageUsage;
kotakku 0:b1ce54272580 1243 break;
kotakku 0:b1ce54272580 1244 case 0x40:
kotakku 0:b1ce54272580 1245 pfUsage = &ReportDescParserBase::PrintMedicalInstrumentPageUsage;
kotakku 0:b1ce54272580 1246 break;
kotakku 0:b1ce54272580 1247 }
kotakku 0:b1ce54272580 1248 }
kotakku 0:b1ce54272580 1249 }
kotakku 0:b1ce54272580 1250
kotakku 0:b1ce54272580 1251 void ReportDescParserBase::PrintUsagePage(uint16_t page) {
kotakku 0:b1ce54272580 1252 const char * const * w;
kotakku 0:b1ce54272580 1253 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1254
kotakku 0:b1ce54272580 1255 output_if_between(page, 0x00, 0x11, w, E_Notify, usagePageTitles0, 0x80)
kotakku 0:b1ce54272580 1256 else output_if_between(page, 0x8b, 0x92, w, E_Notify, usagePageTitles1, 0x80)
kotakku 0:b1ce54272580 1257 else if(VALUE_BETWEEN(page, 0x7f, 0x84))
kotakku 0:b1ce54272580 1258 E_Notify(pstrUsagePageMonitor, 0x80);
kotakku 0:b1ce54272580 1259 else if(VALUE_BETWEEN(page, 0x83, 0x8c))
kotakku 0:b1ce54272580 1260 E_Notify(pstrUsagePagePower, 0x80);
kotakku 0:b1ce54272580 1261 else if(page > 0xfeff /* && page <= 0xffff */)
kotakku 0:b1ce54272580 1262 E_Notify(pstrUsagePageVendorDefined, 0x80);
kotakku 0:b1ce54272580 1263 else
kotakku 0:b1ce54272580 1264 switch(page) {
kotakku 0:b1ce54272580 1265 case 0x14:
kotakku 0:b1ce54272580 1266 E_Notify(pstrUsagePageAlphaNumericDisplay, 0x80);
kotakku 0:b1ce54272580 1267 break;
kotakku 0:b1ce54272580 1268 case 0x40:
kotakku 0:b1ce54272580 1269 E_Notify(pstrUsagePageMedicalInstruments, 0x80);
kotakku 0:b1ce54272580 1270 break;
kotakku 0:b1ce54272580 1271 default:
kotakku 0:b1ce54272580 1272 E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1273 }
kotakku 0:b1ce54272580 1274 }
kotakku 0:b1ce54272580 1275
kotakku 0:b1ce54272580 1276 void ReportDescParserBase::PrintButtonPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1277 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1278 E_Notify(PSTR("Btn"), 0x80);
kotakku 0:b1ce54272580 1279 PrintHex<uint16_t > (usage, 0x80);
kotakku 0:b1ce54272580 1280 E_Notify(PSTR("\r\n"), 0x80);
kotakku 0:b1ce54272580 1281 //USB_HOST_SERIAL.print(usage, HEX);
kotakku 0:b1ce54272580 1282 }
kotakku 0:b1ce54272580 1283
kotakku 0:b1ce54272580 1284 void ReportDescParserBase::PrintOrdinalPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1285 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1286 E_Notify(PSTR("Inst"), 0x80);
kotakku 0:b1ce54272580 1287 // Sorry, HEX for now...
kotakku 0:b1ce54272580 1288 PrintHex<uint16_t > (usage, 0x80);
kotakku 0:b1ce54272580 1289 E_Notify(PSTR("\r\n"), 0x80);
kotakku 0:b1ce54272580 1290 //USB_HOST_SERIAL.print(usage, DEC);
kotakku 0:b1ce54272580 1291 }
kotakku 0:b1ce54272580 1292
kotakku 0:b1ce54272580 1293 void ReportDescParserBase::PrintGenericDesktopPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1294 const char * const * w;
kotakku 0:b1ce54272580 1295 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1296
kotakku 0:b1ce54272580 1297 output_if_between(usage, 0x00, 0x0a, w, E_Notify, genDesktopTitles0, 0x80)
kotakku 0:b1ce54272580 1298 else output_if_between(usage, 0x2f, 0x49, w, E_Notify, genDesktopTitles1, 0x80)
kotakku 0:b1ce54272580 1299 else output_if_between(usage, 0x7f, 0x94, w, E_Notify, genDesktopTitles2, 0x80)
kotakku 0:b1ce54272580 1300 else output_if_between(usage, 0x9f, 0xa9, w, E_Notify, genDesktopTitles3, 0x80)
kotakku 0:b1ce54272580 1301 else output_if_between(usage, 0xaf, 0xb8, w, E_Notify, genDesktopTitles4, 0x80)
kotakku 0:b1ce54272580 1302 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1303 }
kotakku 0:b1ce54272580 1304
kotakku 0:b1ce54272580 1305 void ReportDescParserBase::PrintSimulationControlsPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1306 const char * const * w;
kotakku 0:b1ce54272580 1307 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1308
kotakku 0:b1ce54272580 1309 output_if_between(usage, 0x00, 0x0d, w, E_Notify, simuTitles0, 0x80)
kotakku 0:b1ce54272580 1310 else output_if_between(usage, 0x1f, 0x26, w, E_Notify, simuTitles1, 0x80)
kotakku 0:b1ce54272580 1311 else output_if_between(usage, 0xaf, 0xd1, w, E_Notify, simuTitles2, 0x80)
kotakku 0:b1ce54272580 1312 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1313 }
kotakku 0:b1ce54272580 1314
kotakku 0:b1ce54272580 1315 void ReportDescParserBase::PrintVRControlsPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1316 const char * const * w;
kotakku 0:b1ce54272580 1317 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1318
kotakku 0:b1ce54272580 1319 output_if_between(usage, 0x00, 0x0b, w, E_Notify, vrTitles0, 0x80)
kotakku 0:b1ce54272580 1320 else output_if_between(usage, 0x1f, 0x22, w, E_Notify, vrTitles1, 0x80)
kotakku 0:b1ce54272580 1321 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1322 }
kotakku 0:b1ce54272580 1323
kotakku 0:b1ce54272580 1324 void ReportDescParserBase::PrintSportsControlsPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1325 const char * const * w;
kotakku 0:b1ce54272580 1326 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1327
kotakku 0:b1ce54272580 1328 output_if_between(usage, 0x00, 0x05, w, E_Notify, sportsCtrlTitles0, 0x80)
kotakku 0:b1ce54272580 1329 else output_if_between(usage, 0x2f, 0x3a, w, E_Notify, sportsCtrlTitles1, 0x80)
kotakku 0:b1ce54272580 1330 else output_if_between(usage, 0x4f, 0x64, w, E_Notify, sportsCtrlTitles2, 0x80)
kotakku 0:b1ce54272580 1331 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1332 }
kotakku 0:b1ce54272580 1333
kotakku 0:b1ce54272580 1334 void ReportDescParserBase::PrintGameControlsPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1335 const char * const * w;
kotakku 0:b1ce54272580 1336 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1337
kotakku 0:b1ce54272580 1338 output_if_between(usage, 0x00, 0x04, w, E_Notify, gameTitles0, 0x80)
kotakku 0:b1ce54272580 1339 else output_if_between(usage, 0x1f, 0x3a, w, E_Notify, gameTitles1, 0x80)
kotakku 0:b1ce54272580 1340 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1341 }
kotakku 0:b1ce54272580 1342
kotakku 0:b1ce54272580 1343 void ReportDescParserBase::PrintGenericDeviceControlsPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1344 const char * const * w;
kotakku 0:b1ce54272580 1345 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1346
kotakku 0:b1ce54272580 1347 output_if_between(usage, 0x1f, 0x27, w, E_Notify, genDevCtrlTitles, 0x80)
kotakku 0:b1ce54272580 1348 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1349 }
kotakku 0:b1ce54272580 1350
kotakku 0:b1ce54272580 1351 void ReportDescParserBase::PrintLEDPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1352 const char * const * w;
kotakku 0:b1ce54272580 1353 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1354
kotakku 0:b1ce54272580 1355 output_if_between(usage, 0x00, 0x4e, w, E_Notify, ledTitles, 0x80)
kotakku 0:b1ce54272580 1356 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1357 }
kotakku 0:b1ce54272580 1358
kotakku 0:b1ce54272580 1359 void ReportDescParserBase::PrintTelephonyPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1360 const char * const * w;
kotakku 0:b1ce54272580 1361 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1362
kotakku 0:b1ce54272580 1363 output_if_between(usage, 0x00, 0x08, w, E_Notify, telTitles0, 0x80)
kotakku 0:b1ce54272580 1364 else output_if_between(usage, 0x1f, 0x32, w, E_Notify, telTitles1, 0x80)
kotakku 0:b1ce54272580 1365 else output_if_between(usage, 0x4f, 0x54, w, E_Notify, telTitles2, 0x80)
kotakku 0:b1ce54272580 1366 else output_if_between(usage, 0x6f, 0x75, w, E_Notify, telTitles3, 0x80)
kotakku 0:b1ce54272580 1367 else output_if_between(usage, 0x8f, 0x9f, w, E_Notify, telTitles4, 0x80)
kotakku 0:b1ce54272580 1368 else output_if_between(usage, 0xaf, 0xc0, w, E_Notify, telTitles5, 0x80)
kotakku 0:b1ce54272580 1369 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1370 }
kotakku 0:b1ce54272580 1371
kotakku 0:b1ce54272580 1372 void ReportDescParserBase::PrintConsumerPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1373 const char * const * w;
kotakku 0:b1ce54272580 1374 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1375
kotakku 0:b1ce54272580 1376 output_if_between(usage, 0x00, 0x07, w, E_Notify, consTitles0, 0x80)
kotakku 0:b1ce54272580 1377 else output_if_between(usage, 0x1f, 0x23, w, E_Notify, consTitles1, 0x80)
kotakku 0:b1ce54272580 1378 else output_if_between(usage, 0x2f, 0x37, w, E_Notify, consTitles2, 0x80)
kotakku 0:b1ce54272580 1379 else output_if_between(usage, 0x3f, 0x49, w, E_Notify, consTitles3, 0x80)
kotakku 0:b1ce54272580 1380 else output_if_between(usage, 0x5f, 0x67, w, E_Notify, consTitles4, 0x80)
kotakku 0:b1ce54272580 1381 else output_if_between(usage, 0x7f, 0xa5, w, E_Notify, consTitles5, 0x80)
kotakku 0:b1ce54272580 1382 else output_if_between(usage, 0xaf, 0xcf, w, E_Notify, consTitles6, 0x80)
kotakku 0:b1ce54272580 1383 else output_if_between(usage, 0xdf, 0xeb, w, E_Notify, consTitles7, 0x80)
kotakku 0:b1ce54272580 1384 else output_if_between(usage, 0xef, 0xf6, w, E_Notify, consTitles8, 0x80)
kotakku 0:b1ce54272580 1385 else output_if_between(usage, 0xff, 0x10e, w, E_Notify, consTitles9, 0x80)
kotakku 0:b1ce54272580 1386 else output_if_between(usage, 0x14f, 0x156, w, E_Notify, consTitlesA, 0x80)
kotakku 0:b1ce54272580 1387 else output_if_between(usage, 0x15f, 0x16b, w, E_Notify, consTitlesB, 0x80)
kotakku 0:b1ce54272580 1388 else output_if_between(usage, 0x16f, 0x175, w, E_Notify, consTitlesC, 0x80)
kotakku 0:b1ce54272580 1389 else output_if_between(usage, 0x17f, 0x1c8, w, E_Notify, consTitlesD, 0x80)
kotakku 0:b1ce54272580 1390 else output_if_between(usage, 0x1ff, 0x29d, w, E_Notify, consTitlesE, 0x80)
kotakku 0:b1ce54272580 1391 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1392 }
kotakku 0:b1ce54272580 1393
kotakku 0:b1ce54272580 1394 void ReportDescParserBase::PrintDigitizerPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1395 const char * const * w;
kotakku 0:b1ce54272580 1396 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1397
kotakku 0:b1ce54272580 1398 output_if_between(usage, 0x00, 0x0e, w, E_Notify, digitTitles0, 0x80)
kotakku 0:b1ce54272580 1399 else output_if_between(usage, 0x1f, 0x23, w, E_Notify, digitTitles1, 0x80)
kotakku 0:b1ce54272580 1400 else output_if_between(usage, 0x2f, 0x47, w, E_Notify, digitTitles2, 0x80)
kotakku 0:b1ce54272580 1401 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1402 }
kotakku 0:b1ce54272580 1403
kotakku 0:b1ce54272580 1404 void ReportDescParserBase::PrintAlphanumDisplayPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1405 const char * const * w;
kotakku 0:b1ce54272580 1406 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1407
kotakku 0:b1ce54272580 1408 output_if_between(usage, 0x00, 0x03, w, E_Notify, aplphanumTitles0, 0x80)
kotakku 0:b1ce54272580 1409 else output_if_between(usage, 0x1f, 0x4e, w, E_Notify, aplphanumTitles1, 0x80)
kotakku 0:b1ce54272580 1410 else output_if_between(usage, 0x7f, 0x96, w, E_Notify, digitTitles2, 0x80)
kotakku 0:b1ce54272580 1411 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1412 }
kotakku 0:b1ce54272580 1413
kotakku 0:b1ce54272580 1414 void ReportDescParserBase::PrintMedicalInstrumentPageUsage(uint16_t usage) {
kotakku 0:b1ce54272580 1415 const char * const * w;
kotakku 0:b1ce54272580 1416 E_Notify(pstrSpace, 0x80);
kotakku 0:b1ce54272580 1417
kotakku 0:b1ce54272580 1418 if(usage == 1) E_Notify(pstrUsageMedicalUltrasound, 0x80);
kotakku 0:b1ce54272580 1419 else if(usage == 0x70)
kotakku 0:b1ce54272580 1420 E_Notify(pstrUsageDepthGainCompensation, 0x80);
kotakku 0:b1ce54272580 1421 else output_if_between(usage, 0x1f, 0x28, w, E_Notify, medInstrTitles0, 0x80)
kotakku 0:b1ce54272580 1422 else output_if_between(usage, 0x3f, 0x45, w, E_Notify, medInstrTitles1, 0x80)
kotakku 0:b1ce54272580 1423 else output_if_between(usage, 0x5f, 0x62, w, E_Notify, medInstrTitles2, 0x80)
kotakku 0:b1ce54272580 1424 else output_if_between(usage, 0x7f, 0x8a, w, E_Notify, medInstrTitles3, 0x80)
kotakku 0:b1ce54272580 1425 else output_if_between(usage, 0x9f, 0xa2, w, E_Notify, medInstrTitles4, 0x80)
kotakku 0:b1ce54272580 1426 else E_Notify(pstrUsagePageUndefined, 0x80);
kotakku 0:b1ce54272580 1427 }
kotakku 0:b1ce54272580 1428
kotakku 0:b1ce54272580 1429 uint8_t ReportDescParser2::ParseItem(uint8_t **pp, uint16_t *pcntdn) {
kotakku 0:b1ce54272580 1430 //uint8_t ret = enErrorSuccess;
kotakku 0:b1ce54272580 1431
kotakku 0:b1ce54272580 1432 switch(itemParseState) {
kotakku 0:b1ce54272580 1433 case 0:
kotakku 0:b1ce54272580 1434 if(**pp == HID_LONG_ITEM_PREFIX)
kotakku 0:b1ce54272580 1435 USBTRACE("\r\nLONG\r\n");
kotakku 0:b1ce54272580 1436 else {
kotakku 0:b1ce54272580 1437 uint8_t size = ((**pp) & DATA_SIZE_MASK);
kotakku 0:b1ce54272580 1438 itemPrefix = (**pp);
kotakku 0:b1ce54272580 1439 itemSize = 1 + ((size == DATA_SIZE_4) ? 4 : size);
kotakku 0:b1ce54272580 1440 }
kotakku 0:b1ce54272580 1441 (*pp)++;
kotakku 0:b1ce54272580 1442 (*pcntdn)--;
kotakku 0:b1ce54272580 1443 itemSize--;
kotakku 0:b1ce54272580 1444 itemParseState = 1;
kotakku 0:b1ce54272580 1445
kotakku 0:b1ce54272580 1446 if(!itemSize)
kotakku 0:b1ce54272580 1447 break;
kotakku 0:b1ce54272580 1448
kotakku 0:b1ce54272580 1449 if(!pcntdn)
kotakku 0:b1ce54272580 1450 return enErrorIncomplete;
kotakku 0:b1ce54272580 1451 case 1:
kotakku 0:b1ce54272580 1452 theBuffer.valueSize = itemSize;
kotakku 0:b1ce54272580 1453 valParser.Initialize(&theBuffer);
kotakku 0:b1ce54272580 1454 itemParseState = 2;
kotakku 0:b1ce54272580 1455 case 2:
kotakku 0:b1ce54272580 1456 if(!valParser.Parse(pp, pcntdn))
kotakku 0:b1ce54272580 1457 return enErrorIncomplete;
kotakku 0:b1ce54272580 1458 itemParseState = 3;
kotakku 0:b1ce54272580 1459 case 3:
kotakku 0:b1ce54272580 1460 {
kotakku 0:b1ce54272580 1461 uint8_t data = *((uint8_t*)varBuffer);
kotakku 0:b1ce54272580 1462
kotakku 0:b1ce54272580 1463 switch(itemPrefix & (TYPE_MASK | TAG_MASK)) {
kotakku 0:b1ce54272580 1464 case (TYPE_LOCAL | TAG_LOCAL_USAGE):
kotakku 0:b1ce54272580 1465 if(pfUsage) {
kotakku 0:b1ce54272580 1466 if(theBuffer.valueSize > 1) {
kotakku 0:b1ce54272580 1467 uint16_t* ui16 = reinterpret_cast<uint16_t *>(varBuffer);
kotakku 0:b1ce54272580 1468 pfUsage(*ui16);
kotakku 0:b1ce54272580 1469 } else
kotakku 0:b1ce54272580 1470 pfUsage(data);
kotakku 0:b1ce54272580 1471 }
kotakku 0:b1ce54272580 1472 break;
kotakku 0:b1ce54272580 1473 case (TYPE_GLOBAL | TAG_GLOBAL_REPORTSIZE):
kotakku 0:b1ce54272580 1474 rptSize = data;
kotakku 0:b1ce54272580 1475 break;
kotakku 0:b1ce54272580 1476 case (TYPE_GLOBAL | TAG_GLOBAL_REPORTCOUNT):
kotakku 0:b1ce54272580 1477 rptCount = data;
kotakku 0:b1ce54272580 1478 break;
kotakku 0:b1ce54272580 1479 case (TYPE_GLOBAL | TAG_GLOBAL_REPORTID):
kotakku 0:b1ce54272580 1480 rptId = data;
kotakku 0:b1ce54272580 1481 break;
kotakku 0:b1ce54272580 1482 case (TYPE_LOCAL | TAG_LOCAL_USAGEMIN):
kotakku 0:b1ce54272580 1483 useMin = data;
kotakku 0:b1ce54272580 1484 break;
kotakku 0:b1ce54272580 1485 case (TYPE_LOCAL | TAG_LOCAL_USAGEMAX):
kotakku 0:b1ce54272580 1486 useMax = data;
kotakku 0:b1ce54272580 1487 break;
kotakku 0:b1ce54272580 1488 case (TYPE_GLOBAL | TAG_GLOBAL_USAGEPAGE):
kotakku 0:b1ce54272580 1489 SetUsagePage(data);
kotakku 0:b1ce54272580 1490 break;
kotakku 0:b1ce54272580 1491 case (TYPE_MAIN | TAG_MAIN_OUTPUT):
kotakku 0:b1ce54272580 1492 case (TYPE_MAIN | TAG_MAIN_FEATURE):
kotakku 0:b1ce54272580 1493 rptSize = 0;
kotakku 0:b1ce54272580 1494 rptCount = 0;
kotakku 0:b1ce54272580 1495 useMin = 0;
kotakku 0:b1ce54272580 1496 useMax = 0;
kotakku 0:b1ce54272580 1497 break;
kotakku 0:b1ce54272580 1498 case (TYPE_MAIN | TAG_MAIN_INPUT):
kotakku 0:b1ce54272580 1499 OnInputItem(data);
kotakku 0:b1ce54272580 1500
kotakku 0:b1ce54272580 1501 totalSize += (uint16_t)rptSize * (uint16_t)rptCount;
kotakku 0:b1ce54272580 1502
kotakku 0:b1ce54272580 1503 rptSize = 0;
kotakku 0:b1ce54272580 1504 rptCount = 0;
kotakku 0:b1ce54272580 1505 useMin = 0;
kotakku 0:b1ce54272580 1506 useMax = 0;
kotakku 0:b1ce54272580 1507 break;
kotakku 0:b1ce54272580 1508 } // switch (**pp & (TYPE_MASK | TAG_MASK))
kotakku 0:b1ce54272580 1509 }
kotakku 0:b1ce54272580 1510 } // switch (itemParseState)
kotakku 0:b1ce54272580 1511 itemParseState = 0;
kotakku 0:b1ce54272580 1512 return enErrorSuccess;
kotakku 0:b1ce54272580 1513 }
kotakku 0:b1ce54272580 1514
kotakku 0:b1ce54272580 1515 void ReportDescParser2::OnInputItem(uint8_t itm) {
kotakku 0:b1ce54272580 1516 uint8_t byte_offset = (totalSize >> 3); // calculate offset to the next unhandled byte i = (int)(totalCount / 8);
kotakku 0:b1ce54272580 1517 uint32_t tmp = (byte_offset << 3);
kotakku 0:b1ce54272580 1518 uint8_t bit_offset = totalSize - tmp; // number of bits in the current byte already handled
kotakku 0:b1ce54272580 1519 uint8_t *p = pBuf + byte_offset; // current byte pointer
kotakku 0:b1ce54272580 1520
kotakku 0:b1ce54272580 1521 if(bit_offset)
kotakku 0:b1ce54272580 1522 *p >>= bit_offset;
kotakku 0:b1ce54272580 1523
kotakku 0:b1ce54272580 1524 uint8_t usage = useMin;
kotakku 0:b1ce54272580 1525
kotakku 0:b1ce54272580 1526 bool print_usemin_usemax = ((useMin < useMax) && ((itm & 3) == 2) && pfUsage) ? true : false;
kotakku 0:b1ce54272580 1527
kotakku 0:b1ce54272580 1528 uint8_t bits_of_byte = 8;
kotakku 0:b1ce54272580 1529
kotakku 0:b1ce54272580 1530 // for each field in field array defined by rptCount
kotakku 0:b1ce54272580 1531 for(uint8_t field = 0; field < rptCount; field++, usage++) {
kotakku 0:b1ce54272580 1532
kotakku 0:b1ce54272580 1533 union {
kotakku 0:b1ce54272580 1534 uint8_t bResult[4];
kotakku 0:b1ce54272580 1535 uint16_t wResult[2];
kotakku 0:b1ce54272580 1536 uint32_t dwResult;
kotakku 0:b1ce54272580 1537 } result;
kotakku 0:b1ce54272580 1538
kotakku 0:b1ce54272580 1539 result.dwResult = 0;
kotakku 0:b1ce54272580 1540 uint8_t mask = 0;
kotakku 0:b1ce54272580 1541
kotakku 0:b1ce54272580 1542 if(print_usemin_usemax)
kotakku 0:b1ce54272580 1543 pfUsage(usage);
kotakku 0:b1ce54272580 1544
kotakku 0:b1ce54272580 1545 // bits_left - number of bits in the field(array of fields, depending on Report Count) left to process
kotakku 0:b1ce54272580 1546 // bits_of_byte - number of bits in current byte left to process
kotakku 0:b1ce54272580 1547 // bits_to_copy - number of bits to copy to result buffer
kotakku 0:b1ce54272580 1548
kotakku 0:b1ce54272580 1549 // for each bit in a field
kotakku 0:b1ce54272580 1550 for(uint8_t bits_left = rptSize, bits_to_copy = 0; bits_left;
kotakku 0:b1ce54272580 1551 bits_left -= bits_to_copy) {
kotakku 0:b1ce54272580 1552 bits_to_copy = (bits_left > bits_of_byte) ? bits_of_byte : bits_left;
kotakku 0:b1ce54272580 1553
kotakku 0:b1ce54272580 1554 result.dwResult <<= bits_to_copy; // Result buffer is shifted by the number of bits to be copied into it
kotakku 0:b1ce54272580 1555
kotakku 0:b1ce54272580 1556 uint8_t val = *p;
kotakku 0:b1ce54272580 1557
kotakku 0:b1ce54272580 1558 val >>= (8 - bits_of_byte); // Shift by the number of bits already processed
kotakku 0:b1ce54272580 1559
kotakku 0:b1ce54272580 1560 mask = 0;
kotakku 0:b1ce54272580 1561
kotakku 0:b1ce54272580 1562 for(uint8_t j = bits_to_copy; j; j--) {
kotakku 0:b1ce54272580 1563 mask <<= 1;
kotakku 0:b1ce54272580 1564 mask |= 1;
kotakku 0:b1ce54272580 1565 }
kotakku 0:b1ce54272580 1566
kotakku 0:b1ce54272580 1567 result.bResult[0] = (result.bResult[0] | (val & mask));
kotakku 0:b1ce54272580 1568
kotakku 0:b1ce54272580 1569 bits_of_byte -= bits_to_copy;
kotakku 0:b1ce54272580 1570
kotakku 0:b1ce54272580 1571 if(bits_of_byte < 1) {
kotakku 0:b1ce54272580 1572 bits_of_byte = 8;
kotakku 0:b1ce54272580 1573 p++;
kotakku 0:b1ce54272580 1574 }
kotakku 0:b1ce54272580 1575 }
kotakku 0:b1ce54272580 1576 PrintByteValue(result.dwResult);
kotakku 0:b1ce54272580 1577 }
kotakku 0:b1ce54272580 1578 E_Notify(PSTR("\r\n"), 0x80);
kotakku 0:b1ce54272580 1579 }
kotakku 0:b1ce54272580 1580
kotakku 0:b1ce54272580 1581 void UniversalReportParser::Parse(USBHID *hid, bool is_rpt_id __attribute__((unused)), uint8_t len, uint8_t *buf) {
kotakku 0:b1ce54272580 1582 ReportDescParser2 prs(len, buf);
kotakku 0:b1ce54272580 1583
kotakku 0:b1ce54272580 1584 uint8_t ret = hid->GetReportDescr(0, &prs);
kotakku 0:b1ce54272580 1585
kotakku 0:b1ce54272580 1586 if(ret)
kotakku 0:b1ce54272580 1587 ErrorMessage<uint8_t > (PSTR("GetReportDescr-2"), ret);
kotakku 0:b1ce54272580 1588 }
kotakku 0:b1ce54272580 1589