#include <stdint.h>
Go to the source code of this file.
Defines | |
#define | USB_HID_EXTENDED_USAGE(usage) (usage & 0xFFFF) |
Cuts usage of the extended usage. | |
#define | USB_HID_EXTENDED_USAGE_PAGE(usage) ((usage & 0xFFFF0000) >> 16) |
Cuts usage page of the extended usage. | |
#define | USB_HID_IS_EXTENDED_USAGE(usage) ((usage & 0xFFFF0000) != 0) |
Recognizes if the given usage is extended (contains also usage page). | |
#define | USB_HID_ITEM_FLAG_BUFFERED(flags) ((flags & 0x100) == 0x100) |
Indicates that the control emits a fixed-size stream of bytes. | |
#define | USB_HID_ITEM_FLAG_CONSTANT(flags) ((flags & 0x1) == 0x1) |
Indicates whether the item is data (0) or a constant (1) value. | |
#define | USB_HID_ITEM_FLAG_LINEAR(flags) ((flags & 0x10) == 0x10) |
Indicates whether the raw data from the device has been processed in some way, and no longer represents a linear relationship between what is measured and the data that is reported. | |
#define | USB_HID_ITEM_FLAG_POSITION(flags) ((flags & 0x40) == 0x40) |
Indicates whether the control has a state in which it is not sending meaningful data. | |
#define | USB_HID_ITEM_FLAG_PREFERRED(flags) ((flags & 0x20) == 0x20) |
Indicates whether the control has a preferred state to which it will return when the user is not physically interacting with the control. | |
#define | USB_HID_ITEM_FLAG_RELATIVE(flags) ((flags & 0x4) == 0x4) |
Indicates whether the data is absolute (0) (based on a fixed origin) or relative (1) (indicating the change in value from the last report). | |
#define | USB_HID_ITEM_FLAG_VARIABLE(flags) ((flags & 0x2) == 0x2) |
Indicates whether the item creates variable (1) or array (0) data fields in reports. | |
#define | USB_HID_ITEM_FLAG_VOLATILE(flags) ((flags & 0x80) == 0x80) |
Indicates whether the Feature or Output control's value should be changed by the host or not. | |
#define | USB_HID_ITEM_FLAG_WRAP(flags) ((flags & 0x8) == 0x8) |
Indicates whether the data “rolls over” when reaching either the extreme high or low value. | |
#define | USB_HID_ITEM_IS_LONG(data) (data == 0xFE) |
Returns if the item is the short item or long item. | |
#define | USB_HID_ITEM_SIZE(data) ((uint8_t)(data & 0x3)) |
Returns size of item data in bytes. | |
#define | USB_HID_ITEM_TAG(data) ((uint8_t)((data & 0xF0) >> 4)) |
Returns item tag. | |
#define | USB_HID_ITEM_TAG_CLASS(data) ((uint8_t)((data & 0xC) >> 2)) |
Returns class of item tag. | |
#define | USB_HID_REPORT_TAG_COLLECTION 0xA |
A Collection item identifies a relationship between two or more data (Input, Output, or Feature. | |
#define | USB_HID_REPORT_TAG_DELIMITER 0xA |
Defines the beginning or end of a set of local items (1 = open set, 0 = close set). | |
#define | USB_HID_REPORT_TAG_DESIGNATOR_INDEX 0x3 |
Determines the body part used for a control. | |
#define | USB_HID_REPORT_TAG_DESIGNATOR_MAXIMUM 0x5 |
Defines the index of the ending designator associated with an array or bitmap. | |
#define | USB_HID_REPORT_TAG_DESIGNATOR_MINIMUM 0x4 |
Defines the index of the starting designator associated with an array or bitmap. | |
#define | USB_HID_REPORT_TAG_END_COLLECTION 0xC |
While the Collection item opens a collection of data, the End Collection item closes a collection. | |
#define | USB_HID_REPORT_TAG_FEATURE 0xB |
Feature items describe device configuration information that can be sent to the device. | |
#define | USB_HID_REPORT_TAG_INPUT 0x8 |
An Input item describes information about the data provided by one or more physical controls. | |
#define | USB_HID_REPORT_TAG_LOGICAL_MAXIMUM 0x2 |
Extent value in logical units. | |
#define | USB_HID_REPORT_TAG_LOGICAL_MINIMUM 0x1 |
Extent value in logical units. | |
#define | USB_HID_REPORT_TAG_OUTPUT 0x9 |
The Output item is used to define an output data field in a report. | |
#define | USB_HID_REPORT_TAG_PHYSICAL_MAXIMUM 0x4 |
Maximum value for the physical extent of a variable item. | |
#define | USB_HID_REPORT_TAG_PHYSICAL_MINIMUM 0x3 |
Minimum value for the physical extent of a variable item. | |
#define | USB_HID_REPORT_TAG_POP 0xB |
Replaces the item state table with the top structure from the stack. | |
#define | USB_HID_REPORT_TAG_PUSH 0xA |
Places a copy of the global item state table on the stack. | |
#define | USB_HID_REPORT_TAG_REPORT_COUNT 0x9 |
Unsigned integer specifying the number of data fields for the item; determines how many fields are included in the report for this particular item (and consequently how many bits are added to the report). | |
#define | USB_HID_REPORT_TAG_REPORT_ID 0x8 |
Unsigned value that specifies the Report ID. | |
#define | USB_HID_REPORT_TAG_REPORT_SIZE 0x7 |
Unsigned integer specifying the size of the report fields in bits. | |
#define | USB_HID_REPORT_TAG_STRING_INDEX 0x7 |
String index for a String descriptor; allows a string to be associated with a particular item or control. | |
#define | USB_HID_REPORT_TAG_STRING_MAXIMUM 0x9 |
Specifies the last string index when assigning a group of sequential strings to controls in an array or bitmap. | |
#define | USB_HID_REPORT_TAG_STRING_MINIMUM 0x8 |
Specifies the first string index when assigning a group of sequential strings to controls in an array or bitmap. | |
#define | USB_HID_REPORT_TAG_UNIT 0x6 |
Unit values. | |
#define | USB_HID_REPORT_TAG_UNIT_EXPONENT 0x5 |
Value of the unit exponent in base 10. | |
#define | USB_HID_REPORT_TAG_USAGE 0x0 |
Usage index for an item usage; represents a suggested usage for the item or collection. | |
#define | USB_HID_REPORT_TAG_USAGE_MAXIMUM 0x2 |
Defines the ending usage associated with an array or bitmap. | |
#define | USB_HID_REPORT_TAG_USAGE_MINIMUM 0x1 |
Defines the starting usage associated with an array or bitmap. | |
#define | USB_HID_REPORT_TAG_USAGE_PAGE 0x0 |
Unsigned integer specifying the current Usage Page. | |
#define | USB_HID_TAG_CLASS_GLOBAL 0x1 |
Global items describe rather than define data from a control. | |
#define | USB_HID_TAG_CLASS_LOCAL 0x2 |
Local item tags define characteristics of controls. | |
#define | USB_HID_TAG_CLASS_MAIN 0x0 |
Main items are used to either define or group certain types of data fields within a Report descriptor. |
Definition in file hid_report_items.h.