Add HuT Usage Pages and IDs

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3304 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-02-20 00:08:11 +00:00
parent a86934e351
commit 2814d4dd8c

View File

@ -283,6 +283,134 @@
#define USBHID_KBDOUT_COMPOSE (1 << 3)
#define USBHID_KBDOUT_KANA (1 << 4)
/* Mouse input report (HID B.2) */
#define USBHID_MOUSEIN_BUTTON1 (1 << 0)
#define USBHID_MOUSEIN_BUTTON2 (1 << 1)
#define USBHID_MOUSEIN_BUTTON3 (1 << 2)
/* Joystick input report (4 bytes) (HID D.1) */
#define USBHID_JSIN_HATSWITCH_SHIFT (0)
#define USBHID_JSIN_HATSWITCH_MASK (15 << USBHID_JSIN_HATSWITCH_SHIFT)
#define USBHID_JSIN_BUTTON1 (1 << 4)
#define USBHID_JSIN_BUTTON2 (1 << 5)
#define USBHID_JSIN_BUTTON3 (1 << 6)
#define USBHID_JSIN_BUTTON4 (1 << 7)
/* Usage pages (HuT 3) */
#define USBHID_USAGE_PAGE_UNDEFINED 0x00 /* Undefined */
#define USBHID_USAGE_PAGE_GENERIC_DCTRL 0x01 /* Generic Desktop Controls */
#define USBHID_USAGE_PAGE_SIMCTRL 0x02 /* Simulation Controls */
#define USBHID_USAGE_PAGE_VRCTRL 0x03 /* VR Controls */
#define USBHID_USAGE_PAGE_SPORTCTRL 0x04 /* Sport Controls */
#define USBHID_USAGE_PAGE_GAMECTRL 0x05 /* Game Controls */
#define USBHID_USAGE_PAGE_GENERIC_DEVCTRL 0x06 /* Generic Device Controls */
#define USBHID_USAGE_PAGE_KBD 0x07 /* Keyboard/Keypad */
#define USBHID_USAGE_PAGE_LEDS 0x08 /* LEDs */
#define USBHID_USAGE_PAGE_BUTTON 0x09 /* Button */
#define USBHID_USAGE_PAGE_ORDINAL 0x0a /* Ordinal */
#define USBHID_USAGE_PAGE_TELEPHONY 0x0b /* Telephony */
#define USBHID_USAGE_PAGE_CONSUMER 0x0c /* Consumer */
#define USBHID_USAGE_PAGE_DIGITIZER 0x0d /* Digitizer */
/* 0x0e Reserved */
#define USBHID_USAGE_PAGE_PIDPAGE 0x0f /* PID Page USB Physical Interface Device */
#define USBHID_USAGE_PAGE_UNICODE 0x10 /* Unicode */
/* 0x11-13 Reserved */
#define USBHID_USAGE_PAGE_ALPHA_DISPLAY 0x14 /* Alphanumeric Display */
/* 0x15-3f Reserved */
#define USBHID_USAGE_PAGE_MEDICAL 0x40 /* Medical Instruments */
/* 0x41-7f Reserved */
/* 0x80-83 Monitor Devices */
/* 0x84-87 Power Devices */
/* 0x88-8b Reserved */
#define USBHID_USAGE_PAGE_BARCODE_SCANNER 0x8c /* Bar Code Scanner page */
#define USBHID_USAGE_PAGE_SCALE 0x8d /* Scale page */
#define USBHID_USAGE_PAGE_MSR 0x8e /* Magnetic Stripe Reading (MSR) Devices */
#define USBHID_USAGE_PAGE_POS 0x8f /* Point of Sale devices */
#define USBHID_USAGE_PAGE_CAMERA_CTRL 0x90 /* Camera Control Page */
/* Generic Desktop Page Usage IDs (HuT 4) */
#define USBHID_DCTRLUSE_UNDEFINED 0x00 /* Undefined */
#define USBHID_DCTRLUSE_POINTER 0x01 /* Pointer */
#define USBHID_DCTRLUSE_MOUSE 0x02 /* Mouse */
/* 0x03 Reserved */
#define USBHID_DCTRLUSE_JOYSTICK 0x04 /* Joystick */
#define USBHID_DCTRLUSE_GAMEPAD 0x05 /* Game Pad */
#define USBHID_DCTRLUSE_KEYBOARD 0x06 /* Keyboard */
#define USBHID_DCTRLUSE_KEYPAD 0x07 /* Keypad */
#define USBHID_DCTRLUSE_MULTIAXIS 0x08 /* Multi-axis Controller */
#define USBHID_DCTRLUSE_TABLET 0x09 /* Tablet PC System Controls */
/* 0x0a-2f Reserved */
#define USBHID_DCTRLUSE_X 0x30 /* X */
#define USBHID_DCTRLUSE_Y 0x31 /* Y */
#define USBHID_DCTRLUSE_Z 0x32 /* Z */
#define USBHID_DCTRLUSE_RX 0x33 /* Rx */
#define USBHID_DCTRLUSE_RY 0x34 /* Ry */
#define USBHID_DCTRLUSE_RZ 0x35 /* Rz */
#define USBHID_DCTRLUSE_SLIDER 0x36 /* Slider */
#define USBHID_DCTRLUSE_DIAL 0x37 /* Dial */
#define USBHID_DCTRLUSE_WHEEL 0x38 /* Wheel */
#define USBHID_DCTRLUSE_HATSWITCH 0x39 /* Hat switch */
#define USBHID_DCTRLUSE_COUNTED 0x3a /* Counted Buffer */
#define USBHID_DCTRLUSE_BYTECOUNT 0x3b /* Byte Count */
#define USBHID_DCTRLUSE_MOTION 0x3c /* Motion Wakeup */
#define USBHID_DCTRLUSE_START 0x3d /* Start */
#define USBHID_DCTRLUSE_SELECT 0x3e /* Select */
/* 0x3f Reserved */
#define USBHID_DCTRLUSE_VX 0x40 /* Vx */
#define USBHID_DCTRLUSE_VY 0x41 /* Vy */
#define USBHID_DCTRLUSE_VZ 0x42 /* Vz */
#define USBHID_DCTRLUSE_VBRX 0x43 /* Vbrx */
#define USBHID_DCTRLUSE_VBRY 0x44 /* Vbry */
#define USBHID_DCTRLUSE_VBRZ 0x45 /* Vbrz */
#define USBHID_DCTRLUSE_VNO 0x46 /* Vno */
#define USBHID_DCTRLUSE_FEATURE 0x47 /* Feature Notification */
#define USBHID_DCTRLUSE_RESOLUTION 0x48 /* Resolution Multiplier */
/* 0x49-7f Reserved */
#define USBHID_DCTRLUSE_CONTROL 0x80 /* System Control */
#define USBHID_DCTRLUSE_POWERDOWN 0x81 /* System Power Down */
#define USBHID_DCTRLUSE_SLEEP 0x82 /* System Sleep */
#define USBHID_DCTRLUSE_WAKEUP 0x83 /* System Wake Up */
#define USBHID_DCTRLUSE_CONTEXT_MENU 0x84 /* System Context Menu */
#define USBHID_DCTRLUSE_MAIN_MENU 0x85 /* System Main Menu */
#define USBHID_DCTRLUSE_APP_MENU 0x86 /* System App Menu */
#define USBHID_DCTRLUSE_MENU_HELP 0x87 /* System Menu Help */
#define USBHID_DCTRLUSE_MENU_EXIT 0x88 /* System Menu Exit */
#define USBHID_DCTRLUSE_MENU_SELECT 0x89 /* System Menu Select */
#define USBHID_DCTRLUSE_MENU_RIGHT 0x8a /* System Menu Right */
#define USBHID_DCTRLUSE_MENU_LEFT 0x8b /* System Menu Left */
#define USBHID_DCTRLUSE_MENU_UP 0x8c /* System Menu Up */
#define USBHID_DCTRLUSE_MENU_DOWN 0x8d /* System Menu Down */
#define USBHID_DCTRLUSE_COLD_RESTART 0x8e /* System Cold Restart */
#define USBHID_DCTRLUSE_WARM_RESTART 0x8f /* System Warm Restart */
#define USBHID_DCTRLUSE_DPAD_UP 0x90 /* D-pad Up */
#define USBHID_DCTRLUSE_DPAD_DOWN 0x91 /* D-pad Down */
#define USBHID_DCTRLUSE_DPAD_RIGHT 0x92 /* D-pad Right */
#define USBHID_DCTRLUSE_DPAD_LEFT 0x93 /* D-pad Left */
/* 0x94-9f Reserved */
#define USBHID_DCTRLUSE_DOCK 0xa0 /* System Dock */
#define USBHID_DCTRLUSE_UNDOCK 0xa1 /* System Undock */
#define USBHID_DCTRLUSE_SETUP 0xa2 /* System Setup */
#define USBHID_DCTRLUSE_BREAK 0xa3 /* System Break */
#define USBHID_DCTRLUSE_DEBUG_BREAK 0xa4 /* System Debugger Break */
#define USBHID_DCTRLUSE_APP_BREAK 0xa5 /* Application Break */
#define USBHID_DCTRLUSE_APP_DEBUG_BREAK 0xa6 /* Application Debugger Break */
#define USBHID_DCTRLUSE_MUTE 0xa7 /* System Speaker Mute */
#define USBHID_DCTRLUSE_HIBERNATE 0xa8 /* System Hibernate */
/* 0xa9-af Reserved */
#define USBHID_DCTRLUSE_DISPLAY_INVERT 0xb0 /* System Display Invert */
#define USBHID_DCTRLUSE_DISPALY_INTERNAL 0xb1 /* System Display Internal */
#define USBHID_DCTRLUSE_DISPLAY_EXTERNAL 0xb2 /* System Display External */
#define USBHID_DCTRLUSE_DISPLAY_BOTH 0xb3 /* System Display Both */
#define USBHID_DCTRLUSE_DISPLAY_DUAL 0xb4 /* System Display Dual */
#define USBHID_DCTRLUSE_DISPLAY_TOGGLE 0xb5 /* System Display Toggle Int/Ext */
#define USBHID_DCTRLUSE_DISPLAY_SWAP 0xb6 /* System Display Swap */
#define USBHID_DCTRLUSE_ 0xb7 /* System Display LCD Autoscale */
/* 0xb8-ffff Reserved */
/* Keyboard usage IDs (HuT 10) */
#define USBHID_KBDUSE_NONE 0x00 /* Reserved (no event indicated) */
@ -495,21 +623,6 @@
#define USBHID_KBDUSE_MAX 0xe7
/* Mouse input report (HID B.2) */
#define USBHID_MOUSEIN_BUTTON1 (1 << 0)
#define USBHID_MOUSEIN_BUTTON2 (1 << 1)
#define USBHID_MOUSEIN_BUTTON3 (1 << 2)
/* Joystick input report (4 bytes) (HID D.1) */
#define USBHID_JSIN_HATSWITCH_SHIFT (0)
#define USBHID_JSIN_HATSWITCH_MASK (15 << USBHID_JSIN_HATSWITCH_SHIFT)
#define USBHID_JSIN_BUTTON1 (1 << 4)
#define USBHID_JSIN_BUTTON2 (1 << 5)
#define USBHID_JSIN_BUTTON3 (1 << 6)
#define USBHID_JSIN_BUTTON4 (1 << 7)
/****************************************************************************
* Public Types
****************************************************************************/