# HG changeset patch # User sl # Date 1419011798 -3600 # Node ID dab63af931a33b95be5ba5f907bf2806be557c3a # Parent ddfd2ddf10e1d8d0df0264990de1804fa089a6d0 Generating a few more usage tables. diff -r ddfd2ddf10e1 -r dab63af931a3 HidUsageTableGameControls.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HidUsageTableGameControls.txt Fri Dec 19 18:56:38 2014 +0100 @@ -0,0 +1,31 @@ +00 Undefined +01 3D Game Controller CA 8.1 +02 Pinball Device CA 8.2 +03 Gun Device CA 8.3 +04-1F Reserved +20 Point of View CP 8.1 +21 Turn Right/Left DV 8.1 +22 Pitch Forward/Backward DV 8.1 +23 Roll Right/Left DV 8.1 +24 Move Right/Left DV 8.1 +25 Move Forward/Backward DV 8.1 +26 Move Up/Down DV 8.1 +27 Lean Right/Left DV 8.1 +28 Lean Forward/Backward DV 8.1 +29 Height of POV DV 8.1 +2A Flipper MC 8.2 +2B Secondary Flipper MC 8.2 +2C Bump MC 8.2 +2D New Game OSC 8.2 +2E Shoot Ball OSC 8.2 +2F Player OSC 8.2 +30 Gun Bolt OOC 8.3 +31 Gun Clip OOC 8.3 +32 Gun Selector NAry 8.3 +33 Gun Single Shot Sel 8.3 +34 Gun Burst Sel 8.3 +35 Gun Automatic Sel 8.3 +36 Gun Safety OOC 8.3 +37 Gamepad Fire/Jump CL 8.4.1 +39 Gamepad Trigger CL 8.4.1 +3A-FFFF Reserved \ No newline at end of file diff -r ddfd2ddf10e1 -r dab63af931a3 HidUsageTableGenericDesktop.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HidUsageTableGenericDesktop.txt Fri Dec 19 18:56:38 2014 +0100 @@ -0,0 +1,75 @@ +00 Undefined +01 Pointer CP 4.1 +02 Mouse CA 4.1 03 Reserved +04 Joystick CA 4.1 +05 Game Pad CA 4.1 +06 Keyboard CA 4.1 +07 Keypad CA 4.1 +08 Multi-axis Controller CA 4.1 +09 Tablet PC System Controls CA 4.1 +0A-2F Reserved +30 X DV 4.2 +31 Y DV 4.2 +32 Z DV 4.2 +33 Rx DV 4.2 +34 Ry DV 4.2 +35 Rz DV 4.2 +36 Slider DV 4.3 +37 Dial DV 4.3 +38 Wheel DV 4.3 +39 Hat switch DV 4.3 +3A Counted Buffer CL 4.6 +3B Byte Count DV 4.6 +3C Motion Wakeup OSC 4.3 +3D Start OOC 4.3 +3E Select OOC 4.3 3F Reserved +40 Vx DV 4.3.1 +41 Vy DV 4.3.1 +42 Vz DV 4.3.1 +43 Vbrx DV 4.3.1 +44 Vbry DV 4.3.1 +45 Vbrz DV 4.3.1 +46 Vno DV 4.3.1 +47 Feature Notification DV,DF 4.8 +48 Resolution Multiplier DV +49-7F Reserved +80 System Control CA 4.5 +81 System Power Down OSC 4.5 +82 System Sleep OSC 4.5.1 +83 System Wake Up OSC 4.5.1 +84 System Context Menu OSC 4.5 +85 System Main Menu OSC 4.5 +86 System App Menu OSC 4.5 +87 System Menu Help OSC 4.5 +88 System Menu Exit OSC 4.5 +89 System Menu Select OSC 4.5 +8A System Menu Right RTC 4.5 +8B System Menu Left RTC 4.5 +8C System Menu Up RTC 4.5 +8D System Menu Down RTC 4.5 +8E System Cold Restart OSC 4.5.1 +8F System Warm Restart OSC 4.5.1 +90 D-pad Up OOC 4.7 +91 D-pad Down OOC 4.7 +92 D-pad Right OOC 4.7 +93 D-pad Left OOC 4.7 +94-9F Reserved +A0 System Dock OSC 4.5.1 +A1 System Undock OSC 4.5.1 +A2 System Setup OSC 4.5.1 +A3 System Break OSC 4.9 +A4 System Debugger Break OSC 4.9 +A5 Application Break OSC 4.9 +A6 Application Debugger Break OSC 4.9 +A7 System Speaker Mute OSC 4.5.1 +A8 System Hibernate OSC 4.5.1 +A9-AF Reserved +B0 System Display Invert OSC 4.10 +B1 System Display Internal OSC 4.10 +B2 System Display External OSC 4.10 +B3 System Display Both OSC 4.10 +B4 System Display Dual OSC 4.10 +B5 System Display Toggle Int/Ext OSC 4.10 +B6 System Display Swap Primary/Secondary OSC 4.10 +B7 System Display LCD Autoscale OSC 4.10 +B8-FFFF Reserved \ No newline at end of file diff -r ddfd2ddf10e1 -r dab63af931a3 HidUsageTableSimulationControls.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HidUsageTableSimulationControls.txt Fri Dec 19 18:56:38 2014 +0100 @@ -0,0 +1,55 @@ +00 Undefined +01 Flight Simulation Device CA 5.2 +02 Automobile Simulation Device CA 5.3 +03 Tank Simulation Device CA 5.4 +04 Spaceship Simulation Device CA 5.2 +05 Submarine Simulation Device CA 5.5 +06 Sailing Simulation Device CA 5.5 +07 Motorcycle Simulation Device CA 5.6 +08 Sports Simulation Device CA 5.1 +09 Airplane Simulation Device CA 5.2 +0A Helicopter Simulation Device CA 5.2 +0B Magic Carpet Simulation Device CA 5.7 +0C Bicycle Simulation Device CA 5.6 +0D – 1F Reserved +20 Flight Control Stick CA 5.2 +21 Flight Stick CA 5.2 +22 Cyclic Control CP 5.2 +23 Cyclic Trim CP 5.2 +24 Flight Yoke CA 5.2 +25 Track Control CP 5.4 +26 –AF Reserved +B0 Aileron DV 5.2 +B1 Aileron Trim DV 5.2 +B2 Anti-Torque Control DV 5.2 +B3 Autopilot Enable OOC 5.2 +B4 Chaff Release OSC 5.2 +B5 Collective Control DV 5.2 +B6 Dive Brake DV 5.2 +B7 Electronic Countermeasures OOC 5.2 +B8 Elevator DV 5.2 +B9 Elevator Trim DV 5.2 +BA Rudder DV 5.2 +BB Throttle DV 5.2 +BC Flight Communications OOC 5.2 +BD Flare Release OSC 5.2 +BE Landing Gear OOC 5.2 +BF Toe Brake DV 5.2 +C0 Trigger MC 5.2 +C1 Weapons Arm OOC 5.2 +C2 Weapons Select OSC 5.2 +C3 Wing Flaps DV 5.2 +C4 Accelerator DV 5.3 +C5 Brake DV 5.3 +C6 Clutch DV 5.3 +C7 Shifter DV 5.3 +C8 Steering DV 5.3 +C9 Turret Direction DV 5.4 +CA Barrel Elevation DV 5.4 +CB Dive Plane DV 5.5 +CC Ballast DV 5.5 +CD Bicycle Crank DV 5.6 +CE Handle Bars DV 5.6 +CF Front Brake DV 5.6 +D0 Rear Brake DV 5.6 +D1-FFFF Reserved \ No newline at end of file diff -r ddfd2ddf10e1 -r dab63af931a3 HidUsageTableTelephonyDevice.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HidUsageTableTelephonyDevice.txt Fri Dec 19 18:56:38 2014 +0100 @@ -0,0 +1,72 @@ +00 Unassigned +01 Phone CA 14.1 +02 Answering Machine CA 14.1 +03 Message Controls CL 14.1 +04 Handset CL 14.1 +05 Headset CL 14.1 +06 Telephony Key Pad NAry 14.2 +07 Programmable Button NAry 14.2 +08-1F Reserved +20 Hook Switch OOC 14.3 +21 Flash MC 14.3 +22 Feature OSC 14.3 +23 Hold OOC 14.3 +24 Redial OSC 14.3 +25 Transfer OSC 14.3 +26 Drop OSC 14.3 +27 Park OOC 14.3 +28 Forward Calls OOC 14.3 +29 Alternate Function MC 14.3 +2A Line OSC, NAry 14.3 +2B Speaker Phone OOC 14.3 +2C Conference OOC 14.3 +2D Ring Enable OOC 14.3 +2E Ring Select OSC 14.3 +2F Phone Mute OOC 14.3 +30 Caller ID MC 14.3 +31 Send OOC 14.3 +32-4F Reserved +50 Speed Dial OSC 14.4 +51 Store Number OSC 14.4 +52 Recall Number OSC 14.4 +53 Phone Directory OOC 14.4 +54-6F Reserved +70 Voice Mail OOC 14.5 +71 Screen Calls OOC 14.5 +72 Do Not Disturb OOC 14.5 +73 Message OSC 14.5 +74 Answer On/Off OOC 14.5 +75-8F Reserved +90 Inside Dial Tone MC 14.6 +91 Outside Dial Tone MC 14.6 +92 Inside Ring Tone MC 14.6 +93 Outside Ring Tone MC 14.6 +94 Priority Ring Tone MC 14.6 +95 Inside Ringback MC 14.6 +96 Priority Ringback MC 14.6 +97 Line Busy Tone MC 14.6 +98 Reorder Tone MC 14.6 +99 Call Waiting Tone MC 14.6 +9A Confirmation Tone 1 MC 14.6 +9B Confirmation Tone 2 MC 14.6 +9C Tones Off OOC 14.6 +9D Outside Ringback MC 14.6 +9E Ringer OOC 14.6 +9E-AF Reserved +B0 Phone Key 0 Sel 14.2 +B1 Phone Key 1 Sel 14.2 +B2 Phone Key 2 Sel 14.2 +B3 Phone Key 3 Sel 14.2 +B4 Phone Key 4 Sel 14.2 +B5 Phone Key 5 Sel 14.2 +B6 Phone Key 6 Sel 14.2 +B7 Phone Key 7 Sel 14.2 +B8 Phone Key 8 Sel 14.2 +B9 Phone Key 9 Sel 14.2 +BA Phone Key Star Sel 14.2 +BB Phone Key Pound Sel 14.2 +BC Phone Key A Sel 14.2 +BD Phone Key B Sel 14.2 +BE Phone Key C Sel 14.2 +BF Phone Key D Sel 14.2 +C0-FFFF Reserved \ No newline at end of file diff -r ddfd2ddf10e1 -r dab63af931a3 HidUsageTables.cs --- a/HidUsageTables.cs Fri Dec 19 18:05:53 2014 +0100 +++ b/HidUsageTables.cs Fri Dec 19 18:56:38 2014 +0100 @@ -612,5 +612,246 @@ AppCtrlSelectSentence = 0x273, AppCtrlDistributeVertically = 0x29C } + + /// + /// + /// + enum GenericDesktop : ushort + { + Null = 0x00, + Pointer = 0x01, + Mouse = 0x02, + Joystick = 0x04, + GamePad = 0x05, + Keyboard = 0x06, + Keypad = 0x07, + MultiAxisController = 0x08, + TabletPcSystemControls = 0x09, + X = 0x30, + Y = 0x31, + Z = 0x32, + Rx = 0x33, + Ry = 0x34, + Rz = 0x35, + Slider = 0x36, + Dial = 0x37, + Wheel = 0x38, + HatSwitch = 0x39, + CountedBuffer = 0x3A, + ByteCount = 0x3B, + MotionWakeup = 0x3C, + Start = 0x3D, + Select = 0x3E, + Vx = 0x40, + Vy = 0x41, + Vz = 0x42, + Vbrx = 0x43, + Vbry = 0x44, + Vbrz = 0x45, + Vno = 0x46, + SystemControl = 0x80, + SystemPowerDown = 0x81, + SystemSleep = 0x82, + SystemWakeUp = 0x83, + SystemContextMenu = 0x84, + SystemMainMenu = 0x85, + SystemAppMenu = 0x86, + SystemMenuHelp = 0x87, + SystemMenuExit = 0x88, + SystemMenuSelect = 0x89, + SystemMenuRight = 0x8A, + SystemMenuLeft = 0x8B, + SystemMenuUp = 0x8C, + SystemMenuDown = 0x8D, + SystemColdRestart = 0x8E, + SystemWarmRestart = 0x8F, + DPadUp = 0x90, + DPadDown = 0x91, + DPadRight = 0x92, + DPadLeft = 0x93, + SystemDock = 0xA0, + SystemUndock = 0xA1, + SystemSetup = 0xA2, + SystemBreak = 0xA3, + SystemDebuggerBreak = 0xA4, + ApplicationBreak = 0xA5, + ApplicationDebuggerBreak = 0xA6, + SystemSpeakerMute = 0xA7, + SystemHibernate = 0xA8, + SystemDisplayInvert = 0xB0, + SystemDisplayInternal = 0xB1, + SystemDisplayExternal = 0xB2, + SystemDisplayBoth = 0xB3, + SystemDisplayDual = 0xB4, + SystemDisplayToggleIntExt = 0xB5, + SystemDisplaySwapPrimarySecondary = 0xB6, + SystemDisplayLcdAutoscale = 0xB7 + } + + /// + /// + /// + enum SimulationControl : ushort + { + FlightSimulationDevice = 0x01, + AutomobileSimulationDevice = 0x02, + TankSimulationDevice = 0x03, + SpaceshipSimulationDevice = 0x04, + SubmarineSimulationDevice = 0x05, + SailingSimulationDevice = 0x06, + MotorcycleSimulationDevice = 0x07, + SportsSimulationDevice = 0x08, + AirplaneSimulationDevice = 0x09, + HelicopterSimulationDevice = 0x0A, + MagicCarpetSimulationDevice = 0x0B, + BicycleSimulationDevice = 0x0C, + FlightControlStick = 0x20, + FlightStick = 0x21, + CyclicControl = 0x22, + CyclicTrim = 0x23, + FlightYoke = 0x24, + TrackControl = 0x25, + Aileron = 0xB0, + AileronTrim = 0xB1, + AntiTorqueControl = 0xB2, + AutopilotEnable = 0xB3, + ChaffRelease = 0xB4, + CollectiveControl = 0xB5, + DiveBrake = 0xB6, + ElectronicCountermeasures = 0xB7, + Elevator = 0xB8, + ElevatorTrim = 0xB9, + Rudder = 0xBA, + Throttle = 0xBB, + FlightCommunications = 0xBC, + FlareRelease = 0xBD, + LandingGear = 0xBE, + ToeBrake = 0xBF, + Trigger = 0xC0, + WeaponsArm = 0xC1, + WeaponsSelect = 0xC2, + WingFlaps = 0xC3, + Accelerator = 0xC4, + Brake = 0xC5, + Clutch = 0xC6, + Shifter = 0xC7, + Steering = 0xC8, + TurretDirection = 0xC9, + BarrelElevation = 0xCA, + DivePlane = 0xCB, + Ballast = 0xCC, + BicycleCrank = 0xCD, + HandleBars = 0xCE, + FrontBrake = 0xCF, + RearBrake = 0xD0 + } + + /// + /// + /// + enum GameControl : ushort + { + GameController3D = 0x01, + PinballDevice = 0x02, + GunDevice = 0x03, + PointOfView = 0x20, + TurnRightLeft = 0x21, + PitchForwardBackward = 0x22, + RollRightLeft = 0x23, + MoveRightLeft = 0x24, + MoveForwardBackward = 0x25, + MoveUpDown = 0x26, + LeanRightLeft = 0x27, + LeanForwardBackward = 0x28, + HeightOfPov = 0x29, + Flipper = 0x2A, + SecondaryFlipper = 0x2B, + Bump = 0x2C, + NewGame = 0x2D, + ShootBall = 0x2E, + Player = 0x2F, + GunBolt = 0x30, + GunClip = 0x31, + GunSelector = 0x32, + GunSingleShot = 0x33, + GunBurst = 0x34, + GunAutomatic = 0x35, + GunSafety = 0x36, + GamepadFireJump = 0x37, + GamepadTrigger = 0x39 + } + + /// + /// + /// + enum TelephonyDevice : ushort + { + Phone = 0x01, + AnsweringMachine = 0x02, + MessageControls = 0x03, + Handset = 0x04, + Headset = 0x05, + TelephonyKeyPad = 0x06, + ProgrammableButton = 0x07, + HookSwitch = 0x20, + Flash = 0x21, + Feature = 0x22, + Hold = 0x23, + Redial = 0x24, + Transfer = 0x25, + Drop = 0x26, + Park = 0x27, + ForwardCalls = 0x28, + AlternateFunction = 0x29, + Line = 0x2A, + SpeakerPhone = 0x2B, + Conference = 0x2C, + RingEnable = 0x2D, + RingSelect = 0x2E, + PhoneMute = 0x2F, + CallerId = 0x30, + Send = 0x31, + SpeedDial = 0x50, + StoreNumber = 0x51, + RecallNumber = 0x52, + PhoneDirectory = 0x53, + VoiceMail = 0x70, + ScreenCalls = 0x71, + DoNotDisturb = 0x72, + Message = 0x73, + AnswerOnOff = 0x74, + InsideDialTone = 0x90, + OutsideDialTone = 0x91, + InsideRingTone = 0x92, + OutsideRingTone = 0x93, + PriorityRingTone = 0x94, + InsideRingback = 0x95, + PriorityRingback = 0x96, + LineBusyTone = 0x97, + ReorderTone = 0x98, + CallWaitingTone = 0x99, + ConfirmationTone1 = 0x9A, + ConfirmationTone2 = 0x9B, + TonesOff = 0x9C, + OutsideRingback = 0x9D, + Ringer = 0x9E, + PhoneKey0 = 0xB0, + PhoneKey1 = 0xB1, + PhoneKey2 = 0xB2, + PhoneKey3 = 0xB3, + PhoneKey4 = 0xB4, + PhoneKey5 = 0xB5, + PhoneKey6 = 0xB6, + PhoneKey7 = 0xB7, + PhoneKey8 = 0xB8, + PhoneKey9 = 0xB9, + PhoneKeyStar = 0xBA, + PhoneKeyPound = 0xBB, + PhoneKeyA = 0xBC, + PhoneKeyB = 0xBD, + PhoneKeyC = 0xBE, + PhoneKeyD = 0xBF + } + } } \ No newline at end of file diff -r ddfd2ddf10e1 -r dab63af931a3 genUsageTableEnum.pl --- a/genUsageTableEnum.pl Fri Dec 19 18:05:53 2014 +0100 +++ b/genUsageTableEnum.pl Fri Dec 19 18:56:38 2014 +0100 @@ -27,8 +27,8 @@ my $count=0; foreach my $line(@lines) { - #if ($line=~ /^\#\s*define\s+(.+?)\s+([a-fA-FxX\d]+?)\s*$/) - if ($line=~ /^([a-fA-FxX\d]+)(.+)\s+\w+\s+15\..*$/) + #if ($line=~ /^([a-fA-FxX\d]+)(.+)\s+\w+\s+15\..*$/) + if ($line=~ /^([a-fA-FxX\d]+)(.+)\s+\w+\s+\d+\..*$/) { my $string=$2; my $value=$1;