These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!

Committer:
frank26080115
Date:
Sun Mar 20 05:38:56 2011 +0000
Revision:
0:bf7b9fba3924

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
frank26080115 0:bf7b9fba3924 1 /*----------------------------------------------------------------------------
frank26080115 0:bf7b9fba3924 2 * U S B - K e r n e l
frank26080115 0:bf7b9fba3924 3 *----------------------------------------------------------------------------
frank26080115 0:bf7b9fba3924 4 * Name: HID.H
frank26080115 0:bf7b9fba3924 5 * Purpose: USB HID (Human Interface Device) Definitions
frank26080115 0:bf7b9fba3924 6 * Version: V1.10
frank26080115 0:bf7b9fba3924 7 *----------------------------------------------------------------------------
frank26080115 0:bf7b9fba3924 8 * This software is supplied "AS IS" without any warranties, express,
frank26080115 0:bf7b9fba3924 9 * implied or statutory, including but not limited to the implied
frank26080115 0:bf7b9fba3924 10 * warranties of fitness for purpose, satisfactory quality and
frank26080115 0:bf7b9fba3924 11 * noninfringement. Keil extends you a royalty-free right to reproduce
frank26080115 0:bf7b9fba3924 12 * and distribute executable files created using this software for use
frank26080115 0:bf7b9fba3924 13 * on NXP Semiconductors LPC family microcontroller devices only. Nothing
frank26080115 0:bf7b9fba3924 14 * else gives you the right to use this software.
frank26080115 0:bf7b9fba3924 15 *
frank26080115 0:bf7b9fba3924 16 * Copyright (c) 2005-2009 Keil Software.
frank26080115 0:bf7b9fba3924 17 *---------------------------------------------------------------------------*/
frank26080115 0:bf7b9fba3924 18
frank26080115 0:bf7b9fba3924 19 #ifndef __HID_H__
frank26080115 0:bf7b9fba3924 20 #define __HID_H__
frank26080115 0:bf7b9fba3924 21
frank26080115 0:bf7b9fba3924 22 #if defined ( __GNUC__ )
frank26080115 0:bf7b9fba3924 23 #define __packed __attribute__((__packed__))
frank26080115 0:bf7b9fba3924 24 #endif
frank26080115 0:bf7b9fba3924 25
frank26080115 0:bf7b9fba3924 26
frank26080115 0:bf7b9fba3924 27 /* HID Subclass Codes */
frank26080115 0:bf7b9fba3924 28 #define HID_SUBCLASS_NONE 0x00
frank26080115 0:bf7b9fba3924 29 #define HID_SUBCLASS_BOOT 0x01
frank26080115 0:bf7b9fba3924 30
frank26080115 0:bf7b9fba3924 31 /* HID Protocol Codes */
frank26080115 0:bf7b9fba3924 32 #define HID_PROTOCOL_NONE 0x00
frank26080115 0:bf7b9fba3924 33 #define HID_PROTOCOL_KEYBOARD 0x01
frank26080115 0:bf7b9fba3924 34 #define HID_PROTOCOL_MOUSE 0x02
frank26080115 0:bf7b9fba3924 35
frank26080115 0:bf7b9fba3924 36
frank26080115 0:bf7b9fba3924 37 /* HID Descriptor Types */
frank26080115 0:bf7b9fba3924 38 #define HID_HID_DESCRIPTOR_TYPE 0x21
frank26080115 0:bf7b9fba3924 39 #define HID_REPORT_DESCRIPTOR_TYPE 0x22
frank26080115 0:bf7b9fba3924 40 #define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23
frank26080115 0:bf7b9fba3924 41
frank26080115 0:bf7b9fba3924 42
frank26080115 0:bf7b9fba3924 43 /* HID Descriptor */
frank26080115 0:bf7b9fba3924 44 #if defined ( __CC_ARM )
frank26080115 0:bf7b9fba3924 45 typedef __packed struct _HID_DESCRIPTOR {
frank26080115 0:bf7b9fba3924 46 #elif defined ( __GNUC__ )
frank26080115 0:bf7b9fba3924 47 typedef struct __packed _HID_DESCRIPTOR {
frank26080115 0:bf7b9fba3924 48 #elif defined ( __IAR_SYSTEMS_ICC__ )
frank26080115 0:bf7b9fba3924 49 #pragma pack(1)
frank26080115 0:bf7b9fba3924 50 typedef struct _HID_DESCRIPTOR {
frank26080115 0:bf7b9fba3924 51 #endif
frank26080115 0:bf7b9fba3924 52 uint8_t bLength;
frank26080115 0:bf7b9fba3924 53 uint8_t bDescriptorType;
frank26080115 0:bf7b9fba3924 54 uint16_t bcdHID;
frank26080115 0:bf7b9fba3924 55 uint8_t bCountryCode;
frank26080115 0:bf7b9fba3924 56 uint8_t bNumDescriptors;
frank26080115 0:bf7b9fba3924 57 /* Array of one or more descriptors */
frank26080115 0:bf7b9fba3924 58 #if defined ( __CC_ARM )
frank26080115 0:bf7b9fba3924 59 __packed struct _HID_DESCRIPTOR_LIST {
frank26080115 0:bf7b9fba3924 60 #elif defined ( __GNUC__ )
frank26080115 0:bf7b9fba3924 61 struct __packed _HID_DESCRIPTOR_LIST {
frank26080115 0:bf7b9fba3924 62 #elif defined ( __IAR_SYSTEMS_ICC__ )
frank26080115 0:bf7b9fba3924 63 #pragma pack(1)
frank26080115 0:bf7b9fba3924 64 struct _HID_DESCRIPTOR_LIST {
frank26080115 0:bf7b9fba3924 65 #endif
frank26080115 0:bf7b9fba3924 66 uint8_t bDescriptorType;
frank26080115 0:bf7b9fba3924 67 uint16_t wDescriptorLength;
frank26080115 0:bf7b9fba3924 68 } DescriptorList[1];
frank26080115 0:bf7b9fba3924 69 #ifdef __IAR_SYSTEMS_ICC__
frank26080115 0:bf7b9fba3924 70 #pragma pack()
frank26080115 0:bf7b9fba3924 71 #endif
frank26080115 0:bf7b9fba3924 72 } HID_DESCRIPTOR;
frank26080115 0:bf7b9fba3924 73 #ifdef __IAR_SYSTEMS_ICC__
frank26080115 0:bf7b9fba3924 74 #pragma pack()
frank26080115 0:bf7b9fba3924 75 #endif
frank26080115 0:bf7b9fba3924 76
frank26080115 0:bf7b9fba3924 77 /* HID Request Codes */
frank26080115 0:bf7b9fba3924 78 #define HID_REQUEST_GET_REPORT 0x01
frank26080115 0:bf7b9fba3924 79 #define HID_REQUEST_GET_IDLE 0x02
frank26080115 0:bf7b9fba3924 80 #define HID_REQUEST_GET_PROTOCOL 0x03
frank26080115 0:bf7b9fba3924 81 #define HID_REQUEST_SET_REPORT 0x09
frank26080115 0:bf7b9fba3924 82 #define HID_REQUEST_SET_IDLE 0x0A
frank26080115 0:bf7b9fba3924 83 #define HID_REQUEST_SET_PROTOCOL 0x0B
frank26080115 0:bf7b9fba3924 84
frank26080115 0:bf7b9fba3924 85 /* HID Report Types */
frank26080115 0:bf7b9fba3924 86 #define HID_REPORT_INPUT 0x01
frank26080115 0:bf7b9fba3924 87 #define HID_REPORT_OUTPUT 0x02
frank26080115 0:bf7b9fba3924 88 #define HID_REPORT_FEATURE 0x03
frank26080115 0:bf7b9fba3924 89
frank26080115 0:bf7b9fba3924 90
frank26080115 0:bf7b9fba3924 91 /* Usage Pages */
frank26080115 0:bf7b9fba3924 92 #define HID_USAGE_PAGE_UNDEFINED 0x00
frank26080115 0:bf7b9fba3924 93 #define HID_USAGE_PAGE_GENERIC 0x01
frank26080115 0:bf7b9fba3924 94 #define HID_USAGE_PAGE_SIMULATION 0x02
frank26080115 0:bf7b9fba3924 95 #define HID_USAGE_PAGE_VR 0x03
frank26080115 0:bf7b9fba3924 96 #define HID_USAGE_PAGE_SPORT 0x04
frank26080115 0:bf7b9fba3924 97 #define HID_USAGE_PAGE_GAME 0x05
frank26080115 0:bf7b9fba3924 98 #define HID_USAGE_PAGE_DEV_CONTROLS 0x06
frank26080115 0:bf7b9fba3924 99 #define HID_USAGE_PAGE_KEYBOARD 0x07
frank26080115 0:bf7b9fba3924 100 #define HID_USAGE_PAGE_LED 0x08
frank26080115 0:bf7b9fba3924 101 #define HID_USAGE_PAGE_BUTTON 0x09
frank26080115 0:bf7b9fba3924 102 #define HID_USAGE_PAGE_ORDINAL 0x0A
frank26080115 0:bf7b9fba3924 103 #define HID_USAGE_PAGE_TELEPHONY 0x0B
frank26080115 0:bf7b9fba3924 104 #define HID_USAGE_PAGE_CONSUMER 0x0C
frank26080115 0:bf7b9fba3924 105 #define HID_USAGE_PAGE_DIGITIZER 0x0D
frank26080115 0:bf7b9fba3924 106 #define HID_USAGE_PAGE_UNICODE 0x10
frank26080115 0:bf7b9fba3924 107 #define HID_USAGE_PAGE_ALPHANUMERIC 0x14
frank26080115 0:bf7b9fba3924 108 /* ... */
frank26080115 0:bf7b9fba3924 109
frank26080115 0:bf7b9fba3924 110
frank26080115 0:bf7b9fba3924 111 /* Generic Desktop Page (0x01) */
frank26080115 0:bf7b9fba3924 112 #define HID_USAGE_GENERIC_POINTER 0x01
frank26080115 0:bf7b9fba3924 113 #define HID_USAGE_GENERIC_MOUSE 0x02
frank26080115 0:bf7b9fba3924 114 #define HID_USAGE_GENERIC_JOYSTICK 0x04
frank26080115 0:bf7b9fba3924 115 #define HID_USAGE_GENERIC_GAMEPAD 0x05
frank26080115 0:bf7b9fba3924 116 #define HID_USAGE_GENERIC_KEYBOARD 0x06
frank26080115 0:bf7b9fba3924 117 #define HID_USAGE_GENERIC_KEYPAD 0x07
frank26080115 0:bf7b9fba3924 118 #define HID_USAGE_GENERIC_X 0x30
frank26080115 0:bf7b9fba3924 119 #define HID_USAGE_GENERIC_Y 0x31
frank26080115 0:bf7b9fba3924 120 #define HID_USAGE_GENERIC_Z 0x32
frank26080115 0:bf7b9fba3924 121 #define HID_USAGE_GENERIC_RX 0x33
frank26080115 0:bf7b9fba3924 122 #define HID_USAGE_GENERIC_RY 0x34
frank26080115 0:bf7b9fba3924 123 #define HID_USAGE_GENERIC_RZ 0x35
frank26080115 0:bf7b9fba3924 124 #define HID_USAGE_GENERIC_SLIDER 0x36
frank26080115 0:bf7b9fba3924 125 #define HID_USAGE_GENERIC_DIAL 0x37
frank26080115 0:bf7b9fba3924 126 #define HID_USAGE_GENERIC_WHEEL 0x38
frank26080115 0:bf7b9fba3924 127 #define HID_USAGE_GENERIC_HATSWITCH 0x39
frank26080115 0:bf7b9fba3924 128 #define HID_USAGE_GENERIC_COUNTED_BUFFER 0x3A
frank26080115 0:bf7b9fba3924 129 #define HID_USAGE_GENERIC_BYTE_COUNT 0x3B
frank26080115 0:bf7b9fba3924 130 #define HID_USAGE_GENERIC_MOTION_WAKEUP 0x3C
frank26080115 0:bf7b9fba3924 131 #define HID_USAGE_GENERIC_VX 0x40
frank26080115 0:bf7b9fba3924 132 #define HID_USAGE_GENERIC_VY 0x41
frank26080115 0:bf7b9fba3924 133 #define HID_USAGE_GENERIC_VZ 0x42
frank26080115 0:bf7b9fba3924 134 #define HID_USAGE_GENERIC_VBRX 0x43
frank26080115 0:bf7b9fba3924 135 #define HID_USAGE_GENERIC_VBRY 0x44
frank26080115 0:bf7b9fba3924 136 #define HID_USAGE_GENERIC_VBRZ 0x45
frank26080115 0:bf7b9fba3924 137 #define HID_USAGE_GENERIC_VNO 0x46
frank26080115 0:bf7b9fba3924 138 #define HID_USAGE_GENERIC_SYSTEM_CTL 0x80
frank26080115 0:bf7b9fba3924 139 #define HID_USAGE_GENERIC_SYSCTL_POWER 0x81
frank26080115 0:bf7b9fba3924 140 #define HID_USAGE_GENERIC_SYSCTL_SLEEP 0x82
frank26080115 0:bf7b9fba3924 141 #define HID_USAGE_GENERIC_SYSCTL_WAKE 0x83
frank26080115 0:bf7b9fba3924 142 #define HID_USAGE_GENERIC_SYSCTL_CONTEXT_MENU 0x84
frank26080115 0:bf7b9fba3924 143 #define HID_USAGE_GENERIC_SYSCTL_MAIN_MENU 0x85
frank26080115 0:bf7b9fba3924 144 #define HID_USAGE_GENERIC_SYSCTL_APP_MENU 0x86
frank26080115 0:bf7b9fba3924 145 #define HID_USAGE_GENERIC_SYSCTL_HELP_MENU 0x87
frank26080115 0:bf7b9fba3924 146 #define HID_USAGE_GENERIC_SYSCTL_MENU_EXIT 0x88
frank26080115 0:bf7b9fba3924 147 #define HID_USAGE_GENERIC_SYSCTL_MENU_SELECT 0x89
frank26080115 0:bf7b9fba3924 148 #define HID_USAGE_GENERIC_SYSCTL_MENU_RIGHT 0x8A
frank26080115 0:bf7b9fba3924 149 #define HID_USAGE_GENERIC_SYSCTL_MENU_LEFT 0x8B
frank26080115 0:bf7b9fba3924 150 #define HID_USAGE_GENERIC_SYSCTL_MENU_UP 0x8C
frank26080115 0:bf7b9fba3924 151 #define HID_USAGE_GENERIC_SYSCTL_MENU_DOWN 0x8D
frank26080115 0:bf7b9fba3924 152 /* ... */
frank26080115 0:bf7b9fba3924 153
frank26080115 0:bf7b9fba3924 154 /* Simulation Controls Page (0x02) */
frank26080115 0:bf7b9fba3924 155 /* ... */
frank26080115 0:bf7b9fba3924 156 #define HID_USAGE_SIMULATION_RUDDER 0xBA
frank26080115 0:bf7b9fba3924 157 #define HID_USAGE_SIMULATION_THROTTLE 0xBB
frank26080115 0:bf7b9fba3924 158 /* ... */
frank26080115 0:bf7b9fba3924 159
frank26080115 0:bf7b9fba3924 160 /* Virtual Reality Controls Page (0x03) */
frank26080115 0:bf7b9fba3924 161 /* ... */
frank26080115 0:bf7b9fba3924 162
frank26080115 0:bf7b9fba3924 163 /* Sport Controls Page (0x04) */
frank26080115 0:bf7b9fba3924 164 /* ... */
frank26080115 0:bf7b9fba3924 165
frank26080115 0:bf7b9fba3924 166 /* Game Controls Page (0x05) */
frank26080115 0:bf7b9fba3924 167 /* ... */
frank26080115 0:bf7b9fba3924 168
frank26080115 0:bf7b9fba3924 169 /* Generic Device Controls Page (0x06) */
frank26080115 0:bf7b9fba3924 170 /* ... */
frank26080115 0:bf7b9fba3924 171
frank26080115 0:bf7b9fba3924 172 /* Keyboard/Keypad Page (0x07) */
frank26080115 0:bf7b9fba3924 173
frank26080115 0:bf7b9fba3924 174 /* Error "keys" */
frank26080115 0:bf7b9fba3924 175 #define HID_USAGE_KEYBOARD_NOEVENT 0x00
frank26080115 0:bf7b9fba3924 176 #define HID_USAGE_KEYBOARD_ROLLOVER 0x01
frank26080115 0:bf7b9fba3924 177 #define HID_USAGE_KEYBOARD_POSTFAIL 0x02
frank26080115 0:bf7b9fba3924 178 #define HID_USAGE_KEYBOARD_UNDEFINED 0x03
frank26080115 0:bf7b9fba3924 179
frank26080115 0:bf7b9fba3924 180 /* Letters */
frank26080115 0:bf7b9fba3924 181 #define HID_USAGE_KEYBOARD_aA 0x04
frank26080115 0:bf7b9fba3924 182 #define HID_USAGE_KEYBOARD_zZ 0x1D
frank26080115 0:bf7b9fba3924 183
frank26080115 0:bf7b9fba3924 184 /* Numbers */
frank26080115 0:bf7b9fba3924 185 #define HID_USAGE_KEYBOARD_ONE 0x1E
frank26080115 0:bf7b9fba3924 186 #define HID_USAGE_KEYBOARD_ZERO 0x27
frank26080115 0:bf7b9fba3924 187
frank26080115 0:bf7b9fba3924 188 #define HID_USAGE_KEYBOARD_RETURN 0x28
frank26080115 0:bf7b9fba3924 189 #define HID_USAGE_KEYBOARD_ESCAPE 0x29
frank26080115 0:bf7b9fba3924 190 #define HID_USAGE_KEYBOARD_DELETE 0x2A
frank26080115 0:bf7b9fba3924 191
frank26080115 0:bf7b9fba3924 192 /* Funtion keys */
frank26080115 0:bf7b9fba3924 193 #define HID_USAGE_KEYBOARD_F1 0x3A
frank26080115 0:bf7b9fba3924 194 #define HID_USAGE_KEYBOARD_F12 0x45
frank26080115 0:bf7b9fba3924 195
frank26080115 0:bf7b9fba3924 196 #define HID_USAGE_KEYBOARD_PRINT_SCREEN 0x46
frank26080115 0:bf7b9fba3924 197
frank26080115 0:bf7b9fba3924 198 /* Modifier Keys */
frank26080115 0:bf7b9fba3924 199 #define HID_USAGE_KEYBOARD_LCTRL 0xE0
frank26080115 0:bf7b9fba3924 200 #define HID_USAGE_KEYBOARD_LSHFT 0xE1
frank26080115 0:bf7b9fba3924 201 #define HID_USAGE_KEYBOARD_LALT 0xE2
frank26080115 0:bf7b9fba3924 202 #define HID_USAGE_KEYBOARD_LGUI 0xE3
frank26080115 0:bf7b9fba3924 203 #define HID_USAGE_KEYBOARD_RCTRL 0xE4
frank26080115 0:bf7b9fba3924 204 #define HID_USAGE_KEYBOARD_RSHFT 0xE5
frank26080115 0:bf7b9fba3924 205 #define HID_USAGE_KEYBOARD_RALT 0xE6
frank26080115 0:bf7b9fba3924 206 #define HID_USAGE_KEYBOARD_RGUI 0xE7
frank26080115 0:bf7b9fba3924 207 #define HID_USAGE_KEYBOARD_SCROLL_LOCK 0x47
frank26080115 0:bf7b9fba3924 208 #define HID_USAGE_KEYBOARD_NUM_LOCK 0x53
frank26080115 0:bf7b9fba3924 209 #define HID_USAGE_KEYBOARD_CAPS_LOCK 0x39
frank26080115 0:bf7b9fba3924 210
frank26080115 0:bf7b9fba3924 211 /* ... */
frank26080115 0:bf7b9fba3924 212
frank26080115 0:bf7b9fba3924 213 /* LED Page (0x08) */
frank26080115 0:bf7b9fba3924 214 #define HID_USAGE_LED_NUM_LOCK 0x01
frank26080115 0:bf7b9fba3924 215 #define HID_USAGE_LED_CAPS_LOCK 0x02
frank26080115 0:bf7b9fba3924 216 #define HID_USAGE_LED_SCROLL_LOCK 0x03
frank26080115 0:bf7b9fba3924 217 #define HID_USAGE_LED_COMPOSE 0x04
frank26080115 0:bf7b9fba3924 218 #define HID_USAGE_LED_KANA 0x05
frank26080115 0:bf7b9fba3924 219 #define HID_USAGE_LED_POWER 0x06
frank26080115 0:bf7b9fba3924 220 #define HID_USAGE_LED_SHIFT 0x07
frank26080115 0:bf7b9fba3924 221 #define HID_USAGE_LED_DO_NOT_DISTURB 0x08
frank26080115 0:bf7b9fba3924 222 #define HID_USAGE_LED_MUTE 0x09
frank26080115 0:bf7b9fba3924 223 #define HID_USAGE_LED_TONE_ENABLE 0x0A
frank26080115 0:bf7b9fba3924 224 #define HID_USAGE_LED_HIGH_CUT_FILTER 0x0B
frank26080115 0:bf7b9fba3924 225 #define HID_USAGE_LED_LOW_CUT_FILTER 0x0C
frank26080115 0:bf7b9fba3924 226 #define HID_USAGE_LED_EQUALIZER_ENABLE 0x0D
frank26080115 0:bf7b9fba3924 227 #define HID_USAGE_LED_SOUND_FIELD_ON 0x0E
frank26080115 0:bf7b9fba3924 228 #define HID_USAGE_LED_SURROUND_FIELD_ON 0x0F
frank26080115 0:bf7b9fba3924 229 #define HID_USAGE_LED_REPEAT 0x10
frank26080115 0:bf7b9fba3924 230 #define HID_USAGE_LED_STEREO 0x11
frank26080115 0:bf7b9fba3924 231 #define HID_USAGE_LED_SAMPLING_RATE_DETECT 0x12
frank26080115 0:bf7b9fba3924 232 #define HID_USAGE_LED_SPINNING 0x13
frank26080115 0:bf7b9fba3924 233 #define HID_USAGE_LED_CAV 0x14
frank26080115 0:bf7b9fba3924 234 #define HID_USAGE_LED_CLV 0x15
frank26080115 0:bf7b9fba3924 235 #define HID_USAGE_LED_RECORDING_FORMAT_DET 0x16
frank26080115 0:bf7b9fba3924 236 #define HID_USAGE_LED_OFF_HOOK 0x17
frank26080115 0:bf7b9fba3924 237 #define HID_USAGE_LED_RING 0x18
frank26080115 0:bf7b9fba3924 238 #define HID_USAGE_LED_MESSAGE_WAITING 0x19
frank26080115 0:bf7b9fba3924 239 #define HID_USAGE_LED_DATA_MODE 0x1A
frank26080115 0:bf7b9fba3924 240 #define HID_USAGE_LED_BATTERY_OPERATION 0x1B
frank26080115 0:bf7b9fba3924 241 #define HID_USAGE_LED_BATTERY_OK 0x1C
frank26080115 0:bf7b9fba3924 242 #define HID_USAGE_LED_BATTERY_LOW 0x1D
frank26080115 0:bf7b9fba3924 243 #define HID_USAGE_LED_SPEAKER 0x1E
frank26080115 0:bf7b9fba3924 244 #define HID_USAGE_LED_HEAD_SET 0x1F
frank26080115 0:bf7b9fba3924 245 #define HID_USAGE_LED_HOLD 0x20
frank26080115 0:bf7b9fba3924 246 #define HID_USAGE_LED_MICROPHONE 0x21
frank26080115 0:bf7b9fba3924 247 #define HID_USAGE_LED_COVERAGE 0x22
frank26080115 0:bf7b9fba3924 248 #define HID_USAGE_LED_NIGHT_MODE 0x23
frank26080115 0:bf7b9fba3924 249 #define HID_USAGE_LED_SEND_CALLS 0x24
frank26080115 0:bf7b9fba3924 250 #define HID_USAGE_LED_CALL_PICKUP 0x25
frank26080115 0:bf7b9fba3924 251 #define HID_USAGE_LED_CONFERENCE 0x26
frank26080115 0:bf7b9fba3924 252 #define HID_USAGE_LED_STAND_BY 0x27
frank26080115 0:bf7b9fba3924 253 #define HID_USAGE_LED_CAMERA_ON 0x28
frank26080115 0:bf7b9fba3924 254 #define HID_USAGE_LED_CAMERA_OFF 0x29
frank26080115 0:bf7b9fba3924 255 #define HID_USAGE_LED_ON_LINE 0x2A
frank26080115 0:bf7b9fba3924 256 #define HID_USAGE_LED_OFF_LINE 0x2B
frank26080115 0:bf7b9fba3924 257 #define HID_USAGE_LED_BUSY 0x2C
frank26080115 0:bf7b9fba3924 258 #define HID_USAGE_LED_READY 0x2D
frank26080115 0:bf7b9fba3924 259 #define HID_USAGE_LED_PAPER_OUT 0x2E
frank26080115 0:bf7b9fba3924 260 #define HID_USAGE_LED_PAPER_JAM 0x2F
frank26080115 0:bf7b9fba3924 261 #define HID_USAGE_LED_REMOTE 0x30
frank26080115 0:bf7b9fba3924 262 #define HID_USAGE_LED_FORWARD 0x31
frank26080115 0:bf7b9fba3924 263 #define HID_USAGE_LED_REVERSE 0x32
frank26080115 0:bf7b9fba3924 264 #define HID_USAGE_LED_STOP 0x33
frank26080115 0:bf7b9fba3924 265 #define HID_USAGE_LED_REWIND 0x34
frank26080115 0:bf7b9fba3924 266 #define HID_USAGE_LED_FAST_FORWARD 0x35
frank26080115 0:bf7b9fba3924 267 #define HID_USAGE_LED_PLAY 0x36
frank26080115 0:bf7b9fba3924 268 #define HID_USAGE_LED_PAUSE 0x37
frank26080115 0:bf7b9fba3924 269 #define HID_USAGE_LED_RECORD 0x38
frank26080115 0:bf7b9fba3924 270 #define HID_USAGE_LED_ERROR 0x39
frank26080115 0:bf7b9fba3924 271 #define HID_USAGE_LED_SELECTED_INDICATOR 0x3A
frank26080115 0:bf7b9fba3924 272 #define HID_USAGE_LED_IN_USE_INDICATOR 0x3B
frank26080115 0:bf7b9fba3924 273 #define HID_USAGE_LED_MULTI_MODE_INDICATOR 0x3C
frank26080115 0:bf7b9fba3924 274 #define HID_USAGE_LED_INDICATOR_ON 0x3D
frank26080115 0:bf7b9fba3924 275 #define HID_USAGE_LED_INDICATOR_FLASH 0x3E
frank26080115 0:bf7b9fba3924 276 #define HID_USAGE_LED_INDICATOR_SLOW_BLINK 0x3F
frank26080115 0:bf7b9fba3924 277 #define HID_USAGE_LED_INDICATOR_FAST_BLINK 0x40
frank26080115 0:bf7b9fba3924 278 #define HID_USAGE_LED_INDICATOR_OFF 0x41
frank26080115 0:bf7b9fba3924 279 #define HID_USAGE_LED_FLASH_ON_TIME 0x42
frank26080115 0:bf7b9fba3924 280 #define HID_USAGE_LED_SLOW_BLINK_ON_TIME 0x43
frank26080115 0:bf7b9fba3924 281 #define HID_USAGE_LED_SLOW_BLINK_OFF_TIME 0x44
frank26080115 0:bf7b9fba3924 282 #define HID_USAGE_LED_FAST_BLINK_ON_TIME 0x45
frank26080115 0:bf7b9fba3924 283 #define HID_USAGE_LED_FAST_BLINK_OFF_TIME 0x46
frank26080115 0:bf7b9fba3924 284 #define HID_USAGE_LED_INDICATOR_COLOR 0x47
frank26080115 0:bf7b9fba3924 285 #define HID_USAGE_LED_RED 0x48
frank26080115 0:bf7b9fba3924 286 #define HID_USAGE_LED_GREEN 0x49
frank26080115 0:bf7b9fba3924 287 #define HID_USAGE_LED_AMBER 0x4A
frank26080115 0:bf7b9fba3924 288 #define HID_USAGE_LED_GENERIC_INDICATOR 0x4B
frank26080115 0:bf7b9fba3924 289
frank26080115 0:bf7b9fba3924 290 /* Button Page (0x09) */
frank26080115 0:bf7b9fba3924 291 /* There is no need to label these usages. */
frank26080115 0:bf7b9fba3924 292
frank26080115 0:bf7b9fba3924 293 /* Ordinal Page (0x0A) */
frank26080115 0:bf7b9fba3924 294 /* There is no need to label these usages. */
frank26080115 0:bf7b9fba3924 295
frank26080115 0:bf7b9fba3924 296 /* Telephony Device Page (0x0B) */
frank26080115 0:bf7b9fba3924 297 #define HID_USAGE_TELEPHONY_PHONE 0x01
frank26080115 0:bf7b9fba3924 298 #define HID_USAGE_TELEPHONY_ANSWERING_MACHINE 0x02
frank26080115 0:bf7b9fba3924 299 #define HID_USAGE_TELEPHONY_MESSAGE_CONTROLS 0x03
frank26080115 0:bf7b9fba3924 300 #define HID_USAGE_TELEPHONY_HANDSET 0x04
frank26080115 0:bf7b9fba3924 301 #define HID_USAGE_TELEPHONY_HEADSET 0x05
frank26080115 0:bf7b9fba3924 302 #define HID_USAGE_TELEPHONY_KEYPAD 0x06
frank26080115 0:bf7b9fba3924 303 #define HID_USAGE_TELEPHONY_PROGRAMMABLE_BUTTON 0x07
frank26080115 0:bf7b9fba3924 304 /* ... */
frank26080115 0:bf7b9fba3924 305
frank26080115 0:bf7b9fba3924 306 /* Consumer Page (0x0C) */
frank26080115 0:bf7b9fba3924 307 #define HID_USAGE_CONSUMER_CONTROL 0x01
frank26080115 0:bf7b9fba3924 308 /* ... */
frank26080115 0:bf7b9fba3924 309
frank26080115 0:bf7b9fba3924 310 /* and others ... */
frank26080115 0:bf7b9fba3924 311
frank26080115 0:bf7b9fba3924 312
frank26080115 0:bf7b9fba3924 313 /* HID Report Item Macros */
frank26080115 0:bf7b9fba3924 314
frank26080115 0:bf7b9fba3924 315 /* Main Items */
frank26080115 0:bf7b9fba3924 316 #define HID_Input(x) 0x81,x
frank26080115 0:bf7b9fba3924 317 #define HID_Output(x) 0x91,x
frank26080115 0:bf7b9fba3924 318 #define HID_Feature(x) 0xB1,x
frank26080115 0:bf7b9fba3924 319 #define HID_Collection(x) 0xA1,x
frank26080115 0:bf7b9fba3924 320 #define HID_EndCollection 0xC0
frank26080115 0:bf7b9fba3924 321
frank26080115 0:bf7b9fba3924 322 /* Data (Input, Output, Feature) */
frank26080115 0:bf7b9fba3924 323 #define HID_Data 0<<0
frank26080115 0:bf7b9fba3924 324 #define HID_Constant 1<<0
frank26080115 0:bf7b9fba3924 325 #define HID_Array 0<<1
frank26080115 0:bf7b9fba3924 326 #define HID_Variable 1<<1
frank26080115 0:bf7b9fba3924 327 #define HID_Absolute 0<<2
frank26080115 0:bf7b9fba3924 328 #define HID_Relative 1<<2
frank26080115 0:bf7b9fba3924 329 #define HID_NoWrap 0<<3
frank26080115 0:bf7b9fba3924 330 #define HID_Wrap 1<<3
frank26080115 0:bf7b9fba3924 331 #define HID_Linear 0<<4
frank26080115 0:bf7b9fba3924 332 #define HID_NonLinear 1<<4
frank26080115 0:bf7b9fba3924 333 #define HID_PreferredState 0<<5
frank26080115 0:bf7b9fba3924 334 #define HID_NoPreferred 1<<5
frank26080115 0:bf7b9fba3924 335 #define HID_NoNullPosition 0<<6
frank26080115 0:bf7b9fba3924 336 #define HID_NullState 1<<6
frank26080115 0:bf7b9fba3924 337 #define HID_NonVolatile 0<<7
frank26080115 0:bf7b9fba3924 338 #define HID_Volatile 1<<7
frank26080115 0:bf7b9fba3924 339
frank26080115 0:bf7b9fba3924 340 /* Collection Data */
frank26080115 0:bf7b9fba3924 341 #define HID_Physical 0x00
frank26080115 0:bf7b9fba3924 342 #define HID_Application 0x01
frank26080115 0:bf7b9fba3924 343 #define HID_Logical 0x02
frank26080115 0:bf7b9fba3924 344 #define HID_Report 0x03
frank26080115 0:bf7b9fba3924 345 #define HID_NamedArray 0x04
frank26080115 0:bf7b9fba3924 346 #define HID_UsageSwitch 0x05
frank26080115 0:bf7b9fba3924 347 #define HID_UsageModifier 0x06
frank26080115 0:bf7b9fba3924 348
frank26080115 0:bf7b9fba3924 349 /* Global Items */
frank26080115 0:bf7b9fba3924 350 #define HID_UsagePage(x) 0x05,x
frank26080115 0:bf7b9fba3924 351 #define HID_UsagePageVendor(x) 0x06,x,0xFF
frank26080115 0:bf7b9fba3924 352 #define HID_LogicalMin(x) 0x15,x
frank26080115 0:bf7b9fba3924 353 #define HID_LogicalMinS(x) 0x16,(x&0xFF),((x>>8)&0xFF)
frank26080115 0:bf7b9fba3924 354 #define HID_LogicalMinL(x) 0x17,(x&0xFF),((x>>8)&0xFF),((x>>16)&0xFF),((x>>24)&0xFF)
frank26080115 0:bf7b9fba3924 355 #define HID_LogicalMax(x) 0x25,x
frank26080115 0:bf7b9fba3924 356 #define HID_LogicalMaxS(x) 0x26,(x&0xFF),((x>>8)&0xFF)
frank26080115 0:bf7b9fba3924 357 #define HID_LogicalMaxL(x) 0x27,(x&0xFF),((x>>8)&0xFF),((x>>16)&0xFF),((x>>24)&0xFF)
frank26080115 0:bf7b9fba3924 358 #define HID_PhysicalMin(x) 0x35,x
frank26080115 0:bf7b9fba3924 359 #define HID_PhysicalMinS(x) 0x36,(x&0xFF),((x>>8)&0xFF)
frank26080115 0:bf7b9fba3924 360 #define HID_PhysicalMinL(x) 0x37,(x&0xFF),((x>>8)&0xFF),((x>>16)&0xFF),((x>>24)&0xFF)
frank26080115 0:bf7b9fba3924 361 #define HID_PhysicalMax(x) 0x45,x
frank26080115 0:bf7b9fba3924 362 #define HID_PhysicalMaxS(x) 0x46,(x&0xFF),((x>>8)&0xFF)
frank26080115 0:bf7b9fba3924 363 #define HID_PhysicalMaxL(x) 0x47,(x&0xFF),((x>>8)&0xFF),((x>>16)&0xFF),((x>>24)&0xFF)
frank26080115 0:bf7b9fba3924 364 #define HID_UnitExponent(x) 0x55,x
frank26080115 0:bf7b9fba3924 365 #define HID_Unit(x) 0x65,x
frank26080115 0:bf7b9fba3924 366 #define HID_UnitS(x) 0x66,(x&0xFF),((x>>8)&0xFF)
frank26080115 0:bf7b9fba3924 367 #define HID_UnitL(x) 0x67,(x&0xFF),((x>>8)&0xFF),((x>>16)&0xFF),((x>>24)&0xFF)
frank26080115 0:bf7b9fba3924 368 #define HID_ReportSize(x) 0x75,x
frank26080115 0:bf7b9fba3924 369 #define HID_ReportID(x) 0x85,x
frank26080115 0:bf7b9fba3924 370 #define HID_ReportCount(x) 0x95,x
frank26080115 0:bf7b9fba3924 371 #define HID_Push 0xA0
frank26080115 0:bf7b9fba3924 372 #define HID_Pop 0xB0
frank26080115 0:bf7b9fba3924 373
frank26080115 0:bf7b9fba3924 374 /* Local Items */
frank26080115 0:bf7b9fba3924 375 #define HID_Usage(x) 0x09,x
frank26080115 0:bf7b9fba3924 376 #define HID_UsageMin(x) 0x19,x
frank26080115 0:bf7b9fba3924 377 #define HID_UsageMax(x) 0x29,x
frank26080115 0:bf7b9fba3924 378
frank26080115 0:bf7b9fba3924 379
frank26080115 0:bf7b9fba3924 380 #endif /* __HID_H__ */