Object-like macros
Definitions:
Miscellaneous
#define _HIDDI_NFUNCS ((sizeof(hidd_funcs_t) - sizeof(_Uint32t)) / sizeof(void *))
Number of function pointers in hidd_funcs_t. Usually assigned to nentries member.
#define HIDD_VERSION 0x0100
HID server version used to determine if clients can connect to the HID server.
#define HID_VERSION 0x0100
HID DDK version. Used by client to compatibility with connection parameters, and to determine if clients can connect to the HID server.
#define HIDD_CONNECT_WAIT 60
Represents 60 seconds, which is the recommended connection wait time.
#define HIDD_CONNECT_WILDCARD 0xFFFFFFFF
Used to indicate all vendors, all products, and all versions in hidd_device_ident_t.
Flags for report attach
#define HIDD_REPORT_EXCLUSIVE 0x02
Used by hidd_report_attach() to indicate that other clients should not be able to attach these reports; other clients will receive EBUSY.
#define HIDD_REPORT_FILTER 0x01
Used by hidd_report_attach() to indicate that other client should also receive the reports.
| HIDD_REPORT_EXCLUSIVE unset | HIDD_REPORT_EXCLUSIVE set | |
|---|---|---|
| HIDD_REPORT_FILTER unset | Many clients can attach the report, but only the latest one receives them. | Only one client can attach the report. Other clients will fail. |
| HIDD_REPORT_FILTER set | Many clients can attach the report and all off them will receive the reports. | Only one client can attach the report. Other clients will fail. |
Connection flags
#define HIDD_CONNECT_FLAGS_PNP_MONITOR 0x80000000
#define HIDD_CONNECT_FLAGS_SET_STACK_SIZE 0x40000000
If set, the connection stack size is set to larger of stack_size or 16.
Data properties
For more information on the following flags, refer to section 6.2.2.5 Input,
Output, and Feature Items, Parts, Bit 0 to 8
in the Device Class Definition for HID
1.11.
#define HIDD_DATA_CONSTANT 0x00000001
Flag set indicates constant; report item is read-only.
Flag unset indicates data; report item defines report modifiable device data field.
#define HIDD_DATA_VARIABLE 0x00000002
Flag set indicates variable; each field contains data from a physical control.
Flag unset indicates array; array contains index in each field that corresponds to the pressed button.
#define HIDD_DATA_RELATIVE 0x00000004
Flag set indicates absolute; data is based on fixed origin (e.g., touch events).
Flag unset indicates relative; data indicates change since last report (e.g., mouse movements).
#define HIDD_DATA_WRAP 0x00000008
Flag set indicates wrap; once data value reaches the maximum value, it can roll-over to the minimum value. Similarly, once data value reaches the minimum value, it can roll-over to the maximum value (e.g., a free-spinning dial).
Flag unset indicates no wrap; data cannot roll-over upon reaching maximum or minimum values (e.g., a slider).
#define HIDD_DATA_NONLINEAR 0x00000010
Flag set indicates nonlinear; data has been pre-processed in some way and doesn't indicate actual measurement.
Flag unset indicates linear; data represents linear relationship between measurement and reported data.
#define HIDD_DATA_NO_PREFERRED_STATE 0x00000020
Flag set indicates no preferred state; control doesn't have a default state without user interaction (e.g., a toggle button).
Flag unset indicates preferred state; control has a default state without user interaction (e.g., a push button).
#define HIDD_DATA_NULL_STATE 0x00000040
Flag set indicates null state; control doesn't send meaningful data without user interaction (e.g., a hat switch).
Flag unset indicates no null state; control sends valid data regardless of user interaction (e.g., a push button).
#define HIDD_DATA_VOLITILE 0x00000080
Only valid for feature and output reports.
Flag set indicates volatile; output can change with or without host interaction.
Flag unset indicates non-volatile; output value should be changed by host.
For input reports, this field is undefined and reserved for future use.
#define HIDD_DATA_BUFFERED_BYTES 0x00000100
Flag set indicates buffered bytes; control emits a fixed-size stream of bytes, aligned on an 8-bit boundary (e.g., a bar code reader).
Flag unset indicates bit field; control emits a single numeric quantity.
