Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
hid.h File Reference

Go to the source code of this file.

Data Structures

struct  _HID_DESCRIPTOR
struct  _HID_PHYSICAL_DESCRIPTOR
struct  _HID_PHYSICAL_DESCRIPTOR_SET0
struct  _HID_PHYSICAL_DESCRIPTOR_SET
struct  _HID_STATE
struct  _HID_STACK
struct  _HID_USAGE
struct  _HID_REPORT
struct  _HID_COLLECTION
struct  _HID_DEVICE
struct  _HID_CONSUMER
struct  _HID_EXTENT
struct  _HID_FIELD
struct  _HID_DEFINITION

Macros

#define HID_NAME_PREFIX   "HID"
 Name prefix for HID Devices.
#define HID_TYPE_NONE   0
#define HID_TYPE_USB   1
#define HID_TYPE_MAX   1
#define HID_STATE_DETACHED   0
#define HID_STATE_DETACHING   1
#define HID_STATE_ATTACHING   2
#define HID_STATE_ATTACHED   3
#define HID_STATE_MAX   3
#define HID_FLAG_NONE   0x00000000
#define HID_SUBCLASS_NONE   0
#define HID_SUBCLASS_BOOT   1
#define HID_BOOT_PROTOCOL_NONE   0
#define HID_BOOT_PROTOCOL_KEYBOARD   1
#define HID_BOOT_PROTOCOL_MOUSE   2
#define HID_DESCRIPTOR_TYPE_HID   0x21
#define HID_DESCRIPTOR_TYPE_REPORT   0x22
#define HID_DESCRIPTOR_TYPE_PHYSICAL_DESCRIPTOR   0x23
#define HID_REQUEST_GET_REPORT   0x01
#define HID_REQUEST_GET_IDLE   0x02
#define HID_REQUEST_GET_PROTOCOL   0x03
#define HID_REQUEST_SET_REPORT   0x09
#define HID_REQUEST_SET_IDLE   0x0A
#define HID_REQUEST_SET_PROTOCOL   0x0B
#define HID_PROTOCOL_BOOT   0
#define HID_PROTOCOL_REPORT   1
#define HID_REPORT_INPUT   1
#define HID_REPORT_OUTPUT   2
#define HID_REPORT_FEATURE   3
#define HID_REPORTID_NONE   0
#define HID_SIZE_0   (0 << 0)
#define HID_SIZE_1   (1 << 0)
#define HID_SIZE_2   (2 << 0)
#define HID_SIZE_4   (3 << 0)
#define HID_SIZE_MASK   0x03
#define HID_TYPE_MAIN   (0 << 2)
#define HID_TYPE_GLOBAL   (1 << 2)
#define HID_TYPE_LOCAL   (2 << 2)
#define HID_TYPE_RESERVED   (3 << 2)
#define HID_TYPE_MASK   0x0C
#define HID_TAG_MAIN_INPUT   0x80
 Input.
#define HID_TAG_MAIN_OUTPUT   0x90
 Output.
#define HID_TAG_MAIN_FEATURE   0xB0
 Feature.
#define HID_TAG_MAIN_COLLECTION   0xA0
 Collection.
#define HID_TAG_MAIN_END_COLLECTION   0xC0
 End Collection.
#define HID_TAG_GLOBAL_USAGE_PAGE   0x04
 Usage Page.
#define HID_TAG_GLOBAL_LOGICAL_MINIMUM   0x14
 Logical Minimum.
#define HID_TAG_GLOBAL_LOGICAL_MAXIMUM   0x24
 Logical Maximum.
#define HID_TAG_GLOBAL_PHYSICAL_MINIMUM   0x34
 Physical Minimum.
#define HID_TAG_GLOBAL_PHYSICAL_MAXIMUM   0x44
 Physical Maximum.
#define HID_TAG_GLOBAL_UNIT_EXPONENT   0x54
 Unit Exponent.
#define HID_TAG_GLOBAL_UNIT   0x64
 Unit.
#define HID_TAG_GLOBAL_REPORT_SIZE   0x74
 Report Size.
#define HID_TAG_GLOBAL_REPORT_ID   0x84
 Report ID.
#define HID_TAG_GLOBAL_REPORT_COUNT   0x94
 Report Count.
#define HID_TAG_GLOBAL_PUSH   0xA4
 Push.
#define HID_TAG_GLOBAL_POP   0xB4
 Pop.
#define HID_TAG_LOCAL_USAGE   0x08
 Usage.
#define HID_TAG_LOCAL_USAGE_MINIMUM   0x18
 Usage Minimum.
#define HID_TAG_LOCAL_USAGE_MAXIMUM   0x28
 Usage Maximum.
#define HID_TAG_LOCAL_DESIGNATOR_INDEX   0x38
 Designator Index.
#define HID_TAG_LOCAL_DESIGNATOR_MINIMUM   0x48
 Designator Minimum.
#define HID_TAG_LOCAL_DESIGNATOR_MAXIMUM   0x58
 Designator Maximum.
#define HID_TAG_LOCAL_STRING_INDEX   0x78
 String Index.
#define HID_TAG_LOCAL_STRING_MINIMUM   0x88
 String Minimum.
#define HID_TAG_LOCAL_STRING_MAXIMUM   0x98
 String Maximum.
#define HID_TAG_LOCAL_DELIMITER   0xA8
 Delimiter.
#define HID_TAG_LONG   0xFC
 Always HID_SIZE_2 (Followed by 1 byte DataSize / 1 byte LongItemTag / n bytes Data).
#define HID_TAG_MASK   0xFC
#define HID_MAIN_ITEM_CONSTANT   (1 << 0)
 Data (0) | Constant (1).
#define HID_MAIN_ITEM_VARIABLE   (1 << 1)
 Array (0) | Variable (1).
#define HID_MAIN_ITEM_RELATIVE   (1 << 2)
 Absolute (0) | Relative (1).
#define HID_MAIN_ITEM_WRAP   (1 << 3)
 No Wrap (0) | Wrap (1).
#define HID_MAIN_ITEM_NON_LINEAR   (1 << 4)
 Linear (0) | Non Linear (1).
#define HID_MAIN_ITEM_NO_PREFERRED   (1 << 5)
 Preferred State (0) | No Preferred (1).
#define HID_MAIN_ITEM_NULL_STATE   (1 << 6)
 No Null position (0) | Null state(1).
#define HID_MAIN_ITEM_RESERVED1   (1 << 7)
 Reserved (0).
#define HID_MAIN_ITEM_BUFFERED_BYTES   (1 << 8)
 Bit Field (0) | Buffered Bytes (1).
#define HID_MAIN_ITEM_RESERVED2   (0xFFFFFE00 << 9)
 Reserved (0).
#define HID_MAIN_COLLECTION_PHYSICAL   0x00
 Physical (Group of axes).
#define HID_MAIN_COLLECTION_APPLICATION   0x01
 Application (Mouse, Keyboard).
#define HID_MAIN_COLLECTION_LOGICAL   0x02
 Logical (Interrelated data).
#define HID_MAIN_COLLECTION_REPORT   0x03
 Report.
#define HID_MAIN_COLLECTION_NAMED_ARRAY   0x04
 Named Array.
#define HID_MAIN_COLLECTION_USAGE_SWITCH   0x05
 Usage Switch.
#define HID_MAIN_COLLECTION_USAGE_MODIFIER   0x06
 Usage Modifier.
#define HID_GLOBAL_UNIT_SYSTEM_MASK   0xF
 System of Measurement.
#define HID_GLOBAL_UNIT_SYSTEM_SHIFT   0
#define HID_GLOBAL_UNIT_SYSTEM_NONE   0
#define HID_GLOBAL_UNIT_SYSTEM_SI_LINEAR   1
 SI linear unit.
#define HID_GLOBAL_UNIT_SYSTEM_SI_ROTATION   2
 SI rotational units.
#define HID_GLOBAL_UNIT_SYSTEM_ENGLISH_LINEAR   3
 English (Imperial) linear units.
#define HID_GLOBAL_UNIT_SYSTEM_ENGLISH_ROTATION   4
 English (Imperial) rotational units.
#define HID_GLOBAL_UNIT_LENGTH_MASK   0xF
 Length (Centimeters in SI, Inches in English).
#define HID_GLOBAL_UNIT_LENGTH_SHIFT   4
#define HID_GLOBAL_UNIT_ROTATION_MASK   0xF
 Rotation (Radians in SI, Degrees in English).
#define HID_GLOBAL_UNIT_ROTATION_SHIFT   4
#define HID_GLOBAL_UNIT_MASS_MASK   0xF
 Mass (Grams in SI, Slugs in English).
#define HID_GLOBAL_UNIT_MASS_SHIFT   8
#define HID_GLOBAL_UNIT_TIME_MASK   0xF
 Time (Seconds).
#define HID_GLOBAL_UNIT_TIME_SHIFT   12
#define HID_GLOBAL_UNIT_TEMPERATURE_MASK   0xF
 Temperature (Kelvin in SI, Fahrenheit in English).
#define HID_GLOBAL_UNIT_TEMPERATURE_SHIFT   16
#define HID_GLOBAL_UNIT_CURRENT_MASK   0xF
 Current (Amperes).
#define HID_GLOBAL_UNIT_CURRENT_SHIFT   20
#define HID_GLOBAL_UNIT_LIGHT_MASK   0xF
 Luminous Intensity (Candelas).
#define HID_GLOBAL_UNIT_LIGHT_SHIFT   24
#define HID_GLOBAL_UNIT_SI_ROTATION   0x00000012
 Rotation (Radians).
#define HID_GLOBAL_UNIT_SI_LENGTH   0x00000011
 Length (Centimeters).
#define HID_GLOBAL_UNIT_SI_MASS   0x00000101
 Mass (Grams).
#define HID_GLOBAL_UNIT_SI_TIME   0x00001001
 Time (Seconds).
#define HID_GLOBAL_UNIT_SI_TEMPERATURE   0x00010001
 Temperature (Kelvin).
#define HID_GLOBAL_UNIT_SI_CURRENT   0x00100001
 Current (Amperes).
#define HID_GLOBAL_UNIT_SI_LIGHT   0x01000001
 Luminous Intensity (Candelas).
#define HID_GLOBAL_UNIT_SI_AREA   0x00000021
 Area (Square Centimeters).
#define HID_GLOBAL_UNIT_SI_VOLUME   0x00000031
 Volume (Cubic Centimeters.
#define HID_GLOBAL_UNIT_SI_VELOCITY   0x0000F011
 Velocity (Centimeters per second).
#define HID_GLOBAL_UNIT_SI_ACCELERATION   0x0000E011
 Acceleration (Centimeters per second squared).
#define HID_GLOBAL_UNIT_SI_FREQUENCY   0x0000F001
 Frequency (Hertz).
#define HID_GLOBAL_UNIT_SI_FORCE   0x0000E111
 Force (Newtons).
#define HID_GLOBAL_UNIT_SI_PRESSURE   0x0000E1F1
 Pressure (Pascals).
#define HID_GLOBAL_UNIT_SI_ENERGY   0x0000E121
 Energy (Joules).
#define HID_GLOBAL_UNIT_SI_POWER   0x0000D121
 Power (Watts).
#define HID_GLOBAL_UNIT_ENGLISH_ROTATION   0x00000014
 Rotation (Degrees).
#define HID_GLOBAL_UNIT_ENGLISH_LENGTH   0x00000013
 Length (Inches).
#define HID_GLOBAL_UNIT_ENGLISH_TIME   0x00001003
 Time (Seconds).
#define HID_GLOBAL_UNIT_ENGLISH_TEMPERATURE   0x00010003
 Temperature (Fahrenheit).
#define HID_GLOBAL_UNIT_ENGLISH_CURRENT   0x00100003
 Current (Amperes).
#define HID_GLOBAL_UNIT_ENGLISH_LIGHT   0x01000003
 Luminous Intensity (Candelas).
#define HID_GLOBAL_UNIT_ENGLISH_AREA   0x00000023
 Area (Square Inches).
#define HID_GLOBAL_UNIT_ENGLISH_VOLUME   0x00000033
 Volume (Cubic Inches).
#define HID_LOCAL_DELIMITER_CLOSE   0
#define HID_LOCAL_DELIMITER_OPEN   1
#define HID_PHYSICAL_BIAS_NONE   (0 << 5)
 Not applicable.
#define HID_PHYSICAL_BIAS_RIGHT_HAND   (1 << 5)
 Right hand.
#define HID_PHYSICAL_BIAS_LEFT_HAND   (2 << 5)
 Left hand.
#define HID_PHYSICAL_BIAS_BOTH_HANDS   (3 << 5)
 Both hands.
#define HID_PHYSICAL_BIAS_EITHER_HAND   (4 << 5)
 Either hand.
#define HID_PHYSICAL_DESIGNATOR_NONE   0x00
 None.
#define HID_PHYSICAL_DESIGNATOR_HAND   0x01
 Hand.
#define HID_PHYSICAL_DESIGNATOR_EYEBALL   0x02
 Eyeball.
#define HID_PHYSICAL_DESIGNATOR_EYEBROW   0x03
 Eyebrow.
#define HID_PHYSICAL_DESIGNATOR_EYELID   0x04
 Eyelid.
#define HID_PHYSICAL_DESIGNATOR_EAR   0x05
 Ear.
#define HID_PHYSICAL_DESIGNATOR_NOSE   0x06
 Nose.
#define HID_PHYSICAL_DESIGNATOR_MOUTH   0x07
 Mouth.
#define HID_PHYSICAL_DESIGNATOR_UPPER_LIP   0x08
 Upper lip.
#define HID_PHYSICAL_DESIGNATOR_LOWER_LIP   0x09
 Lower lip.
#define HID_PHYSICAL_DESIGNATOR_JAW   0x0A
 Jaw.
#define HID_PHYSICAL_DESIGNATOR_NECK   0x0B
 Neck.
#define HID_PHYSICAL_DESIGNATOR_UPPER_ARM   0x0C
 Upper arm.
#define HID_PHYSICAL_DESIGNATOR_ELBOW   0x0D
 Elbow.
#define HID_PHYSICAL_DESIGNATOR_FOREARM   0x0E
 Forearm.
#define HID_PHYSICAL_DESIGNATOR_WRIST   0x0F
 Wrist.
#define HID_PHYSICAL_DESIGNATOR_PALM   0x10
 Palm.
#define HID_PHYSICAL_DESIGNATOR_THUMB   0x11
 Thumb.
#define HID_PHYSICAL_DESIGNATOR_INDEX_FINGER   0x12
 Index finger.
#define HID_PHYSICAL_DESIGNATOR_MIDDLE_FINGER   0x13
 Middle finger.
#define HID_PHYSICAL_DESIGNATOR_RING_FINGER   0x14
 Ring finger.
#define HID_PHYSICAL_DESIGNATOR_LITTLE_FINGER   0x15
 Little finger.
#define HID_PHYSICAL_DESIGNATOR_HEAD   0x16
 Head.
#define HID_PHYSICAL_DESIGNATOR_SHOULDER   0x17
 Shoulder.
#define HID_PHYSICAL_DESIGNATOR_HIP   0x18
 Hip.
#define HID_PHYSICAL_DESIGNATOR_WAIST   0x19
 Waist.
#define HID_PHYSICAL_DESIGNATOR_THIGH   0x1A
 Thigh.
#define HID_PHYSICAL_DESIGNATOR_KNEE   0x1B
 Knee.
#define HID_PHYSICAL_DESIGNATOR_CALF   0x1C
 Calf.
#define HID_PHYSICAL_DESIGNATOR_ANKLE   0x1D
 Ankle.
#define HID_PHYSICAL_DESIGNATOR_FOOT   0x1E
 Foot.
#define HID_PHYSICAL_DESIGNATOR_HEEL   0x1F
 Heel.
#define HID_PHYSICAL_DESIGNATOR_BALL_OF_FOOT   0x20
 Ball of foot.
#define HID_PHYSICAL_DESIGNATOR_BIG_TOE   0x21
 Big toe.
#define HID_PHYSICAL_DESIGNATOR_SECOND_TOE   0x22
 Second toe.
#define HID_PHYSICAL_DESIGNATOR_THIRD_TOE   0x23
 Third toe.
#define HID_PHYSICAL_DESIGNATOR_FOURTH_TOE   0x24
 Fourth toe.
#define HID_PHYSICAL_DESIGNATOR_LITTLE_TOE   0x25
 Little toe.
#define HID_PHYSICAL_DESIGNATOR_BROW   0x26
 Brow.
#define HID_PHYSICAL_DESIGNATOR_CHEEK   0x27
 Cheek.
#define HID_PHYSICAL_QUALIFIER_NONE   (0 << 5)
 Not applicable.
#define HID_PHYSICAL_QUALIFIER_RIGHT   (1 << 5)
 Right.
#define HID_PHYSICAL_QUALIFIER_LEFT   (2 << 5)
 Left.
#define HID_PHYSICAL_QUALIFIER_BOTH   (3 << 5)
 Both.
#define HID_PHYSICAL_QUALIFIER_EITHER   (4 << 5)
 Either.
#define HID_PHYSICAL_QUALIFIER_CENTER   (5 << 5)
 Center.
#define HID_PAGE_UNDEFINED   0x00
 Undefined.
#define HID_PAGE_GENERIC_DESKTOP   0x01
 Generic Desktop Page.
#define HID_PAGE_SIMULATION_CONTROLS   0x02
 Simulation Controls Page.
#define HID_PAGE_VR_CONTROLS   0x03
 VR Controls Page.
#define HID_PAGE_SPORT_CONTROLS   0x04
 Sport Controls Page.
#define HID_PAGE_GAME_CONTROLS   0x05
 Game Controls Page.
#define HID_PAGE_GENERIC_DEVICE_CONTROLS   0x06
 Generic Device Controls Page.
#define HID_PAGE_KEYBOARD_KEYPAD   0x07
 Keyboard/Keypad Page.
#define HID_PAGE_LED   0x08
 LED Page.
#define HID_PAGE_BUTTON   0x09
 Button Page.
#define HID_PAGE_ORDINAL   0x0A
 Ordinal Page.
#define HID_PAGE_TELEPHONY_DEVICE   0x0B
 Telephony Device Page.
#define HID_PAGE_CONSUMER   0x0C
 Consumer Page.
#define HID_PAGE_DIGITIZERS   0x0D
 Digitizers Page.
#define HID_PAGE_HAPTICS   0x0E
 Haptics Page.
#define HID_PAGE_PHYSICAL_INPUT_DEVICE   0x0F
 Physical Input Device Page.
#define HID_PAGE_UNICODE   0x10
 Unicode Page.
#define HID_PAGE_EYE_AND_HEAD_TRACKERS   0x12
 Eye and Head Trackers Page.
#define HID_PAGE_AUXILIARY_DISPLAY   0x14
 Auxiliary Display Page.
#define HID_PAGE_SENSORS   0x20
 Sensors Page.
#define HID_PAGE_MEDICAL_INSTRUMENT   0x40
 Medical Instrument Page.
#define HID_PAGE_BRAILLE_DISPLAY   0x41
 Braille Display Page.
#define HID_PAGE_LIGHTING_AND_ILLUMINATION   0x59
 Lighting And Illumination Page.
#define HID_PAGE_MONITOR   0x80
 Monitor Page.
#define HID_PAGE_MONITOR_ENUMERATED   0x81
 Monitor Enumerated Page.
#define HID_PAGE_VESA_VIRTUAL_CONTROLS   0x82
 VESA Virtual Controls Page.
#define HID_PAGE_POWER   0x84
 Power Page.
#define HID_PAGE_BATTERY_SYSTEM   0x85
 Battery System Page.
#define HID_PAGE_BARCODE_SCANNER   0x8C
 Barcode Scanner Page.
#define HID_PAGE_SCALES   0x8D
 Scales Page.
#define HID_PAGE_MAGNETIC_STRIPE_READER   0x8E
 Magnetic Stripe Reader Page.
#define HID_PAGE_CAMERA_CONTROL   0x90
 Camera Control Page.
#define HID_PAGE_ARCADE   0x91
 Arcade Page.
#define HID_PAGE_GAMING_DEVICE   0x92
 Gaming Device Page.
#define HID_PAGE_FIDO_ALLIANCE   0xF1D0
 FIDO Alliance Page.
#define HID_PAGE_VENDOR_MINIMUM   0xFF00
 Vendor-defined.
#define HID_PAGE_VENDOR_MAXIMUM   0xFFFF
 Vendor-defined.
#define HID_DESKTOP_UNDEFINED   0x00
 Undefined.
#define HID_DESKTOP_POINTER   0x01
 Pointer.
#define HID_DESKTOP_MOUSE   0x02
 Mouse.
#define HID_DESKTOP_JOYSTICK   0x04
 Joystick.
#define HID_DESKTOP_GAMEPAD   0x05
 Gamepad.
#define HID_DESKTOP_KEYBOARD   0x06
 Keyboard.
#define HID_DESKTOP_KEYPAD   0x07
 Keypad.
#define HID_DESKTOP_MULTI_AXIS_CONTROLLER   0x08
 Multi-axis Controller.
#define HID_DESKTOP_TABLET_PC_SYSTEM_CONTROLS   0x09
 Tablet PC System Controls.
#define HID_DESKTOP_WATER_COOLING_DEVICE   0x0A
 Water Cooling Device.
#define HID_DESKTOP_COMPUTER_CHASSIS_DEVICE   0x0B
 Computer Chassis Device.
#define HID_DESKTOP_WIRELESS_RADIO_CONTROLS   0x0C
 Wireless Radio Controls.
#define HID_DESKTOP_PORTABLE_DEVICE_CONTROL   0x0D
 Portable Device Control.
#define HID_DESKTOP_SYSTEM_MULTI_AXIS_CONTROLLER   0x0E
 System Multi-Axis Controller.
#define HID_DESKTOP_SPATIAL_CONTROLLER   0x0F
 Spatial Controller.
#define HID_DESKTOP_ASSISTIVE_CONTROL   0x10
 Assistive Control.
#define HID_DESKTOP_DEVICE_DOCK   0x11
 Device Dock.
#define HID_DESKTOP_DOCKABLE_DEVICE   0x12
 Dockable Device.
#define HID_DESKTOP_CALL_STATE_MANAGEMENT_CONTROL   0x13
 Call State Management Control.
#define HID_DESKTOP_X   0x30
 X.
#define HID_DESKTOP_Y   0x31
 Y.
#define HID_DESKTOP_Z   0x32
 Z.
#define HID_DESKTOP_RX   0x33
 Rx.
#define HID_DESKTOP_RY   0x34
 Ry.
#define HID_DESKTOP_RZ   0x35
 Rz.
#define HID_DESKTOP_SLIDER   0x36
 Slider.
#define HID_DESKTOP_DIAL   0x37
 Dial.
#define HID_DESKTOP_WHEEL   0x38
 Wheel.
#define HID_DESKTOP_HAT_SWITCH   0x39
 Hat Switch.
#define HID_DESKTOP_COUNTED_BUFFER   0x3A
 Counted Buffer.
#define HID_DESKTOP_BYTE_COUNT   0x3B
 Byte Count.
#define HID_DESKTOP_MOTION_WAKEUP   0x3C
 Motion Wakeup.
#define HID_DESKTOP_START   0x3D
 Start.
#define HID_DESKTOP_SELECT   0x3E
 Select.
#define HID_DESKTOP_VX   0x40
 Vx.
#define HID_DESKTOP_VY   0x41
 Vy.
#define HID_DESKTOP_VZ   0x42
 Vz.
#define HID_DESKTOP_VBRX   0x43
 Vbrx.
#define HID_DESKTOP_VBRY   0x44
 Vbry.
#define HID_DESKTOP_VBRZ   0x45
 Vbrz.
#define HID_DESKTOP_VNO   0x46
 Vno.
#define HID_DESKTOP_FEATURE_NOTIFICATION   0x47
 Feature Notification.
#define HID_DESKTOP_RESOLUTION_MULTIPLIER   0x48
 Resolution Multiplier.
#define HID_DESKTOP_QX   0x49
 Qx.
#define HID_DESKTOP_QY   0x4A
 Qy.
#define HID_DESKTOP_QZ   0x4B
 Qz.
#define HID_DESKTOP_QW   0x4C
 Qw.
#define HID_LED_UNDEFINED   00
 Undefined.
#define HID_LED_NUM_LOCK   01
 Num Lock.
#define HID_LED_CAPS_LOCK   02
 Caps Lock.
#define HID_LED_SCROLL_LOCK   03
 Scroll Lock.
#define HID_LED_COMPOSE   04
 Compose.
#define HID_LED_KANA   05
 Kana.
#define HID_LED_POWER   06
 Power.
#define HID_LED_SHIFT   07
 Shift.
#define HID_LED_DO_NOT_DISTURB   08
 Do Not Disturb.
#define HID_LED_MUTE   09
 Mute.
#define HID_BUTTON_NONE   0
#define HID_BUTTON_1   1
#define HID_BUTTON_2   2
#define HID_BUTTON_3   3
#define HID_BUTTON_4   4
#define HID_BUTTON_5   5
#define HID_BUTTON_PRIMARY   HID_BUTTON_1
#define HID_BUTTON_SECONDARY   HID_BUTTON_2
#define HID_BUTTON_TERTIARY   HID_BUTTON_3
#define HID_BUTTON_65535   0xFFFF
#define HID_DIGITIZERS_UNDEFINED   0x00
 Undefined.
#define HID_DIGITIZERS_DIGITIZER   0x01
 Digitizer.
#define HID_DIGITIZERS_PEN   0x02
 Pen.
#define HID_DIGITIZERS_LIGHT_PEN   0x03
 Light Pen.
#define HID_DIGITIZERS_TOUCH_SCREEN   0x04
 Touch Screen.
#define HID_DIGITIZERS_TOUCH_PAD   0x05
 Touch Pad.
#define HID_DIGITIZERS_WHITEBOARD   0x06
 Whiteboard.
#define HID_DIGITIZERS_COORD_MEASURING   0x07
 Coordinate Measuring Machine.
#define HID_DIGITIZERS_3D_DIGITIZER   0x08
 3D Digitizer
#define HID_DIGITIZERS_STEREO_PLOTTER   0x09
 Stereo Plotter.
#define HID_DIGITIZERS_ARTICULATED_ARM   0x0A
 Articulated Arm.
#define HID_DIGITIZERS_ARMATURE   0x0B
 Armature.
#define HID_DIGITIZERS_MULTI_POINT_DIGITIZER   0x0C
 Multiple Point Digitizer.
#define HID_DIGITIZERS_FREE_SPACE_WAND   0x0D
 Free Space Wand.
#define HID_DIGITIZERS_DEVICE_CONFIGURATION   0x0E
 Device Configuration.
#define HID_DIGITIZERS_CAPACITIVE_HEAT_MAP   0x0F
 Capacitive Heat Map Digitizer.
#define HID_DIGITIZERS_STYLUS   0x20
 Stylus.
#define HID_DIGITIZERS_PUCK   0x21
 Puck.
#define HID_DIGITIZERS_FINGER   0x22
 Finger.
#define HID_DIGITIZERS_DEVICE_SETTINGS   0x23
 Device settings.
#define HID_DIGITIZERS_CHARACTER_GESTURE   0x24
 Character Gesture.
#define HID_DIGITIZERS_TIP_PRESSURE   0x30
 Tip Pressure.
#define HID_DIGITIZERS_BARREL_PRESSURE   0x31
 Barrel Pressure.
#define HID_DIGITIZERS_IN_RANGE   0x32
 In Range.
#define HID_DIGITIZERS_TOUCH   0x33
 Touch.
#define HID_DIGITIZERS_UNTOUCH   0x34
 Untouch.
#define HID_DIGITIZERS_TAP   0x35
 Tap.
#define HID_DIGITIZERS_QUALITY   0x36
 Quality.
#define HID_DIGITIZERS_DATA_VALID   0x37
 Data Valid.
#define HID_DIGITIZERS_TRANSDUCER_INDEX   0x38
 Transducer Index.
#define HID_DIGITIZERS_TABLET_FUNCTION_KEYS   0x39
 Tablet Function Keys.
#define HID_DIGITIZERS_PROGRAM_CHANGE_KEYS   0x3A
 Program Change Keys.
#define HID_DIGITIZERS_BATTERY_STRENGTH   0x3B
 Battery Strength.
#define HID_DIGITIZERS_INVERT   0x3C
 Invert.
#define HID_DIGITIZERS_X_TILT   0x3D
 X Tilt.
#define HID_DIGITIZERS_Y_TILT   0x3E
 Y Tilt.
#define HID_DIGITIZERS_AZIMUTH   0x3F
 Azimuth.
#define HID_DIGITIZERS_ALTITUDE   0x40
 Altitude.
#define HID_DIGITIZERS_TWIST   0x41
 Twist.
#define HID_DIGITIZERS_TIP_SWITCH   0x42
 Tip Switch.
#define HID_DIGITIZERS_SECONDARY_TIP_SWITCH   0x43
 Secondary Tip Switch.
#define HID_DIGITIZERS_BARREL_SWITCH   0x44
 Barrel Switch.
#define HID_DIGITIZERS_ERASER   0x45
 Eraser.
#define HID_DIGITIZERS_TABLET_PICK   0x46
 Tablet Pick.
#define HID_DIGITIZERS_TOUCH_VALID   0x47
 Touch Valid (Confidence).
#define HID_DIGITIZERS_WIDTH   0x48
 Width.
#define HID_DIGITIZERS_HEIGHT   0x49
 Height.
#define HID_DIGITIZERS_CONTACT_IDENTIFIER   0x51
 Contact Identifier.
#define HID_DIGITIZERS_DEVICE_MODE   0x52
 Device Mode.
#define HID_DIGITIZERS_DEVICE_IDENTIFIER   0x53
 Device Identifier.
#define HID_DIGITIZERS_CONTACT_COUNT   0x54
 Contact Count.
#define HID_DIGITIZERS_CONTACT_COUNT_MAXIMUM   0x55
 Contact Count Maximum.
#define HID_DIGITIZERS_SCAN_TIME   0x56
 Scan Time.

Typedefs

typedef struct _HID_DESCRIPTOR HID_DESCRIPTOR
typedef void HID_REPORT_DESCRIPTOR
typedef struct _HID_PHYSICAL_DESCRIPTOR HID_PHYSICAL_DESCRIPTOR
typedef struct _HID_PHYSICAL_DESCRIPTOR_SET0 HID_PHYSICAL_DESCRIPTOR_SET0
typedef struct _HID_PHYSICAL_DESCRIPTOR_SET HID_PHYSICAL_DESCRIPTOR_SET
typedef struct _HID_STATE HID_STATE
typedef struct _HID_STACK HID_STACK
typedef struct _HID_USAGE HID_USAGE
typedef struct _HID_REPORT HID_REPORT
 Forward declared to satisfy HIDUsage.
typedef struct _HID_COLLECTION HID_COLLECTION
 Forward declared to satisfy HIDReport.
typedef struct _HID_DEVICE HID_DEVICE
 Forward declared to satisfy HIDCollection.
typedef struct _HID_CONSUMER HID_CONSUMER
 Forward declared to satisfy HIDCollection.
typedef uint32_t STDCALL(* hid_device_enumerate_cb) (HID_DEVICE *device, void *data)
typedef uint32_t STDCALL(* hid_device_notification_cb) (DEVICE *device, void *data, uint32_t notification)
typedef uint32_t STDCALL(* hid_device_get_idle_proc) (HID_DEVICE *device, uint16_t *duration, uint8_t reportid)
typedef uint32_t STDCALL(* hid_device_set_idle_proc) (HID_DEVICE *device, uint16_t duration, uint8_t reportid)
typedef uint32_t STDCALL(* hid_device_get_report_proc) (HID_DEVICE *device, uint8_t reporttype, uint8_t reportid, void *reportdata, uint32_t reportsize)
typedef uint32_t STDCALL(* hid_device_set_report_proc) (HID_DEVICE *device, uint8_t reporttype, uint8_t reportid, void *reportdata, uint32_t reportsize)
typedef uint32_t STDCALL(* hid_device_allocate_report_proc) (HID_DEVICE *device, HID_COLLECTION *collection, uint8_t reportid, uint32_t reportsize)
typedef uint32_t STDCALL(* hid_device_release_report_proc) (HID_DEVICE *device, uint8_t reportid)
typedef uint32_t STDCALL(* hid_device_submit_report_proc) (HID_DEVICE *device, uint8_t reportid)
typedef uint32_t STDCALL(* hid_device_cancel_report_proc) (HID_DEVICE *device, uint8_t reportid)
typedef uint32_t STDCALL(* hid_device_get_protocol_proc) (HID_DEVICE *device, uint8_t *protocol)
typedef uint32_t STDCALL(* hid_device_set_protocol_proc) (HID_DEVICE *device, uint8_t protocol)
typedef uint32_t STDCALL(* hid_device_get_interval_proc) (HID_DEVICE *device, uint32_t *interval)
typedef uint32_t STDCALL(* hid_device_set_interval_proc) (HID_DEVICE *device, uint32_t interval)
typedef uint32_t STDCALL(* hid_device_get_report_descriptor_proc) (HID_DEVICE *device, HID_REPORT_DESCRIPTOR *descriptor, uint32_t size)
typedef uint32_t STDCALL(* hid_device_get_physical_descriptor_set0_proc) (HID_DEVICE *device, HID_PHYSICAL_DESCRIPTOR_SET0 *descriptor)
typedef uint32_t STDCALL(* hid_device_get_physical_descriptor_set_proc) (HID_DEVICE *device, HID_PHYSICAL_DESCRIPTOR_SET *descriptor, uint8_t index, uint32_t size)
typedef uint32_t STDCALL(* hid_consumer_enumerate_cb) (HID_CONSUMER *consumer, void *data)
typedef uint32_t STDCALL(* hid_device_bind_proc) (HID_DEVICE *device)
typedef uint32_t STDCALL(* hid_device_unbind_proc) (HID_DEVICE *device)
typedef uint32_t STDCALL(* hid_collection_bind_proc) (HID_DEVICE *device, HID_COLLECTION *collection)
typedef uint32_t STDCALL(* hid_collection_unbind_proc) (HID_DEVICE *device, HID_COLLECTION *collection)
typedef uint32_t STDCALL(* hid_report_receive_proc) (HID_COLLECTION *collection, uint8_t reportid, void *reportdata, uint32_t reportsize)
typedef struct _HID_EXTENT HID_EXTENT
typedef struct _HID_FIELD HID_FIELD
typedef struct _HID_DEFINITION HID_DEFINITION

Functions

uint32_t STDCALL hid_parser_parse_collections (HID_DEVICE *device, HID_COLLECTION **collections, uint32_t *count)
 Parse the HID report descriptor of the provided device and populate the collections, reports and usages.
uint32_t STDCALL hid_parser_free_collections (HID_COLLECTION *collections, uint32_t count)
 Free the collections, reports and usages parsed from a HID report descriptor.
uint32_t STDCALL hid_parser_count_collections (HID_DEVICE *device, HID_COLLECTION *parent)
 Count the number of collections found in the HID report descriptor of the provided device.
uint32_t STDCALL hid_parser_count_reports (HID_DEVICE *device, HID_COLLECTION *collection)
 Count the number of reports found in the HID report descriptor of the supplied device and collection.
uint32_t STDCALL hid_parser_count_usages (HID_DEVICE *device, HID_REPORT *report)
 Count the number of usages found in the HID report descriptor for the supplied device and report.
HID_COLLECTION *STDCALL hid_parser_allocate_collection (HID_DEVICE *device, HID_COLLECTION *parent, HID_STATE *state, uint32_t flags, uint32_t start)
 Allocate a HID collection to contain a set of reports and usages from a HID report descriptor.
HID_REPORT *STDCALL hid_parser_allocate_report (HID_DEVICE *device, HID_COLLECTION *collection, HID_STATE *state, uint8_t kind, uint32_t flags, uint32_t index, uint32_t sequence)
 Allocate a HID report to contain a set of usages from a HID report descriptor.
HID_USAGE *STDCALL hid_parser_allocate_usage (HID_DEVICE *device, HID_REPORT *report, HID_STATE *state, uint32_t index)
 Allocate a HID usage from a HID report descriptor.
BOOL STDCALL hid_parser_update_usage (HID_DEVICE *device, HID_REPORT *report, HID_STATE *state, HID_USAGE *usage)
 Update a HID usage from a HID report descriptor.
BOOL STDCALL hid_parser_free_usage (HID_DEVICE *device, HID_USAGE *usage)
 Free a HID usage and any associated usage aliases.
uint32_t STDCALL hid_parser_pop_stack (HID_STACK *stack, HID_STATE *state)
 Replace the current HID parser state with the top item from the parser stack.
uint32_t STDCALL hid_parser_push_stack (HID_STACK *stack)
 Place a copy of the current HID parser state on top of the parser stack.
uint32_t STDCALL hid_parser_free_stack (HID_STACK *stack)
 Free the HID parser stack and state.
uint32_t STDCALL hid_parser_reset_state (HID_STATE *state)
 Clear the Local and Global HID parser state.
uint32_t STDCALL hid_parser_clean_state (HID_STATE *state)
 Clear the Local HID parser state.
HID_COLLECTION *STDCALL hid_find_collection (HID_DEVICE *device, uint16_t page, uint16_t usage)
 Find the first HID collection matching the specified page and usage.
uint32_t STDCALL hid_find_report_ids (HID_DEVICE *device, HID_COLLECTION *collection, uint8_t *minid, uint8_t *maxid)
 Find the minimum and maximum report ids contained in the specified HID collection or all collections.
uint32_t STDCALL hid_find_report_sizes (HID_DEVICE *device, HID_COLLECTION *collection, uint8_t kind, uint32_t *minsize, uint32_t *maxsize)
 Find the minimum and maximum report sizes contained in the specified HID collection or all collections.
uint32_t STDCALL hid_count_reports (HID_DEVICE *device, HID_COLLECTION *collection, uint8_t kind, uint8_t id, uint32_t *count)
 Count the number of HID reports of the specified type and id in the specified collection.
uint32_t STDCALL hid_find_reports (HID_DEVICE *device, HID_COLLECTION *collection, uint8_t kind, uint8_t id, HID_REPORT *reports, uint32_t count)
 Find all HID reports of the specified type and id in the specified collection.
HID_DEFINITION *STDCALL hid_allocate_definition (HID_DEVICE *device, HID_COLLECTION *collection, uint8_t kind, uint8_t id)
 Allocate a HID definition to describe an input, output or feature report contained in the specified collection.
uint32_t STDCALL hid_free_definition (HID_DEFINITION *definition)
 Free a HID definition describing an input, output or feature report.
uint32_t STDCALL hid_insert_bit_field (HID_FIELD *field, void *buffer, uint32_t size, BOOL value)
 Insert a bit field value into a report buffer.
uint32_t STDCALL hid_insert_signed_field (HID_FIELD *field, void *buffer, uint32_t size, int32_t value)
 Insert a signed field value into a report buffer.
uint32_t STDCALL hid_insert_unsigned_field (HID_FIELD *field, void *buffer, uint32_t size, uint32_t value)
 Insert an unsigned field value into a report buffer.
uint32_t STDCALL hid_extract_bit_field (HID_FIELD *field, void *buffer, uint32_t size, BOOL *value)
 Extract a bit field value from a report buffer.
uint32_t STDCALL hid_extract_signed_field (HID_FIELD *field, void *buffer, uint32_t size, int32_t *value)
 Extract a signed field value from a report buffer.
uint32_t STDCALL hid_extract_unsigned_field (HID_FIELD *field, void *buffer, uint32_t size, uint32_t *value)
 Extract an unsigned field value from a report buffer.
uint32_t STDCALL hid_device_set_state (HID_DEVICE *device, uint32_t state)
 Set the state of the specified HID device and send a notification.
uint32_t STDCALL hid_device_get_idle (HID_DEVICE *device, uint16_t *duration, uint8_t reportid)
 Get the idle rate from a HID device for the specified report id.
uint32_t STDCALL hid_device_set_idle (HID_DEVICE *device, uint16_t duration, uint8_t reportid)
 Set the idle rate on a HID device for the specified report id.
uint32_t STDCALL hid_device_get_report (HID_DEVICE *device, uint8_t reporttype, uint8_t reportid, void *reportdata, uint32_t reportsize)
 Read a report by type and id from a HID device.
uint32_t STDCALL hid_device_set_report (HID_DEVICE *device, uint8_t reporttype, uint8_t reportid, void *reportdata, uint32_t reportsize)
 Write a report by type and id to a HID device.
uint32_t STDCALL hid_device_allocate_report (HID_DEVICE *device, HID_COLLECTION *collection, uint8_t reportid, uint32_t reportsize)
 Allocate and initialize an input report by id on a HID device.
uint32_t STDCALL hid_device_release_report (HID_DEVICE *device, uint8_t reportid)
 Release an input report by id from a HID device.
uint32_t STDCALL hid_device_submit_report (HID_DEVICE *device, uint8_t reportid)
 Submit an input report by id on a HID device.
uint32_t STDCALL hid_device_cancel_report (HID_DEVICE *device, uint8_t reportid)
 Cancel an input report by id on a HID device.
uint32_t STDCALL hid_device_get_protocol (HID_DEVICE *device, uint8_t *protocol)
 Get the report protocol from a HID device.
uint32_t STDCALL hid_device_set_protocol (HID_DEVICE *device, uint8_t protocol)
 Set the report protocol for a HID device.
uint32_t STDCALL hid_device_get_interval (HID_DEVICE *device, uint32_t *interval)
 Get the polling interval from a HID device.
uint32_t STDCALL hid_device_set_interval (HID_DEVICE *device, uint32_t interval)
 Set the polling interval for a HID device.
uint32_t STDCALL hid_device_get_report_descriptor (HID_DEVICE *device, HID_REPORT_DESCRIPTOR *descriptor, uint32_t size)
 Get the Report Descriptor for a HID device.
uint32_t STDCALL hid_device_get_physical_descriptor_set0 (HID_DEVICE *device, HID_PHYSICAL_DESCRIPTOR_SET0 *descriptor)
 Get the HID Physical Descriptor Set 0 for a HID device.
uint32_t STDCALL hid_device_get_physical_descriptor_set (HID_DEVICE *device, HID_PHYSICAL_DESCRIPTOR_SET *descriptor, uint8_t index, uint32_t size)
 Get a HID Physical Descriptor Set for a HID device.
uint32_t STDCALL hid_device_bind_device (HID_DEVICE *device)
 Attempt to bind a HID device to one of the registered consumers.
uint32_t STDCALL hid_device_unbind_device (HID_DEVICE *device, HID_CONSUMER *consumer)
 Unbind a HID device from a consumer.
uint32_t STDCALL hid_device_bind_collections (HID_DEVICE *device)
 Attempt to bind the HID collections in the specified device to one of the registered consumers.
uint32_t STDCALL hid_device_unbind_collections (HID_DEVICE *device, HID_CONSUMER *consumer)
 Unbind the HID collections in the specified device from a consumer.
HID_DEVICE *STDCALL hid_device_create (void)
 Create a new HID device entry.
HID_DEVICE *STDCALL hid_device_create_ex (uint32_t size)
 Create a new HID device entry.
uint32_t STDCALL hid_device_destroy (HID_DEVICE *device)
 Destroy an existing HID device entry.
uint32_t STDCALL hid_device_register (HID_DEVICE *device)
 Register a new HID device in the HID device table.
uint32_t STDCALL hid_device_deregister (HID_DEVICE *device)
 Deregister a HID device from the HID device table.
HID_DEVICE *STDCALL hid_device_find (uint32_t hidid)
 Find a HID device by ID in the HID device table.
HID_DEVICE *STDCALL hid_device_find_by_name (const char *name)
 Find a HID device by name in the device table.
HID_DEVICE *STDCALL hid_device_find_by_description (const char *description)
 Find a HID device by description in the device table.
uint32_t STDCALL hid_device_enumerate (hid_device_enumerate_cb callback, void *data)
 Enumerate all HID devices in the HID device table.
uint32_t STDCALL hid_device_notification (HID_DEVICE *device, hid_device_notification_cb callback, void *data, uint32_t notification, uint32_t flags)
 Register a notification for HID device changes.
HID_CONSUMER *STDCALL hid_consumer_create (void)
 Create a new HID Consumer entry.
HID_CONSUMER *STDCALL hid_consumer_create_ex (uint32_t size)
 Create a new HID Consumer entry.
uint32_t STDCALL hid_consumer_destroy (HID_CONSUMER *consumer)
 Destroy an existing HID Consumer entry.
uint32_t STDCALL hid_consumer_register (HID_CONSUMER *consumer)
 Register a new Consumer in the HID Consumer table.
uint32_t STDCALL hid_consumer_deregister (HID_CONSUMER *consumer)
 Deregister a Consumer from the HID Consumer table.
HID_CONSUMER *STDCALL hid_consumer_find (uint32_t consumerid)
 Find a consumer by Id in the HID Consumer table.
HID_CONSUMER *STDCALL hid_consumer_find_by_name (const char *name)
 Find a consumer by name in the Driver table.
uint32_t STDCALL hid_consumer_enumerate (hid_consumer_enumerate_cb callback, void *data)
 Enumerate all consumers in the HID Consumer table.
BOOL STDCALL hid_is_bit_field (HID_FIELD *field)
 Return True if the supplied field contains a 1 bit value.
BOOL STDCALL hid_is_byte_field (HID_FIELD *field)
 Return True if the supplied HID field contains a 1 byte value.
BOOL STDCALL hid_is_word_field (HID_FIELD *field)
 Return True if the supplied HID field contains a 2 byte value.
BOOL STDCALL hid_is_long_field (HID_FIELD *field)
 Return True if the supplied HID field contains a 3 or 4 byte value.
BOOL STDCALL hid_is_signed_field (HID_FIELD *field)
 Return True if the supplied HID field contains a signed value.
uint32_t STDCALL hid_page_to_string (uint16_t page, char *string, uint32_t len)
 Return a string describing a HID usage page.
uint32_t STDCALL hid_usage_to_string (uint16_t page, uint16_t usage, uint16_t count, char *string, uint32_t len)
 Return a string describing a HID usage within the given page.
uint32_t STDCALL hid_unit_type_to_string (uint32_t unittype, char *string, uint32_t len)
 Return a string describing a HID unit type.
uint32_t STDCALL hid_report_kind_to_string (uint8_t kind, char *string, uint32_t len)
 Return a string describing a HID report type.
uint32_t STDCALL hid_report_flags_to_string (uint32_t flags, char *string, uint32_t len)
 Return a string describing the flags of a HID report.
uint32_t STDCALL hid_collection_flags_to_string (uint32_t flags, char *string, uint32_t len)
 Return a string describing the flags of a HID collection.
uint32_t STDCALL hid_device_get_count (void)
 Get the current HID Device count.
HID_DEVICE *STDCALL hid_device_check (HID_DEVICE *device)
 Check if the supplied HID Device is in the device table.
uint32_t STDCALL hid_device_type_to_string (uint32_t hidtype, char *string, uint32_t len)
 Return a string describing the HID device type (eg HID_TYPE_USB).
uint32_t STDCALL hid_device_state_to_string (uint32_t hidstate, char *string, uint32_t len)
 Return a string describing the HID device state (eg HID_STATE_ATTACHED).
uint32_t STDCALL hid_device_state_to_notification (uint32_t state)
 Convert a Device state value into the notification code for device notifications.
uint32_t STDCALL hid_consumer_get_count (void)
 Get the current HID Consumer count.
HID_CONSUMER *STDCALL hid_consumer_check (HID_CONSUMER *consumer)
 Check if the supplied HID Consumer is in the consumer table.

Variables

struct _HID_DESCRIPTOR PACKED

Macro Definition Documentation

◆ HID_NAME_PREFIX

#define HID_NAME_PREFIX   "HID"

Name prefix for HID Devices.

HID specific constants

◆ HID_TYPE_NONE

#define HID_TYPE_NONE   0

HID Device Types

◆ HID_TYPE_USB

#define HID_TYPE_USB   1

◆ HID_TYPE_MAX

#define HID_TYPE_MAX   1

◆ HID_STATE_DETACHED

#define HID_STATE_DETACHED   0

HID Device States

◆ HID_STATE_DETACHING

#define HID_STATE_DETACHING   1

◆ HID_STATE_ATTACHING

#define HID_STATE_ATTACHING   2

◆ HID_STATE_ATTACHED

#define HID_STATE_ATTACHED   3

◆ HID_STATE_MAX

#define HID_STATE_MAX   3

◆ HID_FLAG_NONE

#define HID_FLAG_NONE   0x00000000

HID Device Flags

◆ HID_SUBCLASS_NONE

#define HID_SUBCLASS_NONE   0

HID Interface Subclass types (See USB HID v1.11 specification)(Section 4.2)

◆ HID_SUBCLASS_BOOT

#define HID_SUBCLASS_BOOT   1

◆ HID_BOOT_PROTOCOL_NONE

#define HID_BOOT_PROTOCOL_NONE   0

HID Interface Protocol types (See USB HID v1.11 specification)(Section 4.3)

◆ HID_BOOT_PROTOCOL_KEYBOARD

#define HID_BOOT_PROTOCOL_KEYBOARD   1

◆ HID_BOOT_PROTOCOL_MOUSE

#define HID_BOOT_PROTOCOL_MOUSE   2

◆ HID_DESCRIPTOR_TYPE_HID

#define HID_DESCRIPTOR_TYPE_HID   0x21

HID Class Descriptor Types (See USB HID v1.11 specification)(Section 7.1)

◆ HID_DESCRIPTOR_TYPE_REPORT

#define HID_DESCRIPTOR_TYPE_REPORT   0x22

◆ HID_DESCRIPTOR_TYPE_PHYSICAL_DESCRIPTOR

#define HID_DESCRIPTOR_TYPE_PHYSICAL_DESCRIPTOR   0x23

◆ HID_REQUEST_GET_REPORT

#define HID_REQUEST_GET_REPORT   0x01

HID Request types (Section 7.2)

◆ HID_REQUEST_GET_IDLE

#define HID_REQUEST_GET_IDLE   0x02

◆ HID_REQUEST_GET_PROTOCOL

#define HID_REQUEST_GET_PROTOCOL   0x03

◆ HID_REQUEST_SET_REPORT

#define HID_REQUEST_SET_REPORT   0x09

◆ HID_REQUEST_SET_IDLE

#define HID_REQUEST_SET_IDLE   0x0A

◆ HID_REQUEST_SET_PROTOCOL

#define HID_REQUEST_SET_PROTOCOL   0x0B

◆ HID_PROTOCOL_BOOT

#define HID_PROTOCOL_BOOT   0

HID Protocol types (Section 7.2.5)

◆ HID_PROTOCOL_REPORT

#define HID_PROTOCOL_REPORT   1

◆ HID_REPORT_INPUT

#define HID_REPORT_INPUT   1

HID Report types (Section 7.2.1)

◆ HID_REPORT_OUTPUT

#define HID_REPORT_OUTPUT   2

◆ HID_REPORT_FEATURE

#define HID_REPORT_FEATURE   3

◆ HID_REPORTID_NONE

#define HID_REPORTID_NONE   0

HID Report IDs (Section 7.2.1)

◆ HID_SIZE_0

#define HID_SIZE_0   (0 << 0)

HID Item Sizes (Section 6.2.2.2)

◆ HID_SIZE_1

#define HID_SIZE_1   (1 << 0)

◆ HID_SIZE_2

#define HID_SIZE_2   (2 << 0)

◆ HID_SIZE_4

#define HID_SIZE_4   (3 << 0)

◆ HID_SIZE_MASK

#define HID_SIZE_MASK   0x03

◆ HID_TYPE_MAIN

#define HID_TYPE_MAIN   (0 << 2)

HID Item Types (Section 6.2.2.2)

◆ HID_TYPE_GLOBAL

#define HID_TYPE_GLOBAL   (1 << 2)

◆ HID_TYPE_LOCAL

#define HID_TYPE_LOCAL   (2 << 2)

◆ HID_TYPE_RESERVED

#define HID_TYPE_RESERVED   (3 << 2)

◆ HID_TYPE_MASK

#define HID_TYPE_MASK   0x0C

◆ HID_TAG_MAIN_INPUT

#define HID_TAG_MAIN_INPUT   0x80

Input.

HID Item Tags (Section 6.2.2.1) HID Main Item Tags (Section 6.2.2.4)

◆ HID_TAG_MAIN_OUTPUT

#define HID_TAG_MAIN_OUTPUT   0x90

Output.

◆ HID_TAG_MAIN_FEATURE

#define HID_TAG_MAIN_FEATURE   0xB0

Feature.

◆ HID_TAG_MAIN_COLLECTION

#define HID_TAG_MAIN_COLLECTION   0xA0

Collection.

◆ HID_TAG_MAIN_END_COLLECTION

#define HID_TAG_MAIN_END_COLLECTION   0xC0

End Collection.

◆ HID_TAG_GLOBAL_USAGE_PAGE

#define HID_TAG_GLOBAL_USAGE_PAGE   0x04

Usage Page.

HID Global Item Tags (Section 6.2.2.7)

◆ HID_TAG_GLOBAL_LOGICAL_MINIMUM

#define HID_TAG_GLOBAL_LOGICAL_MINIMUM   0x14

Logical Minimum.

◆ HID_TAG_GLOBAL_LOGICAL_MAXIMUM

#define HID_TAG_GLOBAL_LOGICAL_MAXIMUM   0x24

Logical Maximum.

◆ HID_TAG_GLOBAL_PHYSICAL_MINIMUM

#define HID_TAG_GLOBAL_PHYSICAL_MINIMUM   0x34

Physical Minimum.

◆ HID_TAG_GLOBAL_PHYSICAL_MAXIMUM

#define HID_TAG_GLOBAL_PHYSICAL_MAXIMUM   0x44

Physical Maximum.

◆ HID_TAG_GLOBAL_UNIT_EXPONENT

#define HID_TAG_GLOBAL_UNIT_EXPONENT   0x54

Unit Exponent.

◆ HID_TAG_GLOBAL_UNIT

#define HID_TAG_GLOBAL_UNIT   0x64

Unit.

◆ HID_TAG_GLOBAL_REPORT_SIZE

#define HID_TAG_GLOBAL_REPORT_SIZE   0x74

Report Size.

◆ HID_TAG_GLOBAL_REPORT_ID

#define HID_TAG_GLOBAL_REPORT_ID   0x84

Report ID.

◆ HID_TAG_GLOBAL_REPORT_COUNT

#define HID_TAG_GLOBAL_REPORT_COUNT   0x94

Report Count.

◆ HID_TAG_GLOBAL_PUSH

#define HID_TAG_GLOBAL_PUSH   0xA4

Push.

◆ HID_TAG_GLOBAL_POP

#define HID_TAG_GLOBAL_POP   0xB4

Pop.

◆ HID_TAG_LOCAL_USAGE

#define HID_TAG_LOCAL_USAGE   0x08

Usage.

HID Local Item Tags (Section 6.2.2.8)

◆ HID_TAG_LOCAL_USAGE_MINIMUM

#define HID_TAG_LOCAL_USAGE_MINIMUM   0x18

Usage Minimum.

◆ HID_TAG_LOCAL_USAGE_MAXIMUM

#define HID_TAG_LOCAL_USAGE_MAXIMUM   0x28

Usage Maximum.

◆ HID_TAG_LOCAL_DESIGNATOR_INDEX

#define HID_TAG_LOCAL_DESIGNATOR_INDEX   0x38

Designator Index.

◆ HID_TAG_LOCAL_DESIGNATOR_MINIMUM

#define HID_TAG_LOCAL_DESIGNATOR_MINIMUM   0x48

Designator Minimum.

◆ HID_TAG_LOCAL_DESIGNATOR_MAXIMUM

#define HID_TAG_LOCAL_DESIGNATOR_MAXIMUM   0x58

Designator Maximum.

◆ HID_TAG_LOCAL_STRING_INDEX

#define HID_TAG_LOCAL_STRING_INDEX   0x78

String Index.

◆ HID_TAG_LOCAL_STRING_MINIMUM

#define HID_TAG_LOCAL_STRING_MINIMUM   0x88

String Minimum.

◆ HID_TAG_LOCAL_STRING_MAXIMUM

#define HID_TAG_LOCAL_STRING_MAXIMUM   0x98

String Maximum.

◆ HID_TAG_LOCAL_DELIMITER

#define HID_TAG_LOCAL_DELIMITER   0xA8

Delimiter.

◆ HID_TAG_LONG

#define HID_TAG_LONG   0xFC

Always HID_SIZE_2 (Followed by 1 byte DataSize / 1 byte LongItemTag / n bytes Data).

◆ HID_TAG_MASK

#define HID_TAG_MASK   0xFC

◆ HID_MAIN_ITEM_CONSTANT

#define HID_MAIN_ITEM_CONSTANT   (1 << 0)

Data (0) | Constant (1).

HID Main Item Input, Ouput and Feature Values (Section 6.2.2.5)

◆ HID_MAIN_ITEM_VARIABLE

#define HID_MAIN_ITEM_VARIABLE   (1 << 1)

Array (0) | Variable (1).

◆ HID_MAIN_ITEM_RELATIVE

#define HID_MAIN_ITEM_RELATIVE   (1 << 2)

Absolute (0) | Relative (1).

◆ HID_MAIN_ITEM_WRAP

#define HID_MAIN_ITEM_WRAP   (1 << 3)

No Wrap (0) | Wrap (1).

◆ HID_MAIN_ITEM_NON_LINEAR

#define HID_MAIN_ITEM_NON_LINEAR   (1 << 4)

Linear (0) | Non Linear (1).

◆ HID_MAIN_ITEM_NO_PREFERRED

#define HID_MAIN_ITEM_NO_PREFERRED   (1 << 5)

Preferred State (0) | No Preferred (1).

◆ HID_MAIN_ITEM_NULL_STATE

#define HID_MAIN_ITEM_NULL_STATE   (1 << 6)

No Null position (0) | Null state(1).

◆ HID_MAIN_ITEM_RESERVED1

#define HID_MAIN_ITEM_RESERVED1   (1 << 7)

Reserved (0).

◆ HID_MAIN_ITEM_BUFFERED_BYTES

#define HID_MAIN_ITEM_BUFFERED_BYTES   (1 << 8)

Bit Field (0) | Buffered Bytes (1).

◆ HID_MAIN_ITEM_RESERVED2

#define HID_MAIN_ITEM_RESERVED2   (0xFFFFFE00 << 9)

Reserved (0).

◆ HID_MAIN_COLLECTION_PHYSICAL

#define HID_MAIN_COLLECTION_PHYSICAL   0x00

Physical (Group of axes).

HID Main Item Collection Values (Section 6.2.2.6)

◆ HID_MAIN_COLLECTION_APPLICATION

#define HID_MAIN_COLLECTION_APPLICATION   0x01

Application (Mouse, Keyboard).

◆ HID_MAIN_COLLECTION_LOGICAL

#define HID_MAIN_COLLECTION_LOGICAL   0x02

Logical (Interrelated data).

◆ HID_MAIN_COLLECTION_REPORT

#define HID_MAIN_COLLECTION_REPORT   0x03

Report.

◆ HID_MAIN_COLLECTION_NAMED_ARRAY

#define HID_MAIN_COLLECTION_NAMED_ARRAY   0x04

Named Array.

◆ HID_MAIN_COLLECTION_USAGE_SWITCH

#define HID_MAIN_COLLECTION_USAGE_SWITCH   0x05

Usage Switch.

◆ HID_MAIN_COLLECTION_USAGE_MODIFIER

#define HID_MAIN_COLLECTION_USAGE_MODIFIER   0x06

Usage Modifier.

◆ HID_GLOBAL_UNIT_SYSTEM_MASK

#define HID_GLOBAL_UNIT_SYSTEM_MASK   0xF

System of Measurement.

0x07 to 0x7F Reserved 0x80 to 0xFF Vendor Defined HID Global Item Unit Values (Section 6.2.2.7) For more information see https://physics.nist.gov/cuu/Units/units.html

◆ HID_GLOBAL_UNIT_SYSTEM_SHIFT

#define HID_GLOBAL_UNIT_SYSTEM_SHIFT   0

◆ HID_GLOBAL_UNIT_SYSTEM_NONE

#define HID_GLOBAL_UNIT_SYSTEM_NONE   0

◆ HID_GLOBAL_UNIT_SYSTEM_SI_LINEAR

#define HID_GLOBAL_UNIT_SYSTEM_SI_LINEAR   1

SI linear unit.

◆ HID_GLOBAL_UNIT_SYSTEM_SI_ROTATION

#define HID_GLOBAL_UNIT_SYSTEM_SI_ROTATION   2

SI rotational units.

◆ HID_GLOBAL_UNIT_SYSTEM_ENGLISH_LINEAR

#define HID_GLOBAL_UNIT_SYSTEM_ENGLISH_LINEAR   3

English (Imperial) linear units.

◆ HID_GLOBAL_UNIT_SYSTEM_ENGLISH_ROTATION

#define HID_GLOBAL_UNIT_SYSTEM_ENGLISH_ROTATION   4

English (Imperial) rotational units.

◆ HID_GLOBAL_UNIT_LENGTH_MASK

#define HID_GLOBAL_UNIT_LENGTH_MASK   0xF

Length (Centimeters in SI, Inches in English).

◆ HID_GLOBAL_UNIT_LENGTH_SHIFT

#define HID_GLOBAL_UNIT_LENGTH_SHIFT   4

◆ HID_GLOBAL_UNIT_ROTATION_MASK

#define HID_GLOBAL_UNIT_ROTATION_MASK   0xF

Rotation (Radians in SI, Degrees in English).

◆ HID_GLOBAL_UNIT_ROTATION_SHIFT

#define HID_GLOBAL_UNIT_ROTATION_SHIFT   4

◆ HID_GLOBAL_UNIT_MASS_MASK

#define HID_GLOBAL_UNIT_MASS_MASK   0xF

Mass (Grams in SI, Slugs in English).

◆ HID_GLOBAL_UNIT_MASS_SHIFT

#define HID_GLOBAL_UNIT_MASS_SHIFT   8

◆ HID_GLOBAL_UNIT_TIME_MASK

#define HID_GLOBAL_UNIT_TIME_MASK   0xF

Time (Seconds).

◆ HID_GLOBAL_UNIT_TIME_SHIFT

#define HID_GLOBAL_UNIT_TIME_SHIFT   12

◆ HID_GLOBAL_UNIT_TEMPERATURE_MASK

#define HID_GLOBAL_UNIT_TEMPERATURE_MASK   0xF

Temperature (Kelvin in SI, Fahrenheit in English).

◆ HID_GLOBAL_UNIT_TEMPERATURE_SHIFT

#define HID_GLOBAL_UNIT_TEMPERATURE_SHIFT   16

◆ HID_GLOBAL_UNIT_CURRENT_MASK

#define HID_GLOBAL_UNIT_CURRENT_MASK   0xF

Current (Amperes).

◆ HID_GLOBAL_UNIT_CURRENT_SHIFT

#define HID_GLOBAL_UNIT_CURRENT_SHIFT   20

◆ HID_GLOBAL_UNIT_LIGHT_MASK

#define HID_GLOBAL_UNIT_LIGHT_MASK   0xF

Luminous Intensity (Candelas).

◆ HID_GLOBAL_UNIT_LIGHT_SHIFT

#define HID_GLOBAL_UNIT_LIGHT_SHIFT   24

◆ HID_GLOBAL_UNIT_SI_ROTATION

#define HID_GLOBAL_UNIT_SI_ROTATION   0x00000012

Rotation (Radians).

Common HID Global Item Unit Values For a more detailed list see the k.0UNIT definitions in https://github.com/abend0c1/hidrdd/blob/master/rd.rex SI Base Units

◆ HID_GLOBAL_UNIT_SI_LENGTH

#define HID_GLOBAL_UNIT_SI_LENGTH   0x00000011

Length (Centimeters).

◆ HID_GLOBAL_UNIT_SI_MASS

#define HID_GLOBAL_UNIT_SI_MASS   0x00000101

Mass (Grams).

◆ HID_GLOBAL_UNIT_SI_TIME

#define HID_GLOBAL_UNIT_SI_TIME   0x00001001

Time (Seconds).

◆ HID_GLOBAL_UNIT_SI_TEMPERATURE

#define HID_GLOBAL_UNIT_SI_TEMPERATURE   0x00010001

Temperature (Kelvin).

◆ HID_GLOBAL_UNIT_SI_CURRENT

#define HID_GLOBAL_UNIT_SI_CURRENT   0x00100001

Current (Amperes).

◆ HID_GLOBAL_UNIT_SI_LIGHT

#define HID_GLOBAL_UNIT_SI_LIGHT   0x01000001

Luminous Intensity (Candelas).

◆ HID_GLOBAL_UNIT_SI_AREA

#define HID_GLOBAL_UNIT_SI_AREA   0x00000021

Area (Square Centimeters).

SI Derived Units

◆ HID_GLOBAL_UNIT_SI_VOLUME

#define HID_GLOBAL_UNIT_SI_VOLUME   0x00000031

Volume (Cubic Centimeters.

◆ HID_GLOBAL_UNIT_SI_VELOCITY

#define HID_GLOBAL_UNIT_SI_VELOCITY   0x0000F011

Velocity (Centimeters per second).

◆ HID_GLOBAL_UNIT_SI_ACCELERATION

#define HID_GLOBAL_UNIT_SI_ACCELERATION   0x0000E011

Acceleration (Centimeters per second squared).

◆ HID_GLOBAL_UNIT_SI_FREQUENCY

#define HID_GLOBAL_UNIT_SI_FREQUENCY   0x0000F001

Frequency (Hertz).

◆ HID_GLOBAL_UNIT_SI_FORCE

#define HID_GLOBAL_UNIT_SI_FORCE   0x0000E111

Force (Newtons).

◆ HID_GLOBAL_UNIT_SI_PRESSURE

#define HID_GLOBAL_UNIT_SI_PRESSURE   0x0000E1F1

Pressure (Pascals).

◆ HID_GLOBAL_UNIT_SI_ENERGY

#define HID_GLOBAL_UNIT_SI_ENERGY   0x0000E121

Energy (Joules).

◆ HID_GLOBAL_UNIT_SI_POWER

#define HID_GLOBAL_UNIT_SI_POWER   0x0000D121

Power (Watts).

◆ HID_GLOBAL_UNIT_ENGLISH_ROTATION

#define HID_GLOBAL_UNIT_ENGLISH_ROTATION   0x00000014

Rotation (Degrees).

English Base Units

◆ HID_GLOBAL_UNIT_ENGLISH_LENGTH

#define HID_GLOBAL_UNIT_ENGLISH_LENGTH   0x00000013

Length (Inches).

◆ HID_GLOBAL_UNIT_ENGLISH_TIME

#define HID_GLOBAL_UNIT_ENGLISH_TIME   0x00001003

Time (Seconds).

◆ HID_GLOBAL_UNIT_ENGLISH_TEMPERATURE

#define HID_GLOBAL_UNIT_ENGLISH_TEMPERATURE   0x00010003

Temperature (Fahrenheit).

◆ HID_GLOBAL_UNIT_ENGLISH_CURRENT

#define HID_GLOBAL_UNIT_ENGLISH_CURRENT   0x00100003

Current (Amperes).

◆ HID_GLOBAL_UNIT_ENGLISH_LIGHT

#define HID_GLOBAL_UNIT_ENGLISH_LIGHT   0x01000003

Luminous Intensity (Candelas).

◆ HID_GLOBAL_UNIT_ENGLISH_AREA

#define HID_GLOBAL_UNIT_ENGLISH_AREA   0x00000023

Area (Square Inches).

◆ HID_GLOBAL_UNIT_ENGLISH_VOLUME

#define HID_GLOBAL_UNIT_ENGLISH_VOLUME   0x00000033

Volume (Cubic Inches).

◆ HID_LOCAL_DELIMITER_CLOSE

#define HID_LOCAL_DELIMITER_CLOSE   0

HID Local Item Delimiter Values (Section 6.2.2.8)

◆ HID_LOCAL_DELIMITER_OPEN

#define HID_LOCAL_DELIMITER_OPEN   1

◆ HID_PHYSICAL_BIAS_NONE

#define HID_PHYSICAL_BIAS_NONE   (0 << 5)

Not applicable.

HID Physical Descriptor Bias Values (Section 6.2.3)

◆ HID_PHYSICAL_BIAS_RIGHT_HAND

#define HID_PHYSICAL_BIAS_RIGHT_HAND   (1 << 5)

Right hand.

◆ HID_PHYSICAL_BIAS_LEFT_HAND

#define HID_PHYSICAL_BIAS_LEFT_HAND   (2 << 5)

Left hand.

◆ HID_PHYSICAL_BIAS_BOTH_HANDS

#define HID_PHYSICAL_BIAS_BOTH_HANDS   (3 << 5)

Both hands.

◆ HID_PHYSICAL_BIAS_EITHER_HAND

#define HID_PHYSICAL_BIAS_EITHER_HAND   (4 << 5)

Either hand.

◆ HID_PHYSICAL_DESIGNATOR_NONE

#define HID_PHYSICAL_DESIGNATOR_NONE   0x00

None.

HID Physical Descriptor Designator Values (Section 6.2.3)

◆ HID_PHYSICAL_DESIGNATOR_HAND

#define HID_PHYSICAL_DESIGNATOR_HAND   0x01

Hand.

◆ HID_PHYSICAL_DESIGNATOR_EYEBALL

#define HID_PHYSICAL_DESIGNATOR_EYEBALL   0x02

Eyeball.

◆ HID_PHYSICAL_DESIGNATOR_EYEBROW

#define HID_PHYSICAL_DESIGNATOR_EYEBROW   0x03

Eyebrow.

◆ HID_PHYSICAL_DESIGNATOR_EYELID

#define HID_PHYSICAL_DESIGNATOR_EYELID   0x04

Eyelid.

◆ HID_PHYSICAL_DESIGNATOR_EAR

#define HID_PHYSICAL_DESIGNATOR_EAR   0x05

Ear.

◆ HID_PHYSICAL_DESIGNATOR_NOSE

#define HID_PHYSICAL_DESIGNATOR_NOSE   0x06

Nose.

◆ HID_PHYSICAL_DESIGNATOR_MOUTH

#define HID_PHYSICAL_DESIGNATOR_MOUTH   0x07

Mouth.

◆ HID_PHYSICAL_DESIGNATOR_UPPER_LIP

#define HID_PHYSICAL_DESIGNATOR_UPPER_LIP   0x08

Upper lip.

◆ HID_PHYSICAL_DESIGNATOR_LOWER_LIP

#define HID_PHYSICAL_DESIGNATOR_LOWER_LIP   0x09

Lower lip.

◆ HID_PHYSICAL_DESIGNATOR_JAW

#define HID_PHYSICAL_DESIGNATOR_JAW   0x0A

Jaw.

◆ HID_PHYSICAL_DESIGNATOR_NECK

#define HID_PHYSICAL_DESIGNATOR_NECK   0x0B

Neck.

◆ HID_PHYSICAL_DESIGNATOR_UPPER_ARM

#define HID_PHYSICAL_DESIGNATOR_UPPER_ARM   0x0C

Upper arm.

◆ HID_PHYSICAL_DESIGNATOR_ELBOW

#define HID_PHYSICAL_DESIGNATOR_ELBOW   0x0D

Elbow.

◆ HID_PHYSICAL_DESIGNATOR_FOREARM

#define HID_PHYSICAL_DESIGNATOR_FOREARM   0x0E

Forearm.

◆ HID_PHYSICAL_DESIGNATOR_WRIST

#define HID_PHYSICAL_DESIGNATOR_WRIST   0x0F

Wrist.

◆ HID_PHYSICAL_DESIGNATOR_PALM

#define HID_PHYSICAL_DESIGNATOR_PALM   0x10

Palm.

◆ HID_PHYSICAL_DESIGNATOR_THUMB

#define HID_PHYSICAL_DESIGNATOR_THUMB   0x11

Thumb.

◆ HID_PHYSICAL_DESIGNATOR_INDEX_FINGER

#define HID_PHYSICAL_DESIGNATOR_INDEX_FINGER   0x12

Index finger.

◆ HID_PHYSICAL_DESIGNATOR_MIDDLE_FINGER

#define HID_PHYSICAL_DESIGNATOR_MIDDLE_FINGER   0x13

Middle finger.

◆ HID_PHYSICAL_DESIGNATOR_RING_FINGER

#define HID_PHYSICAL_DESIGNATOR_RING_FINGER   0x14

Ring finger.

◆ HID_PHYSICAL_DESIGNATOR_LITTLE_FINGER

#define HID_PHYSICAL_DESIGNATOR_LITTLE_FINGER   0x15

Little finger.

◆ HID_PHYSICAL_DESIGNATOR_HEAD

#define HID_PHYSICAL_DESIGNATOR_HEAD   0x16

Head.

◆ HID_PHYSICAL_DESIGNATOR_SHOULDER

#define HID_PHYSICAL_DESIGNATOR_SHOULDER   0x17

Shoulder.

◆ HID_PHYSICAL_DESIGNATOR_HIP

#define HID_PHYSICAL_DESIGNATOR_HIP   0x18

Hip.

◆ HID_PHYSICAL_DESIGNATOR_WAIST

#define HID_PHYSICAL_DESIGNATOR_WAIST   0x19

Waist.

◆ HID_PHYSICAL_DESIGNATOR_THIGH

#define HID_PHYSICAL_DESIGNATOR_THIGH   0x1A

Thigh.

◆ HID_PHYSICAL_DESIGNATOR_KNEE

#define HID_PHYSICAL_DESIGNATOR_KNEE   0x1B

Knee.

◆ HID_PHYSICAL_DESIGNATOR_CALF

#define HID_PHYSICAL_DESIGNATOR_CALF   0x1C

Calf.

◆ HID_PHYSICAL_DESIGNATOR_ANKLE

#define HID_PHYSICAL_DESIGNATOR_ANKLE   0x1D

Ankle.

◆ HID_PHYSICAL_DESIGNATOR_FOOT

#define HID_PHYSICAL_DESIGNATOR_FOOT   0x1E

Foot.

◆ HID_PHYSICAL_DESIGNATOR_HEEL

#define HID_PHYSICAL_DESIGNATOR_HEEL   0x1F

Heel.

◆ HID_PHYSICAL_DESIGNATOR_BALL_OF_FOOT

#define HID_PHYSICAL_DESIGNATOR_BALL_OF_FOOT   0x20

Ball of foot.

◆ HID_PHYSICAL_DESIGNATOR_BIG_TOE

#define HID_PHYSICAL_DESIGNATOR_BIG_TOE   0x21

Big toe.

◆ HID_PHYSICAL_DESIGNATOR_SECOND_TOE

#define HID_PHYSICAL_DESIGNATOR_SECOND_TOE   0x22

Second toe.

◆ HID_PHYSICAL_DESIGNATOR_THIRD_TOE

#define HID_PHYSICAL_DESIGNATOR_THIRD_TOE   0x23

Third toe.

◆ HID_PHYSICAL_DESIGNATOR_FOURTH_TOE

#define HID_PHYSICAL_DESIGNATOR_FOURTH_TOE   0x24

Fourth toe.

◆ HID_PHYSICAL_DESIGNATOR_LITTLE_TOE

#define HID_PHYSICAL_DESIGNATOR_LITTLE_TOE   0x25

Little toe.

◆ HID_PHYSICAL_DESIGNATOR_BROW

#define HID_PHYSICAL_DESIGNATOR_BROW   0x26

Brow.

◆ HID_PHYSICAL_DESIGNATOR_CHEEK

#define HID_PHYSICAL_DESIGNATOR_CHEEK   0x27

Cheek.

◆ HID_PHYSICAL_QUALIFIER_NONE

#define HID_PHYSICAL_QUALIFIER_NONE   (0 << 5)

Not applicable.

HID Physical Descriptor Qualifier Values (Section 6.2.3)

◆ HID_PHYSICAL_QUALIFIER_RIGHT

#define HID_PHYSICAL_QUALIFIER_RIGHT   (1 << 5)

Right.

◆ HID_PHYSICAL_QUALIFIER_LEFT

#define HID_PHYSICAL_QUALIFIER_LEFT   (2 << 5)

Left.

◆ HID_PHYSICAL_QUALIFIER_BOTH

#define HID_PHYSICAL_QUALIFIER_BOTH   (3 << 5)

Both.

◆ HID_PHYSICAL_QUALIFIER_EITHER

#define HID_PHYSICAL_QUALIFIER_EITHER   (4 << 5)

Either.

◆ HID_PHYSICAL_QUALIFIER_CENTER

#define HID_PHYSICAL_QUALIFIER_CENTER   (5 << 5)

Center.

◆ HID_PAGE_UNDEFINED

#define HID_PAGE_UNDEFINED   0x00

Undefined.

HID Usage Pages (See HID Usage Tables 1.3)

◆ HID_PAGE_GENERIC_DESKTOP

#define HID_PAGE_GENERIC_DESKTOP   0x01

Generic Desktop Page.

◆ HID_PAGE_SIMULATION_CONTROLS

#define HID_PAGE_SIMULATION_CONTROLS   0x02

Simulation Controls Page.

◆ HID_PAGE_VR_CONTROLS

#define HID_PAGE_VR_CONTROLS   0x03

VR Controls Page.

◆ HID_PAGE_SPORT_CONTROLS

#define HID_PAGE_SPORT_CONTROLS   0x04

Sport Controls Page.

◆ HID_PAGE_GAME_CONTROLS

#define HID_PAGE_GAME_CONTROLS   0x05

Game Controls Page.

◆ HID_PAGE_GENERIC_DEVICE_CONTROLS

#define HID_PAGE_GENERIC_DEVICE_CONTROLS   0x06

Generic Device Controls Page.

◆ HID_PAGE_KEYBOARD_KEYPAD

#define HID_PAGE_KEYBOARD_KEYPAD   0x07

Keyboard/Keypad Page.

◆ HID_PAGE_LED

#define HID_PAGE_LED   0x08

LED Page.

◆ HID_PAGE_BUTTON

#define HID_PAGE_BUTTON   0x09

Button Page.

◆ HID_PAGE_ORDINAL

#define HID_PAGE_ORDINAL   0x0A

Ordinal Page.

◆ HID_PAGE_TELEPHONY_DEVICE

#define HID_PAGE_TELEPHONY_DEVICE   0x0B

Telephony Device Page.

◆ HID_PAGE_CONSUMER

#define HID_PAGE_CONSUMER   0x0C

Consumer Page.

◆ HID_PAGE_DIGITIZERS

#define HID_PAGE_DIGITIZERS   0x0D

Digitizers Page.

◆ HID_PAGE_HAPTICS

#define HID_PAGE_HAPTICS   0x0E

Haptics Page.

◆ HID_PAGE_PHYSICAL_INPUT_DEVICE

#define HID_PAGE_PHYSICAL_INPUT_DEVICE   0x0F

Physical Input Device Page.

◆ HID_PAGE_UNICODE

#define HID_PAGE_UNICODE   0x10

Unicode Page.

◆ HID_PAGE_EYE_AND_HEAD_TRACKERS

#define HID_PAGE_EYE_AND_HEAD_TRACKERS   0x12

Eye and Head Trackers Page.

0x11-0x11 Reserved

◆ HID_PAGE_AUXILIARY_DISPLAY

#define HID_PAGE_AUXILIARY_DISPLAY   0x14

Auxiliary Display Page.

0x13-0x13 Reserved

◆ HID_PAGE_SENSORS

#define HID_PAGE_SENSORS   0x20

Sensors Page.

0x15-0x1F Reserved

◆ HID_PAGE_MEDICAL_INSTRUMENT

#define HID_PAGE_MEDICAL_INSTRUMENT   0x40

Medical Instrument Page.

0x21-0x3F Reserved

◆ HID_PAGE_BRAILLE_DISPLAY

#define HID_PAGE_BRAILLE_DISPLAY   0x41

Braille Display Page.

◆ HID_PAGE_LIGHTING_AND_ILLUMINATION

#define HID_PAGE_LIGHTING_AND_ILLUMINATION   0x59

Lighting And Illumination Page.

0x42-0x58 Reserved

◆ HID_PAGE_MONITOR

#define HID_PAGE_MONITOR   0x80

Monitor Page.

0x5A-0x7F Reserved

◆ HID_PAGE_MONITOR_ENUMERATED

#define HID_PAGE_MONITOR_ENUMERATED   0x81

Monitor Enumerated Page.

◆ HID_PAGE_VESA_VIRTUAL_CONTROLS

#define HID_PAGE_VESA_VIRTUAL_CONTROLS   0x82

VESA Virtual Controls Page.

◆ HID_PAGE_POWER

#define HID_PAGE_POWER   0x84

Power Page.

0x83-0x83 Reserved

◆ HID_PAGE_BATTERY_SYSTEM

#define HID_PAGE_BATTERY_SYSTEM   0x85

Battery System Page.

◆ HID_PAGE_BARCODE_SCANNER

#define HID_PAGE_BARCODE_SCANNER   0x8C

Barcode Scanner Page.

0x86-0x8B Reserved

◆ HID_PAGE_SCALES

#define HID_PAGE_SCALES   0x8D

Scales Page.

◆ HID_PAGE_MAGNETIC_STRIPE_READER

#define HID_PAGE_MAGNETIC_STRIPE_READER   0x8E

Magnetic Stripe Reader Page.

◆ HID_PAGE_CAMERA_CONTROL

#define HID_PAGE_CAMERA_CONTROL   0x90

Camera Control Page.

0x8F-0x8F Reserved

◆ HID_PAGE_ARCADE

#define HID_PAGE_ARCADE   0x91

Arcade Page.

◆ HID_PAGE_GAMING_DEVICE

#define HID_PAGE_GAMING_DEVICE   0x92

Gaming Device Page.

◆ HID_PAGE_FIDO_ALLIANCE

#define HID_PAGE_FIDO_ALLIANCE   0xF1D0

FIDO Alliance Page.

0x93-0xF1CF Reserved

◆ HID_PAGE_VENDOR_MINIMUM

#define HID_PAGE_VENDOR_MINIMUM   0xFF00

Vendor-defined.

0xF1D1-0xFEFF Reserved

◆ HID_PAGE_VENDOR_MAXIMUM

#define HID_PAGE_VENDOR_MAXIMUM   0xFFFF

Vendor-defined.

0xFF00-0xFFFF Vendor-defined

◆ HID_DESKTOP_UNDEFINED

#define HID_DESKTOP_UNDEFINED   0x00

Undefined.

HID Usage Tables (See HID Usage Tables 1.3) HID Generic Desktop Page (Partial)

◆ HID_DESKTOP_POINTER

#define HID_DESKTOP_POINTER   0x01

Pointer.

◆ HID_DESKTOP_MOUSE

#define HID_DESKTOP_MOUSE   0x02

Mouse.

◆ HID_DESKTOP_JOYSTICK

#define HID_DESKTOP_JOYSTICK   0x04

Joystick.

0x03-0x03 Reserved

◆ HID_DESKTOP_GAMEPAD

#define HID_DESKTOP_GAMEPAD   0x05

Gamepad.

◆ HID_DESKTOP_KEYBOARD

#define HID_DESKTOP_KEYBOARD   0x06

Keyboard.

◆ HID_DESKTOP_KEYPAD

#define HID_DESKTOP_KEYPAD   0x07

Keypad.

◆ HID_DESKTOP_MULTI_AXIS_CONTROLLER

#define HID_DESKTOP_MULTI_AXIS_CONTROLLER   0x08

Multi-axis Controller.

◆ HID_DESKTOP_TABLET_PC_SYSTEM_CONTROLS

#define HID_DESKTOP_TABLET_PC_SYSTEM_CONTROLS   0x09

Tablet PC System Controls.

◆ HID_DESKTOP_WATER_COOLING_DEVICE

#define HID_DESKTOP_WATER_COOLING_DEVICE   0x0A

Water Cooling Device.

◆ HID_DESKTOP_COMPUTER_CHASSIS_DEVICE

#define HID_DESKTOP_COMPUTER_CHASSIS_DEVICE   0x0B

Computer Chassis Device.

◆ HID_DESKTOP_WIRELESS_RADIO_CONTROLS

#define HID_DESKTOP_WIRELESS_RADIO_CONTROLS   0x0C

Wireless Radio Controls.

◆ HID_DESKTOP_PORTABLE_DEVICE_CONTROL

#define HID_DESKTOP_PORTABLE_DEVICE_CONTROL   0x0D

Portable Device Control.

◆ HID_DESKTOP_SYSTEM_MULTI_AXIS_CONTROLLER

#define HID_DESKTOP_SYSTEM_MULTI_AXIS_CONTROLLER   0x0E

System Multi-Axis Controller.

◆ HID_DESKTOP_SPATIAL_CONTROLLER

#define HID_DESKTOP_SPATIAL_CONTROLLER   0x0F

Spatial Controller.

◆ HID_DESKTOP_ASSISTIVE_CONTROL

#define HID_DESKTOP_ASSISTIVE_CONTROL   0x10

Assistive Control.

◆ HID_DESKTOP_DEVICE_DOCK

#define HID_DESKTOP_DEVICE_DOCK   0x11

Device Dock.

◆ HID_DESKTOP_DOCKABLE_DEVICE

#define HID_DESKTOP_DOCKABLE_DEVICE   0x12

Dockable Device.

◆ HID_DESKTOP_CALL_STATE_MANAGEMENT_CONTROL

#define HID_DESKTOP_CALL_STATE_MANAGEMENT_CONTROL   0x13

Call State Management Control.

◆ HID_DESKTOP_X

#define HID_DESKTOP_X   0x30

X.

0x14-0x2F Reserved

◆ HID_DESKTOP_Y

#define HID_DESKTOP_Y   0x31

Y.

◆ HID_DESKTOP_Z

#define HID_DESKTOP_Z   0x32

Z.

◆ HID_DESKTOP_RX

#define HID_DESKTOP_RX   0x33

Rx.

◆ HID_DESKTOP_RY

#define HID_DESKTOP_RY   0x34

Ry.

◆ HID_DESKTOP_RZ

#define HID_DESKTOP_RZ   0x35

Rz.

◆ HID_DESKTOP_SLIDER

#define HID_DESKTOP_SLIDER   0x36

Slider.

◆ HID_DESKTOP_DIAL

#define HID_DESKTOP_DIAL   0x37

Dial.

◆ HID_DESKTOP_WHEEL

#define HID_DESKTOP_WHEEL   0x38

Wheel.

◆ HID_DESKTOP_HAT_SWITCH

#define HID_DESKTOP_HAT_SWITCH   0x39

Hat Switch.

◆ HID_DESKTOP_COUNTED_BUFFER

#define HID_DESKTOP_COUNTED_BUFFER   0x3A

Counted Buffer.

◆ HID_DESKTOP_BYTE_COUNT

#define HID_DESKTOP_BYTE_COUNT   0x3B

Byte Count.

◆ HID_DESKTOP_MOTION_WAKEUP

#define HID_DESKTOP_MOTION_WAKEUP   0x3C

Motion Wakeup.

◆ HID_DESKTOP_START

#define HID_DESKTOP_START   0x3D

Start.

◆ HID_DESKTOP_SELECT

#define HID_DESKTOP_SELECT   0x3E

Select.

◆ HID_DESKTOP_VX

#define HID_DESKTOP_VX   0x40

Vx.

0x3F-0x3F Reserved

◆ HID_DESKTOP_VY

#define HID_DESKTOP_VY   0x41

Vy.

◆ HID_DESKTOP_VZ

#define HID_DESKTOP_VZ   0x42

Vz.

◆ HID_DESKTOP_VBRX

#define HID_DESKTOP_VBRX   0x43

Vbrx.

◆ HID_DESKTOP_VBRY

#define HID_DESKTOP_VBRY   0x44

Vbry.

◆ HID_DESKTOP_VBRZ

#define HID_DESKTOP_VBRZ   0x45

Vbrz.

◆ HID_DESKTOP_VNO

#define HID_DESKTOP_VNO   0x46

Vno.

◆ HID_DESKTOP_FEATURE_NOTIFICATION

#define HID_DESKTOP_FEATURE_NOTIFICATION   0x47

Feature Notification.

◆ HID_DESKTOP_RESOLUTION_MULTIPLIER

#define HID_DESKTOP_RESOLUTION_MULTIPLIER   0x48

Resolution Multiplier.

◆ HID_DESKTOP_QX

#define HID_DESKTOP_QX   0x49

Qx.

◆ HID_DESKTOP_QY

#define HID_DESKTOP_QY   0x4A

Qy.

◆ HID_DESKTOP_QZ

#define HID_DESKTOP_QZ   0x4B

Qz.

◆ HID_DESKTOP_QW

#define HID_DESKTOP_QW   0x4C

Qw.

◆ HID_LED_UNDEFINED

#define HID_LED_UNDEFINED   00

Undefined.

HID Keyboard/Keypad Page Note: These are the same as the SCAN_CODE_* values in GlobalConst HID LED Page (Partial)

◆ HID_LED_NUM_LOCK

#define HID_LED_NUM_LOCK   01

Num Lock.

◆ HID_LED_CAPS_LOCK

#define HID_LED_CAPS_LOCK   02

Caps Lock.

◆ HID_LED_SCROLL_LOCK

#define HID_LED_SCROLL_LOCK   03

Scroll Lock.

◆ HID_LED_COMPOSE

#define HID_LED_COMPOSE   04

Compose.

◆ HID_LED_KANA

#define HID_LED_KANA   05

Kana.

◆ HID_LED_POWER

#define HID_LED_POWER   06

Power.

◆ HID_LED_SHIFT

#define HID_LED_SHIFT   07

Shift.

◆ HID_LED_DO_NOT_DISTURB

#define HID_LED_DO_NOT_DISTURB   08

Do Not Disturb.

◆ HID_LED_MUTE

#define HID_LED_MUTE   09

Mute.

◆ HID_BUTTON_NONE

#define HID_BUTTON_NONE   0

HID Button Page (Partial)

◆ HID_BUTTON_1

#define HID_BUTTON_1   1

◆ HID_BUTTON_2

#define HID_BUTTON_2   2

◆ HID_BUTTON_3

#define HID_BUTTON_3   3

◆ HID_BUTTON_4

#define HID_BUTTON_4   4

◆ HID_BUTTON_5

#define HID_BUTTON_5   5

◆ HID_BUTTON_PRIMARY

#define HID_BUTTON_PRIMARY   HID_BUTTON_1

◆ HID_BUTTON_SECONDARY

#define HID_BUTTON_SECONDARY   HID_BUTTON_2

◆ HID_BUTTON_TERTIARY

#define HID_BUTTON_TERTIARY   HID_BUTTON_3

◆ HID_BUTTON_65535

#define HID_BUTTON_65535   0xFFFF

Note: Buttons are defined as Button1 to Button65535

◆ HID_DIGITIZERS_UNDEFINED

#define HID_DIGITIZERS_UNDEFINED   0x00

Undefined.

HID Digitizers Page (Partial)

◆ HID_DIGITIZERS_DIGITIZER

#define HID_DIGITIZERS_DIGITIZER   0x01

Digitizer.

◆ HID_DIGITIZERS_PEN

#define HID_DIGITIZERS_PEN   0x02

Pen.

◆ HID_DIGITIZERS_LIGHT_PEN

#define HID_DIGITIZERS_LIGHT_PEN   0x03

Light Pen.

◆ HID_DIGITIZERS_TOUCH_SCREEN

#define HID_DIGITIZERS_TOUCH_SCREEN   0x04

Touch Screen.

◆ HID_DIGITIZERS_TOUCH_PAD

#define HID_DIGITIZERS_TOUCH_PAD   0x05

Touch Pad.

◆ HID_DIGITIZERS_WHITEBOARD

#define HID_DIGITIZERS_WHITEBOARD   0x06

Whiteboard.

◆ HID_DIGITIZERS_COORD_MEASURING

#define HID_DIGITIZERS_COORD_MEASURING   0x07

Coordinate Measuring Machine.

◆ HID_DIGITIZERS_3D_DIGITIZER

#define HID_DIGITIZERS_3D_DIGITIZER   0x08

3D Digitizer

◆ HID_DIGITIZERS_STEREO_PLOTTER

#define HID_DIGITIZERS_STEREO_PLOTTER   0x09

Stereo Plotter.

◆ HID_DIGITIZERS_ARTICULATED_ARM

#define HID_DIGITIZERS_ARTICULATED_ARM   0x0A

Articulated Arm.

◆ HID_DIGITIZERS_ARMATURE

#define HID_DIGITIZERS_ARMATURE   0x0B

Armature.

◆ HID_DIGITIZERS_MULTI_POINT_DIGITIZER

#define HID_DIGITIZERS_MULTI_POINT_DIGITIZER   0x0C

Multiple Point Digitizer.

◆ HID_DIGITIZERS_FREE_SPACE_WAND

#define HID_DIGITIZERS_FREE_SPACE_WAND   0x0D

Free Space Wand.

◆ HID_DIGITIZERS_DEVICE_CONFIGURATION

#define HID_DIGITIZERS_DEVICE_CONFIGURATION   0x0E

Device Configuration.

◆ HID_DIGITIZERS_CAPACITIVE_HEAT_MAP

#define HID_DIGITIZERS_CAPACITIVE_HEAT_MAP   0x0F

Capacitive Heat Map Digitizer.

◆ HID_DIGITIZERS_STYLUS

#define HID_DIGITIZERS_STYLUS   0x20

Stylus.

0x10-0x1F Reserved

◆ HID_DIGITIZERS_PUCK

#define HID_DIGITIZERS_PUCK   0x21

Puck.

◆ HID_DIGITIZERS_FINGER

#define HID_DIGITIZERS_FINGER   0x22

Finger.

◆ HID_DIGITIZERS_DEVICE_SETTINGS

#define HID_DIGITIZERS_DEVICE_SETTINGS   0x23

Device settings.

◆ HID_DIGITIZERS_CHARACTER_GESTURE

#define HID_DIGITIZERS_CHARACTER_GESTURE   0x24

Character Gesture.

◆ HID_DIGITIZERS_TIP_PRESSURE

#define HID_DIGITIZERS_TIP_PRESSURE   0x30

Tip Pressure.

0x25-0x2F Reserved

◆ HID_DIGITIZERS_BARREL_PRESSURE

#define HID_DIGITIZERS_BARREL_PRESSURE   0x31

Barrel Pressure.

◆ HID_DIGITIZERS_IN_RANGE

#define HID_DIGITIZERS_IN_RANGE   0x32

In Range.

◆ HID_DIGITIZERS_TOUCH

#define HID_DIGITIZERS_TOUCH   0x33

Touch.

◆ HID_DIGITIZERS_UNTOUCH

#define HID_DIGITIZERS_UNTOUCH   0x34

Untouch.

◆ HID_DIGITIZERS_TAP

#define HID_DIGITIZERS_TAP   0x35

Tap.

◆ HID_DIGITIZERS_QUALITY

#define HID_DIGITIZERS_QUALITY   0x36

Quality.

◆ HID_DIGITIZERS_DATA_VALID

#define HID_DIGITIZERS_DATA_VALID   0x37

Data Valid.

◆ HID_DIGITIZERS_TRANSDUCER_INDEX

#define HID_DIGITIZERS_TRANSDUCER_INDEX   0x38

Transducer Index.

◆ HID_DIGITIZERS_TABLET_FUNCTION_KEYS

#define HID_DIGITIZERS_TABLET_FUNCTION_KEYS   0x39

Tablet Function Keys.

◆ HID_DIGITIZERS_PROGRAM_CHANGE_KEYS

#define HID_DIGITIZERS_PROGRAM_CHANGE_KEYS   0x3A

Program Change Keys.

◆ HID_DIGITIZERS_BATTERY_STRENGTH

#define HID_DIGITIZERS_BATTERY_STRENGTH   0x3B

Battery Strength.

◆ HID_DIGITIZERS_INVERT

#define HID_DIGITIZERS_INVERT   0x3C

Invert.

◆ HID_DIGITIZERS_X_TILT

#define HID_DIGITIZERS_X_TILT   0x3D

X Tilt.

◆ HID_DIGITIZERS_Y_TILT

#define HID_DIGITIZERS_Y_TILT   0x3E

Y Tilt.

◆ HID_DIGITIZERS_AZIMUTH

#define HID_DIGITIZERS_AZIMUTH   0x3F

Azimuth.

◆ HID_DIGITIZERS_ALTITUDE

#define HID_DIGITIZERS_ALTITUDE   0x40

Altitude.

◆ HID_DIGITIZERS_TWIST

#define HID_DIGITIZERS_TWIST   0x41

Twist.

◆ HID_DIGITIZERS_TIP_SWITCH

#define HID_DIGITIZERS_TIP_SWITCH   0x42

Tip Switch.

◆ HID_DIGITIZERS_SECONDARY_TIP_SWITCH

#define HID_DIGITIZERS_SECONDARY_TIP_SWITCH   0x43

Secondary Tip Switch.

◆ HID_DIGITIZERS_BARREL_SWITCH

#define HID_DIGITIZERS_BARREL_SWITCH   0x44

Barrel Switch.

◆ HID_DIGITIZERS_ERASER

#define HID_DIGITIZERS_ERASER   0x45

Eraser.

◆ HID_DIGITIZERS_TABLET_PICK

#define HID_DIGITIZERS_TABLET_PICK   0x46

Tablet Pick.

◆ HID_DIGITIZERS_TOUCH_VALID

#define HID_DIGITIZERS_TOUCH_VALID   0x47

Touch Valid (Confidence).

◆ HID_DIGITIZERS_WIDTH

#define HID_DIGITIZERS_WIDTH   0x48

Width.

◆ HID_DIGITIZERS_HEIGHT

#define HID_DIGITIZERS_HEIGHT   0x49

Height.

◆ HID_DIGITIZERS_CONTACT_IDENTIFIER

#define HID_DIGITIZERS_CONTACT_IDENTIFIER   0x51

Contact Identifier.

0x4A-0x50 Reserved

◆ HID_DIGITIZERS_DEVICE_MODE

#define HID_DIGITIZERS_DEVICE_MODE   0x52

Device Mode.

◆ HID_DIGITIZERS_DEVICE_IDENTIFIER

#define HID_DIGITIZERS_DEVICE_IDENTIFIER   0x53

Device Identifier.

◆ HID_DIGITIZERS_CONTACT_COUNT

#define HID_DIGITIZERS_CONTACT_COUNT   0x54

Contact Count.

◆ HID_DIGITIZERS_CONTACT_COUNT_MAXIMUM

#define HID_DIGITIZERS_CONTACT_COUNT_MAXIMUM   0x55

Contact Count Maximum.

◆ HID_DIGITIZERS_SCAN_TIME

#define HID_DIGITIZERS_SCAN_TIME   0x56

Scan Time.

Typedef Documentation

◆ HID_DESCRIPTOR

HID specific types HID Descriptor (Section 6.2.1)

◆ HID_REPORT_DESCRIPTOR

typedef void HID_REPORT_DESCRIPTOR

HID Report Descriptor (Section 6.2.2)

◆ HID_PHYSICAL_DESCRIPTOR

HID Physical Descriptor (Section 6.2.3)

◆ HID_PHYSICAL_DESCRIPTOR_SET0

◆ HID_PHYSICAL_DESCRIPTOR_SET

◆ HID_STATE

typedef struct _HID_STATE HID_STATE

Structures for HID report parsing HID State

◆ HID_STACK

typedef struct _HID_STACK HID_STACK

HID Stack

◆ HID_USAGE

typedef struct _HID_USAGE HID_USAGE

HID Usage

◆ HID_REPORT

typedef struct _HID_REPORT HID_REPORT

Forward declared to satisfy HIDUsage.

◆ HID_COLLECTION

Forward declared to satisfy HIDReport.

◆ HID_DEVICE

typedef struct _HID_DEVICE HID_DEVICE

Forward declared to satisfy HIDCollection.

◆ HID_CONSUMER

typedef struct _HID_CONSUMER HID_CONSUMER

Forward declared to satisfy HIDCollection.

◆ hid_device_enumerate_cb

typedef uint32_t STDCALL(* hid_device_enumerate_cb) (HID_DEVICE *device, void *data)

HID Device HID Device Enumeration Callback

◆ hid_device_notification_cb

typedef uint32_t STDCALL(* hid_device_notification_cb) (DEVICE *device, void *data, uint32_t notification)

HID Device Notification Callback

◆ hid_device_get_idle_proc

typedef uint32_t STDCALL(* hid_device_get_idle_proc) (HID_DEVICE *device, uint16_t *duration, uint8_t reportid)

HID Device Methods

◆ hid_device_set_idle_proc

typedef uint32_t STDCALL(* hid_device_set_idle_proc) (HID_DEVICE *device, uint16_t duration, uint8_t reportid)

◆ hid_device_get_report_proc

typedef uint32_t STDCALL(* hid_device_get_report_proc) (HID_DEVICE *device, uint8_t reporttype, uint8_t reportid, void *reportdata, uint32_t reportsize)

◆ hid_device_set_report_proc

typedef uint32_t STDCALL(* hid_device_set_report_proc) (HID_DEVICE *device, uint8_t reporttype, uint8_t reportid, void *reportdata, uint32_t reportsize)

◆ hid_device_allocate_report_proc

typedef uint32_t STDCALL(* hid_device_allocate_report_proc) (HID_DEVICE *device, HID_COLLECTION *collection, uint8_t reportid, uint32_t reportsize)

◆ hid_device_release_report_proc

typedef uint32_t STDCALL(* hid_device_release_report_proc) (HID_DEVICE *device, uint8_t reportid)

◆ hid_device_submit_report_proc

typedef uint32_t STDCALL(* hid_device_submit_report_proc) (HID_DEVICE *device, uint8_t reportid)

◆ hid_device_cancel_report_proc

typedef uint32_t STDCALL(* hid_device_cancel_report_proc) (HID_DEVICE *device, uint8_t reportid)

◆ hid_device_get_protocol_proc

typedef uint32_t STDCALL(* hid_device_get_protocol_proc) (HID_DEVICE *device, uint8_t *protocol)

◆ hid_device_set_protocol_proc

typedef uint32_t STDCALL(* hid_device_set_protocol_proc) (HID_DEVICE *device, uint8_t protocol)

◆ hid_device_get_interval_proc

typedef uint32_t STDCALL(* hid_device_get_interval_proc) (HID_DEVICE *device, uint32_t *interval)

◆ hid_device_set_interval_proc

typedef uint32_t STDCALL(* hid_device_set_interval_proc) (HID_DEVICE *device, uint32_t interval)

◆ hid_device_get_report_descriptor_proc

typedef uint32_t STDCALL(* hid_device_get_report_descriptor_proc) (HID_DEVICE *device, HID_REPORT_DESCRIPTOR *descriptor, uint32_t size)

◆ hid_device_get_physical_descriptor_set0_proc

typedef uint32_t STDCALL(* hid_device_get_physical_descriptor_set0_proc) (HID_DEVICE *device, HID_PHYSICAL_DESCRIPTOR_SET0 *descriptor)

◆ hid_device_get_physical_descriptor_set_proc

typedef uint32_t STDCALL(* hid_device_get_physical_descriptor_set_proc) (HID_DEVICE *device, HID_PHYSICAL_DESCRIPTOR_SET *descriptor, uint8_t index, uint32_t size)

◆ hid_consumer_enumerate_cb

typedef uint32_t STDCALL(* hid_consumer_enumerate_cb) (HID_CONSUMER *consumer, void *data)

HID Consumer HID Consumer Enumeration Callback

◆ hid_device_bind_proc

typedef uint32_t STDCALL(* hid_device_bind_proc) (HID_DEVICE *device)

HID Consumer Methods

◆ hid_device_unbind_proc

typedef uint32_t STDCALL(* hid_device_unbind_proc) (HID_DEVICE *device)

◆ hid_collection_bind_proc

typedef uint32_t STDCALL(* hid_collection_bind_proc) (HID_DEVICE *device, HID_COLLECTION *collection)

◆ hid_collection_unbind_proc

typedef uint32_t STDCALL(* hid_collection_unbind_proc) (HID_DEVICE *device, HID_COLLECTION *collection)

◆ hid_report_receive_proc

typedef uint32_t STDCALL(* hid_report_receive_proc) (HID_COLLECTION *collection, uint8_t reportid, void *reportdata, uint32_t reportsize)

◆ HID_EXTENT

typedef struct _HID_EXTENT HID_EXTENT

Structures for HID consumer report processing HID Report Extent

◆ HID_FIELD

typedef struct _HID_FIELD HID_FIELD

HID Report Field

◆ HID_DEFINITION

HID Report Definition

Function Documentation

◆ hid_parser_parse_collections()

uint32_t STDCALL hid_parser_parse_collections ( HID_DEVICE * device,
HID_COLLECTION ** collections,
uint32_t * count )

Parse the HID report descriptor of the provided device and populate the collections, reports and usages.

HID Functions

Parameters
DeviceThe HID device to parse collections for
CollectionsA pointer to the top level collections array to be populated
CountA variable to return the number of top level collections
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_parser_free_collections()

uint32_t STDCALL hid_parser_free_collections ( HID_COLLECTION * collections,
uint32_t count )

Free the collections, reports and usages parsed from a HID report descriptor.

Parameters
CollectionsA pointer to the top level collections array to be freed
CountThe number of top level collections in the array
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_parser_count_collections()

uint32_t STDCALL hid_parser_count_collections ( HID_DEVICE * device,
HID_COLLECTION * parent )

Count the number of collections found in the HID report descriptor of the provided device.

Parameters
DeviceThe HID device to count collections for
ParentThe parent HID collection, if supplied count child collections else count top level collections
Returns
The number of collections found, 0 if none for or on error

◆ hid_parser_count_reports()

uint32_t STDCALL hid_parser_count_reports ( HID_DEVICE * device,
HID_COLLECTION * collection )

Count the number of reports found in the HID report descriptor of the supplied device and collection.

Parameters
DeviceThe HID device to count reports for
CollectionThe HID collection to count reports for
Returns
The number of reports found, 0 if none for or on error

◆ hid_parser_count_usages()

uint32_t STDCALL hid_parser_count_usages ( HID_DEVICE * device,
HID_REPORT * report )

Count the number of usages found in the HID report descriptor for the supplied device and report.

Parameters
DeviceThe HID device to count usages for
ReportThe HID report to count usages for
Returns
The number of usages found, 0 if none for or on error

◆ hid_parser_allocate_collection()

HID_COLLECTION *STDCALL hid_parser_allocate_collection ( HID_DEVICE * device,
HID_COLLECTION * parent,
HID_STATE * state,
uint32_t flags,
uint32_t start )

Allocate a HID collection to contain a set of reports and usages from a HID report descriptor.

Parameters
DeviceThe HID device containing the collection
ParentThe HID collection containing the collection (or nil for a top level collection)
StateThe current HID parser state
FlagsThe flags for the collection from the HID report descriptor
StartThe starting byte offset of the collection in the HID report descriptor
Returns
A pointer to the HID collection or nil on error

◆ hid_parser_allocate_report()

HID_REPORT *STDCALL hid_parser_allocate_report ( HID_DEVICE * device,
HID_COLLECTION * collection,
HID_STATE * state,
uint8_t kind,
uint32_t flags,
uint32_t index,
uint32_t sequence )

Allocate a HID report to contain a set of usages from a HID report descriptor.

Parameters
DeviceThe HID device containing the report
CollectionThe HID collection containing the report
StateThe current HID parser state
KindThe report kind (eg HID_REPORT_INPUT)
FlagsThe flags for the report from the HID report descriptor
IndexThe index of this report in the collection (First report is 0)
SequenceThe sequence of this report in all collections (First report is 0)
Returns
A pointer to the HID report or nil on error

◆ hid_parser_allocate_usage()

HID_USAGE *STDCALL hid_parser_allocate_usage ( HID_DEVICE * device,
HID_REPORT * report,
HID_STATE * state,
uint32_t index )

Allocate a HID usage from a HID report descriptor.

Parameters
DeviceThe HID device containing the usage
ReportThe HID report containing the usage
StateThe current HID parser state
IndexThe index of this usage in the report (First usage is 0)
Returns
A pointer to the HID usage or nil on error

◆ hid_parser_update_usage()

BOOL STDCALL hid_parser_update_usage ( HID_DEVICE * device,
HID_REPORT * report,
HID_STATE * state,
HID_USAGE * usage )

Update a HID usage from a HID report descriptor.

Parameters
DeviceThe HID device containing the usage
ReportThe HID report containing the usage
StateThe current HID parser state
UsageThe HID usage to update
Returns
True if completed or False on error
Note
As usages must precede the main item they relate to in the HID report descriptor they need to be allocated before all the required information is known, this function updates the usage after the main item is found

◆ hid_parser_free_usage()

BOOL STDCALL hid_parser_free_usage ( HID_DEVICE * device,
HID_USAGE * usage )

Free a HID usage and any associated usage aliases.

Parameters
DeviceThe HID device containing the usage
UsageThe HID usage to free
Returns
True if completed or False on error

◆ hid_parser_pop_stack()

uint32_t STDCALL hid_parser_pop_stack ( HID_STACK * stack,
HID_STATE * state )

Replace the current HID parser state with the top item from the parser stack.

Parameters
StackThe HID parser stack
StateThe HID parser state to replace
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_parser_push_stack()

uint32_t STDCALL hid_parser_push_stack ( HID_STACK * stack)

Place a copy of the current HID parser state on top of the parser stack.

Parameters
StackThe HID parser stack
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_parser_free_stack()

uint32_t STDCALL hid_parser_free_stack ( HID_STACK * stack)

Free the HID parser stack and state.

Parameters
StackThe HID parser stack
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_parser_reset_state()

uint32_t STDCALL hid_parser_reset_state ( HID_STATE * state)

Clear the Local and Global HID parser state.

Parameters
StateThe HID parser state to reset
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_parser_clean_state()

uint32_t STDCALL hid_parser_clean_state ( HID_STATE * state)

Clear the Local HID parser state.

Parameters
StateThe HID parser state to clean
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_find_collection()

HID_COLLECTION *STDCALL hid_find_collection ( HID_DEVICE * device,
uint16_t page,
uint16_t usage )

Find the first HID collection matching the specified page and usage.

Parameters
DeviceThe HID device to find collections from
PageThe HID Usage Page to match (eg HID_PAGE_GENERIC_DESKTOP)
UsageThe HID Usage to match (eg HID_DESKTOP_MOUSE)
Returns
A pointer to the first matching collection or nil if not matched

◆ hid_find_report_ids()

uint32_t STDCALL hid_find_report_ids ( HID_DEVICE * device,
HID_COLLECTION * collection,
uint8_t * minid,
uint8_t * maxid )

Find the minimum and maximum report ids contained in the specified HID collection or all collections.

Parameters
DeviceThe HID device to find report ids from
CollectionThe HID collection to find report ids from (or nil to find from all collections)
MinIdA variable to receive the minimum report id number
MaxIdA variable to receive the maximum report id number
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_find_report_sizes()

uint32_t STDCALL hid_find_report_sizes ( HID_DEVICE * device,
HID_COLLECTION * collection,
uint8_t kind,
uint32_t * minsize,
uint32_t * maxsize )

Find the minimum and maximum report sizes contained in the specified HID collection or all collections.

Parameters
DeviceThe HID device to find report sizes from
CollectionThe HID collection to find report sizes from (or nil to find from all collections)
KindThe report kind to find sizes for (eg HID_REPORT_INPUT)
MinSizeA variable to receive the minimum report size
MaxSizeA variable to receive the maximum report size
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_count_reports()

uint32_t STDCALL hid_count_reports ( HID_DEVICE * device,
HID_COLLECTION * collection,
uint8_t kind,
uint8_t id,
uint32_t * count )

Count the number of HID reports of the specified type and id in the specified collection.

Parameters
DeviceThe HID device to get the report count from
CollectionThe HID collection to get the report count from
KindThe report kind to count reports for (eg HID_REPORT_INPUT)
IdThe report id to count reports for (must be less than or equal to the maximum report id)
CountA variable to return the number of reports
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_find_reports()

uint32_t STDCALL hid_find_reports ( HID_DEVICE * device,
HID_COLLECTION * collection,
uint8_t kind,
uint8_t id,
HID_REPORT * reports,
uint32_t count )

Find all HID reports of the specified type and id in the specified collection.

Parameters
DeviceThe HID device to get the reports from
CollectionThe HID collection to get the reports from
KindThe report kind to get reports for (eg HID_REPORT_INPUT)
IdThe report id to get reports for (must be less than or equal to the maximum report id)
ReportsA pointer to an array to return the list of reports
CountThe number of reports able to be returned in the reports array
Returns
ERROR_SUCCESS if completed or another error code on failure
Note
The caller is responsible for allocating the reports array which must be large enough to hold a pointer to every report in the returned list When finished the array should be freed by the caller but not the reports themselves Call HIDCountReports first to obtain the correct size to be allocated for the array

◆ hid_allocate_definition()

HID_DEFINITION *STDCALL hid_allocate_definition ( HID_DEVICE * device,
HID_COLLECTION * collection,
uint8_t kind,
uint8_t id )

Allocate a HID definition to describe an input, output or feature report contained in the specified collection.

Parameters
DeviceThe HID device to create the report definition from
CollectionThe HID collection to create the report definition from
KindThe report kind to create a definition for (eg HID_REPORT_INPUT)
IdThe report id to create a definition for (must be less than or equal to the maximum report id)
Returns
A pointer to the allocated definition or nil on error

◆ hid_free_definition()

uint32_t STDCALL hid_free_definition ( HID_DEFINITION * definition)

Free a HID definition describing an input, output or feature report.

Parameters
DefinitionThe HID definition to be freed
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_insert_bit_field()

uint32_t STDCALL hid_insert_bit_field ( HID_FIELD * field,
void * buffer,
uint32_t size,
BOOL value )

Insert a bit field value into a report buffer.

Parameters
FieldThe field to insert into the report
BufferA pointer to the report buffer
SizeThe size in bytes of the report buffer
ValueThe value to insert into the buffer
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_insert_signed_field()

uint32_t STDCALL hid_insert_signed_field ( HID_FIELD * field,
void * buffer,
uint32_t size,
int32_t value )

Insert a signed field value into a report buffer.

Parameters
FieldThe field to insert into the report
BufferA pointer to the report buffer
SizeThe size in bytes of the report buffer
ValueThe value to insert into the buffer
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_insert_unsigned_field()

uint32_t STDCALL hid_insert_unsigned_field ( HID_FIELD * field,
void * buffer,
uint32_t size,
uint32_t value )

Insert an unsigned field value into a report buffer.

Parameters
FieldThe field to insert into the report
BufferA pointer to the report buffer
SizeThe size in bytes of the report buffer
ValueThe value to insert into the buffer
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_extract_bit_field()

uint32_t STDCALL hid_extract_bit_field ( HID_FIELD * field,
void * buffer,
uint32_t size,
BOOL * value )

Extract a bit field value from a report buffer.

Parameters
FieldThe field to extract from the report
BufferA pointer to the report buffer
SizeThe size in bytes of the report buffer
ValueA variable to receive the extracted value
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_extract_signed_field()

uint32_t STDCALL hid_extract_signed_field ( HID_FIELD * field,
void * buffer,
uint32_t size,
int32_t * value )

Extract a signed field value from a report buffer.

Parameters
FieldThe field to extract from the report
BufferA pointer to the report buffer
SizeThe size in bytes of the report buffer
ValueA variable to receive the extracted value
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_extract_unsigned_field()

uint32_t STDCALL hid_extract_unsigned_field ( HID_FIELD * field,
void * buffer,
uint32_t size,
uint32_t * value )

Extract an unsigned field value from a report buffer.

Parameters
FieldThe field to extract from the report
BufferA pointer to the report buffer
SizeThe size in bytes of the report buffer
ValueA variable to receive the extracted value
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_set_state()

uint32_t STDCALL hid_device_set_state ( HID_DEVICE * device,
uint32_t state )

Set the state of the specified HID device and send a notification.

HID Device Functions

Parameters
DeviceThe HID device to set the state for
StateThe new state to set and notify (eg HID_STATE_ATTACHED)
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_get_idle()

uint32_t STDCALL hid_device_get_idle ( HID_DEVICE * device,
uint16_t * duration,
uint8_t reportid )

Get the idle rate from a HID device for the specified report id.

Parameters
DeviceThe HID device to get the idle rate from
DurationA variable to receive the idle rate (in Milliseconds)
ReportIdThe report id to get the idle rate from
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_set_idle()

uint32_t STDCALL hid_device_set_idle ( HID_DEVICE * device,
uint16_t duration,
uint8_t reportid )

Set the idle rate on a HID device for the specified report id.

Parameters
DeviceThe HID device to set the idle rate for
DurationThe idle rate to set (in Milliseconds)
ReportIdThe report id to set the idle rate for
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_get_report()

uint32_t STDCALL hid_device_get_report ( HID_DEVICE * device,
uint8_t reporttype,
uint8_t reportid,
void * reportdata,
uint32_t reportsize )

Read a report by type and id from a HID device.

Parameters
DeviceThe HID device to read the report from
ReportTypeThe report type to read (eg HID_REPORT_INPUT)
ReportIdThe report id to read (eg HID_REPORTID_NONE)
ReportDataA pointer to a buffer to receive the report data
ReportSizeThe size in bytes of the buffer pointed to by report data
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_set_report()

uint32_t STDCALL hid_device_set_report ( HID_DEVICE * device,
uint8_t reporttype,
uint8_t reportid,
void * reportdata,
uint32_t reportsize )

Write a report by type and id to a HID device.

Parameters
DeviceThe HID device to write the report to
ReportTypeThe report type to write (eg HID_REPORT_OUTPUT)
ReportIdThe report id to write (eg HID_REPORTID_NONE)
ReportDataA pointer to a buffer containing the report data
ReportSizeThe size in bytes of the buffer pointed to by report data
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_allocate_report()

uint32_t STDCALL hid_device_allocate_report ( HID_DEVICE * device,
HID_COLLECTION * collection,
uint8_t reportid,
uint32_t reportsize )

Allocate and initialize an input report by id on a HID device.

Parameters
DeviceThe HID device to allocate the report on
CollectionThe HID collection this request corresponds to
ReportIdThe report id to allocate (eg HID_REPORTID_NONE)
ReportSizeThe size in bytes to allocate for the report (Provider will handle alignment and other requirements)
Returns
ERROR_SUCCESS if completed or another error code on failure
Note
An allocated report must be submitted before reports will be received from the device

◆ hid_device_release_report()

uint32_t STDCALL hid_device_release_report ( HID_DEVICE * device,
uint8_t reportid )

Release an input report by id from a HID device.

Parameters
DeviceThe HID device to release the report from
ReportIdThe report id to allocate (eg HID_REPORTID_NONE)
Returns
ERROR_SUCCESS if completed or another error code on failure
Note
If the report has been submitted it must be cancelled before being released

◆ hid_device_submit_report()

uint32_t STDCALL hid_device_submit_report ( HID_DEVICE * device,
uint8_t reportid )

Submit an input report by id on a HID device.

Parameters
DeviceThe HID device to submit the report on
ReportIdThe report id to submit (eg HID_REPORTID_NONE)
Returns
ERROR_SUCCESS if completed or another error code on failure
Note
The report must be allocated then submitted before reports will be received from the device

◆ hid_device_cancel_report()

uint32_t STDCALL hid_device_cancel_report ( HID_DEVICE * device,
uint8_t reportid )

Cancel an input report by id on a HID device.

Parameters
DeviceThe HID device to cancel the report on
ReportIdThe report id to cancel (eg HID_REPORTID_NONE)
Returns
ERROR_SUCCESS if completed or another error code on failure
Note
The report should be cancelled then released to stop receiving reports from the device

◆ hid_device_get_protocol()

uint32_t STDCALL hid_device_get_protocol ( HID_DEVICE * device,
uint8_t * protocol )

Get the report protocol from a HID device.

Parameters
DeviceThe HID device to get the report protocol from
ProtocolA variable to receive the report protocol (eg HID_PROTOCOL_REPORT)
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_set_protocol()

uint32_t STDCALL hid_device_set_protocol ( HID_DEVICE * device,
uint8_t protocol )

Set the report protocol for a HID device.

Parameters
DeviceThe HID device to set the report protocol for
ProtocolThe report protocol to set (eg HID_PROTOCOL_REPORT)
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_get_interval()

uint32_t STDCALL hid_device_get_interval ( HID_DEVICE * device,
uint32_t * interval )

Get the polling interval from a HID device.

Parameters
DeviceThe HID device to get the polling interval from
IntervalA variable to receive the polling interval (in Milliseconds)
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_set_interval()

uint32_t STDCALL hid_device_set_interval ( HID_DEVICE * device,
uint32_t interval )

Set the polling interval for a HID device.

Parameters
DeviceThe HID device to set the polling interval for
IntervalThe polling interval to set (in Milliseconds)
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_get_report_descriptor()

uint32_t STDCALL hid_device_get_report_descriptor ( HID_DEVICE * device,
HID_REPORT_DESCRIPTOR * descriptor,
uint32_t size )

Get the Report Descriptor for a HID device.

Parameters
DeviceThe HID device to get the descriptor for
DescriptorPointer to a buffer to return the HID Report Descriptor
SizeThe size in bytes of the buffer pointed to by Descriptor
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_get_physical_descriptor_set0()

uint32_t STDCALL hid_device_get_physical_descriptor_set0 ( HID_DEVICE * device,
HID_PHYSICAL_DESCRIPTOR_SET0 * descriptor )

Get the HID Physical Descriptor Set 0 for a HID device.

Parameters
DeviceThe HID device to get the descriptor for
DescriptorPointer to a HID Physical Descriptor Set 0 structure for the returned data
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_get_physical_descriptor_set()

uint32_t STDCALL hid_device_get_physical_descriptor_set ( HID_DEVICE * device,
HID_PHYSICAL_DESCRIPTOR_SET * descriptor,
uint8_t index,
uint32_t size )

Get a HID Physical Descriptor Set for a HID device.

Parameters
DeviceThe HID device to get the descriptor for
DescriptorPointer to a HID Physical Descriptor Set structure for the returned data
IndexThe index of the physical descriptor set to return
SizeThe size in bytes of the buffer pointed to by Descriptor
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_bind_device()

uint32_t STDCALL hid_device_bind_device ( HID_DEVICE * device)

Attempt to bind a HID device to one of the registered consumers.

Parameters
DeviceThe HID device to attempt to bind a consumer to
Returns
ERROR_SUCCESS if completed, ERROR_NOT_SUPPORTED if unsupported or another error code on failure

◆ hid_device_unbind_device()

uint32_t STDCALL hid_device_unbind_device ( HID_DEVICE * device,
HID_CONSUMER * consumer )

Unbind a HID device from a consumer.

Parameters
DeviceThe HID device to unbind a consumer from
ConsumerThe consumer to unbind the device from (nil to unbind from current consumer)
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_bind_collections()

uint32_t STDCALL hid_device_bind_collections ( HID_DEVICE * device)

Attempt to bind the HID collections in the specified device to one of the registered consumers.

Parameters
DeviceThe HID device containing the collections to attempt to bind a consumer to
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_unbind_collections()

uint32_t STDCALL hid_device_unbind_collections ( HID_DEVICE * device,
HID_CONSUMER * consumer )

Unbind the HID collections in the specified device from a consumer.

Parameters
DeviceThe HID device containing the collections to unbind a consumer from
ConsumerThe consumer to unbind the collections from (nil to unbind from current consumer)
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_create()

HID_DEVICE *STDCALL hid_device_create ( void )

Create a new HID device entry.

Returns
Pointer to new HID device entry or nil if HID device could not be created

◆ hid_device_create_ex()

HID_DEVICE *STDCALL hid_device_create_ex ( uint32_t size)

Create a new HID device entry.

Parameters
SizeSize in bytes to allocate for new HID device (Including the HID device entry)
Returns
Pointer to new HID device entry or nil if HID device could not be created

◆ hid_device_destroy()

uint32_t STDCALL hid_device_destroy ( HID_DEVICE * device)

Destroy an existing HID device entry.

Parameters
DeviceThe HID device to destroy
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_register()

uint32_t STDCALL hid_device_register ( HID_DEVICE * device)

Register a new HID device in the HID device table.

Parameters
DeviceThe HID device to register
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_deregister()

uint32_t STDCALL hid_device_deregister ( HID_DEVICE * device)

Deregister a HID device from the HID device table.

Parameters
DeviceThe HID device to deregister
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_find()

HID_DEVICE *STDCALL hid_device_find ( uint32_t hidid)

Find a HID device by ID in the HID device table.

Parameters
HIDIdThe ID number of the HID device to find
Returns
Pointer to HID device entry or nil if not found

◆ hid_device_find_by_name()

HID_DEVICE *STDCALL hid_device_find_by_name ( const char * name)

Find a HID device by name in the device table.

Parameters
NameThe name of the HID device to find (eg HID0)
Returns
Pointer to HID device entry or nil if not found

◆ hid_device_find_by_description()

HID_DEVICE *STDCALL hid_device_find_by_description ( const char * description)

Find a HID device by description in the device table.

Parameters
DescriptionThe description of the HID to find (eg Optical USB Mouse)
Returns
Pointer to HID device entry or nil if not found

◆ hid_device_enumerate()

uint32_t STDCALL hid_device_enumerate ( hid_device_enumerate_cb callback,
void * data )

Enumerate all HID devices in the HID device table.

Parameters
CallbackThe callback function to call for each HID device in the table
DataA private data pointer to pass to callback for each HID device in the table
Returns
ERROR_SUCCESS if completed or another error code on failure

◆ hid_device_notification()

uint32_t STDCALL hid_device_notification ( HID_DEVICE * device,
hid_device_notification_cb callback,
void * data,
uint32_t notification,
uint32_t flags )

Register a notification for HID device changes.

Parameters
DeviceThe HID device to notify changes for (Optional, pass nil for all HID devices)
CallbackThe function to call when a notification event occurs
DataA private data pointer to pass to callback when a notification event occurs
NotificationThe events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER)
FlagsThe flags to control the notification (eg NOTIFIER_FLAG_WORKER)

◆ hid_consumer_create()

HID_CONSUMER *STDCALL hid_consumer_create ( void )

Create a new HID Consumer entry.

HID Consumer Functions

Returns
Pointer to new Consumer entry or nil if consumer could not be created

◆ hid_consumer_create_ex()

HID_CONSUMER *STDCALL hid_consumer_create_ex ( uint32_t size)

Create a new HID Consumer entry.

Parameters
SizeSize in bytes to allocate for new consumer (Including the consumer entry)
Returns
Pointer to new Consumer entry or nil if consumer could not be created

◆ hid_consumer_destroy()

uint32_t STDCALL hid_consumer_destroy ( HID_CONSUMER * consumer)

Destroy an existing HID Consumer entry.

◆ hid_consumer_register()

uint32_t STDCALL hid_consumer_register ( HID_CONSUMER * consumer)

Register a new Consumer in the HID Consumer table.

◆ hid_consumer_deregister()

uint32_t STDCALL hid_consumer_deregister ( HID_CONSUMER * consumer)

Deregister a Consumer from the HID Consumer table.

◆ hid_consumer_find()

HID_CONSUMER *STDCALL hid_consumer_find ( uint32_t consumerid)

Find a consumer by Id in the HID Consumer table.

◆ hid_consumer_find_by_name()

HID_CONSUMER *STDCALL hid_consumer_find_by_name ( const char * name)

Find a consumer by name in the Driver table.

◆ hid_consumer_enumerate()

uint32_t STDCALL hid_consumer_enumerate ( hid_consumer_enumerate_cb callback,
void * data )

Enumerate all consumers in the HID Consumer table.

◆ hid_is_bit_field()

BOOL STDCALL hid_is_bit_field ( HID_FIELD * field)

Return True if the supplied field contains a 1 bit value.

HID Helper Functions

◆ hid_is_byte_field()

BOOL STDCALL hid_is_byte_field ( HID_FIELD * field)

Return True if the supplied HID field contains a 1 byte value.

◆ hid_is_word_field()

BOOL STDCALL hid_is_word_field ( HID_FIELD * field)

Return True if the supplied HID field contains a 2 byte value.

◆ hid_is_long_field()

BOOL STDCALL hid_is_long_field ( HID_FIELD * field)

Return True if the supplied HID field contains a 3 or 4 byte value.

◆ hid_is_signed_field()

BOOL STDCALL hid_is_signed_field ( HID_FIELD * field)

Return True if the supplied HID field contains a signed value.

◆ hid_page_to_string()

uint32_t STDCALL hid_page_to_string ( uint16_t page,
char * string,
uint32_t len )

Return a string describing a HID usage page.

◆ hid_usage_to_string()

uint32_t STDCALL hid_usage_to_string ( uint16_t page,
uint16_t usage,
uint16_t count,
char * string,
uint32_t len )

Return a string describing a HID usage within the given page.

◆ hid_unit_type_to_string()

uint32_t STDCALL hid_unit_type_to_string ( uint32_t unittype,
char * string,
uint32_t len )

Return a string describing a HID unit type.

◆ hid_report_kind_to_string()

uint32_t STDCALL hid_report_kind_to_string ( uint8_t kind,
char * string,
uint32_t len )

Return a string describing a HID report type.

◆ hid_report_flags_to_string()

uint32_t STDCALL hid_report_flags_to_string ( uint32_t flags,
char * string,
uint32_t len )

Return a string describing the flags of a HID report.

◆ hid_collection_flags_to_string()

uint32_t STDCALL hid_collection_flags_to_string ( uint32_t flags,
char * string,
uint32_t len )

Return a string describing the flags of a HID collection.

◆ hid_device_get_count()

uint32_t STDCALL hid_device_get_count ( void )

Get the current HID Device count.

HID Device Helper Functions

◆ hid_device_check()

HID_DEVICE *STDCALL hid_device_check ( HID_DEVICE * device)

Check if the supplied HID Device is in the device table.

◆ hid_device_type_to_string()

uint32_t STDCALL hid_device_type_to_string ( uint32_t hidtype,
char * string,
uint32_t len )

Return a string describing the HID device type (eg HID_TYPE_USB).

◆ hid_device_state_to_string()

uint32_t STDCALL hid_device_state_to_string ( uint32_t hidstate,
char * string,
uint32_t len )

Return a string describing the HID device state (eg HID_STATE_ATTACHED).

◆ hid_device_state_to_notification()

uint32_t STDCALL hid_device_state_to_notification ( uint32_t state)

Convert a Device state value into the notification code for device notifications.

◆ hid_consumer_get_count()

uint32_t STDCALL hid_consumer_get_count ( void )

Get the current HID Consumer count.

HID Consumer Helper Functions

◆ hid_consumer_check()

HID_CONSUMER *STDCALL hid_consumer_check ( HID_CONSUMER * consumer)

Check if the supplied HID Consumer is in the consumer table.

Variable Documentation

◆ PACKED