USB HID descriptor format helpers. More...
USB HID descriptor format helpers.
Macros | |
#define | USB_HID_ITEM_TYPE_MAIN 0x0 |
HID Main item type. | |
#define | USB_HID_ITEM_TYPE_GLOBAL 0x1 |
HID Global item type. | |
#define | USB_HID_ITEM_TYPE_LOCAL 0x2 |
HID Local item type. | |
#define | USB_HID_ITEM_TAG_INPUT 0x8 |
HID Input item tag. | |
#define | USB_HID_ITEM_TAG_OUTPUT 0x9 |
HID Output item tag. | |
#define | USB_HID_ITEM_TAG_COLLECTION 0xA |
HID Collection item tag. | |
#define | USB_HID_ITEM_TAG_FEATURE 0xB |
HID Feature item tag. | |
#define | USB_HID_ITEM_TAG_COLLECTION_END 0xC |
HID End Collection item tag. | |
#define | USB_HID_ITEM_TAG_USAGE_PAGE 0x0 |
HID Usage Page item tag. | |
#define | USB_HID_ITEM_TAG_LOGICAL_MIN 0x1 |
HID Logical Minimum item tag. | |
#define | USB_HID_ITEM_TAG_LOGICAL_MAX 0x2 |
HID Logical Maximum item tag. | |
#define | USB_HID_ITEM_TAG_PHYSICAL_MIN 0x3 |
HID Physical Minimum item tag. | |
#define | USB_HID_ITEM_TAG_PHYSICAL_MAX 0x4 |
HID Physical Maximum item tag. | |
#define | USB_HID_ITEM_TAG_UNIT_EXPONENT 0x5 |
HID Unit Exponent item tag. | |
#define | USB_HID_ITEM_TAG_UNIT 0x6 |
HID Unit item tag. | |
#define | USB_HID_ITEM_TAG_REPORT_SIZE 0x7 |
HID Report Size item tag. | |
#define | USB_HID_ITEM_TAG_REPORT_ID 0x8 |
HID Report ID item tag. | |
#define | USB_HID_ITEM_TAG_REPORT_COUNT 0x9 |
HID Report count item tag. | |
#define | USB_HID_ITEM_TAG_USAGE 0x0 |
HID Usage item tag. | |
#define | USB_HID_ITEM_TAG_USAGE_MIN 0x1 |
HID Usage Minimum item tag. | |
#define | USB_HID_ITEM_TAG_USAGE_MAX 0x2 |
HID Usage Maximum item tag. | |
#define | USB_HID_COLLECTION_PHYSICAL 0x00 |
Physical collection type. | |
#define | USB_HID_COLLECTION_APPLICATION 0x01 |
Application collection type. | |
#define | USB_HID_COLLECTION_LOGICAL 0x02 |
Logical (interrelated data) collection type. | |
#define | USB_HID_COLLECTION_REPORT 0x03 |
Report collection type. | |
#define | USB_HID_COLLECTION_NAMED_ARRAY 0x04 |
Named array collection type. | |
#define | USB_HID_COLLECTION_USAGE_SWITCH 0x05 |
Usage switch collection type. | |
#define | USB_HID_COLLECTION_USAGE_MOD 0x06 |
Modifier switch collection type. | |
#define | USB_HID_ITEM(tag, type, size) (((tag & 0xF) << 4) | ((type & 0x3) << 2) | (size & 0x3)) |
Defines a HID descriptor short item. | |
#define | USB_HID_INPUT(input) |
Defines a HID descriptor input item. | |
#define | USB_HID_OUTPUT(output) |
Defines a HID descriptor output item. | |
#define | USB_HID_FEATURE(feature) |
Defines a HID Feature item. | |
#define | USB_HID_COLLECTION(collection) |
Defines a HID Collection item. | |
#define | USB_HID_END_COLLECTION USB_HID_ITEM(USB_HID_ITEM_TAG_COLLECTION_END, USB_HID_ITEM_TYPE_MAIN, 0) |
Defines a HID End Collection item. | |
#define | USB_HID_USAGE_PAGE(page) |
Defines a HID Usage Page item. | |
#define | USB_HID_USAGE_PAGE16(page) |
Defines a HID Usage Page item. | |
#define | USB_HID_LOGICAL_MIN8(minimum) |
Defines a HID Logical Minimum item. | |
#define | USB_HID_LOGICAL_MIN16(minimum) |
Defines a HID Logical Minimum item. | |
#define | USB_HID_LOGICAL_MIN32(minimum) |
Defines a HID Logical Minimum item. | |
#define | USB_HID_LOGICAL_MAX8(maximum) |
Defines a HID Logical Maximum item. | |
#define | USB_HID_LOGICAL_MAX16(maximum) |
Defines a HID Logical Maximum item. | |
#define | USB_HID_LOGICAL_MAX32(maximum) |
Defines a HID Logical Maximum item. | |
#define | USB_HID_REPORT_SIZE(size) |
Defines a HID Report Size item. | |
#define | USB_HID_REPORT_ID(id) |
Defines a HID Report ID item. | |
#define | USB_HID_REPORT_COUNT(count) |
Define HID Report Count item. | |
#define | USB_HID_USAGE(index) |
Defines a HID Usage Index item. | |
#define | USB_HID_USAGE_MIN8(start) |
Defines a HID Usage Minimum item. | |
#define | USB_HID_USAGE_MIN16(start) |
Define HID Usage Minimum item with the data length of two bytes. | |
#define | USB_HID_USAGE_MAX8(end) |
Defines HID Usage Maximum item. | |
#define | USB_HID_USAGE_MAX16(end) |
Defines HID Usage Maximum item. | |
#define USB_HID_COLLECTION | ( | collection | ) |
#define USB_HID_COLLECTION_APPLICATION 0x01 |
#define USB_HID_COLLECTION_LOGICAL 0x02 |
#define USB_HID_COLLECTION_NAMED_ARRAY 0x04 |
#define USB_HID_COLLECTION_PHYSICAL 0x00 |
#define USB_HID_COLLECTION_REPORT 0x03 |
#define USB_HID_COLLECTION_USAGE_MOD 0x06 |
#define USB_HID_COLLECTION_USAGE_SWITCH 0x05 |
#define USB_HID_END_COLLECTION USB_HID_ITEM(USB_HID_ITEM_TAG_COLLECTION_END, USB_HID_ITEM_TYPE_MAIN, 0) |
#define USB_HID_FEATURE | ( | feature | ) |
Defines a HID Feature item.
feature | Feature item data |
#define USB_HID_INPUT | ( | input | ) |
Defines a HID descriptor input item.
input | Input item flags |
#define USB_HID_ITEM | ( | tag, | |
type, | |||
size | |||
) | (((tag & 0xF) << 4) | ((type & 0x3) << 2) | (size & 0x3)) |
#define USB_HID_ITEM_TAG_COLLECTION 0xA |
#define USB_HID_ITEM_TAG_COLLECTION_END 0xC |
#define USB_HID_ITEM_TAG_LOGICAL_MAX 0x2 |
#define USB_HID_ITEM_TAG_LOGICAL_MIN 0x1 |
#define USB_HID_ITEM_TAG_PHYSICAL_MAX 0x4 |
#define USB_HID_ITEM_TAG_PHYSICAL_MIN 0x3 |
#define USB_HID_ITEM_TAG_REPORT_COUNT 0x9 |
#define USB_HID_ITEM_TAG_REPORT_ID 0x8 |
#define USB_HID_ITEM_TAG_REPORT_SIZE 0x7 |
#define USB_HID_ITEM_TAG_UNIT_EXPONENT 0x5 |
#define USB_HID_ITEM_TAG_USAGE_MAX 0x2 |
#define USB_HID_ITEM_TAG_USAGE_MIN 0x1 |
#define USB_HID_ITEM_TAG_USAGE_PAGE 0x0 |
#define USB_HID_LOGICAL_MAX16 | ( | maximum | ) |
Defines a HID Logical Maximum item.
maximum | Maximum value in logical units |
#define USB_HID_LOGICAL_MAX32 | ( | maximum | ) |
Defines a HID Logical Maximum item.
maximum | Maximum value in logical units |
#define USB_HID_LOGICAL_MAX8 | ( | maximum | ) |
Defines a HID Logical Maximum item.
maximum | Maximum value in logical units |
#define USB_HID_LOGICAL_MIN16 | ( | minimum | ) |
Defines a HID Logical Minimum item.
minimum | Minimum value in logical units |
#define USB_HID_LOGICAL_MIN32 | ( | minimum | ) |
Defines a HID Logical Minimum item.
minimum | Minimum value in logical units |
#define USB_HID_LOGICAL_MIN8 | ( | minimum | ) |
Defines a HID Logical Minimum item.
minimum | Minimum value in logical units |
#define USB_HID_OUTPUT | ( | output | ) |
Defines a HID descriptor output item.
output | Output item flags |
#define USB_HID_REPORT_COUNT | ( | count | ) |
Define HID Report Count item.
count | Number of data fields included in the report |
#define USB_HID_REPORT_ID | ( | id | ) |
Defines a HID Report ID item.
id | Report ID |
#define USB_HID_REPORT_SIZE | ( | size | ) |
Defines a HID Report Size item.
size | Report field size in bits |
#define USB_HID_USAGE | ( | index | ) |
Defines a HID Usage Index item.
index | Number of data fields included in the report |
#define USB_HID_USAGE_MAX16 | ( | end | ) |
Defines HID Usage Maximum item.
end | Ending Usage |
#define USB_HID_USAGE_MAX8 | ( | end | ) |
Defines HID Usage Maximum item.
end | Ending Usage |
#define USB_HID_USAGE_MIN16 | ( | start | ) |
Define HID Usage Minimum item with the data length of two bytes.
start | Starting Usage |
#define USB_HID_USAGE_MIN8 | ( | start | ) |
Defines a HID Usage Minimum item.
start | Starting Usage |
#define USB_HID_USAGE_PAGE | ( | page | ) |
Defines a HID Usage Page item.
page | Usage Page |
#define USB_HID_USAGE_PAGE16 | ( | page | ) |
Defines a HID Usage Page item.
page | Usage page |