Changeset 3d4aa055 in mainline for uspace/lib/usb/include/usb/classes/hid_report_items.h
- Timestamp:
- 2011-05-06T13:08:10Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 075c1eb, 3da17644
- Parents:
- a58dd620 (diff), 310c4df (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/classes/hid_report_items.h
ra58dd620 r3d4aa055 1 1 /* 2 * Copyright (c) 201 0 Vojtech Horky2 * Copyright (c) 2011 Matej Klonfar 3 3 * All rights reserved. 4 4 * … … 37 37 38 38 #include <stdint.h> 39 40 /** 41 * Item prefix 42 */ 43 #define USB_HID_ITEM_SIZE(data) ((uint8_t)(data & 0x3)) 44 #define USB_HID_ITEM_TAG(data) ((uint8_t)((data & 0xF0) >> 4)) 45 #define USB_HID_ITEM_TAG_CLASS(data) ((uint8_t)((data & 0xC) >> 2)) 46 #define USB_HID_ITEM_IS_LONG(data) (data == 0xFE) 47 48 49 /** 50 * Input/Output/Feature Item flags 51 */ 52 /** Constant (1) / Variable (0) */ 53 #define USB_HID_ITEM_FLAG_CONSTANT(flags) ((flags & 0x1) == 0x1) 54 /** Variable (1) / Array (0) */ 55 #define USB_HID_ITEM_FLAG_VARIABLE(flags) ((flags & 0x2) == 0x2) 56 /** Absolute / Relative*/ 57 #define USB_HID_ITEM_FLAG_RELATIVE(flags) ((flags & 0x4) == 0x4) 58 /** Wrap / No Wrap */ 59 #define USB_HID_ITEM_FLAG_WRAP(flags) ((flags & 0x8) == 0x8) 60 #define USB_HID_ITEM_FLAG_LINEAR(flags) ((flags & 0x10) == 0x10) 61 #define USB_HID_ITEM_FLAG_PREFERRED(flags) ((flags & 0x20) == 0x20) 62 #define USB_HID_ITEM_FLAG_POSITION(flags) ((flags & 0x40) == 0x40) 63 #define USB_HID_ITEM_FLAG_VOLATILE(flags) ((flags & 0x80) == 0x80) 64 #define USB_HID_ITEM_FLAG_BUFFERED(flags) ((flags & 0x100) == 0x100) 39 65 40 66 /* MAIN ITEMS */
Note:
See TracChangeset
for help on using the changeset viewer.