Zephyr API 3.6.99
Loading...
Searching...
No Matches
USB HID Item helpers

Macros

#define HID_ITEM(bTag, bType, bSize)
 Define HID short item.
 
#define HID_INPUT(a)
 Define HID Input item with the data length of one byte.
 
#define HID_OUTPUT(a)
 Define HID Output item with the data length of one byte.
 
#define HID_FEATURE(a)
 Define HID Feature item with the data length of one byte.
 
#define HID_COLLECTION(a)
 Define HID Collection item with the data length of one byte.
 
#define HID_END_COLLECTION    HID_ITEM(HID_ITEM_TAG_COLLECTION_END, HID_ITEM_TYPE_MAIN, 0)
 Define HID End Collection (non-data) item.
 
#define HID_USAGE_PAGE(page)
 Define HID Usage Page item.
 
#define HID_LOGICAL_MIN8(a)
 Define HID Logical Minimum item with the data length of one byte.
 
#define HID_LOGICAL_MAX8(a)
 Define HID Logical Maximum item with the data length of one byte.
 
#define HID_LOGICAL_MIN16(a, b)
 Define HID Logical Minimum item with the data length of two bytes.
 
#define HID_LOGICAL_MAX16(a, b)
 Define HID Logical Maximum item with the data length of two bytes.
 
#define HID_LOGICAL_MIN32(a, b, c, d)
 Define HID Logical Minimum item with the data length of four bytes.
 
#define HID_LOGICAL_MAX32(a, b, c, d)
 Define HID Logical Maximum item with the data length of four bytes.
 
#define HID_REPORT_SIZE(size)
 Define HID Report Size item with the data length of one byte.
 
#define HID_REPORT_ID(id)
 Define HID Report ID item with the data length of one byte.
 
#define HID_REPORT_COUNT(count)
 Define HID Report Count item with the data length of one byte.
 
#define HID_USAGE(idx)
 Define HID Usage Index item with the data length of one byte.
 
#define HID_USAGE_MIN8(a)
 Define HID Usage Minimum item with the data length of one byte.
 
#define HID_USAGE_MAX8(a)
 Define HID Usage Maximum item with the data length of one byte.
 
#define HID_USAGE_MIN16(a, b)
 Define HID Usage Minimum item with the data length of two bytes.
 
#define HID_USAGE_MAX16(a, b)
 Define HID Usage Maximum item with the data length of two bytes.
 

Detailed Description

Macro Definition Documentation

◆ HID_COLLECTION

#define HID_COLLECTION ( a)

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TAG_COLLECTION
HID Collection item tag.
Definition hid.h:82
#define HID_ITEM_TYPE_MAIN
HID Main item type.
Definition hid.h:71
#define HID_ITEM(bTag, bType, bSize)
Define HID short item.
Definition hid.h:181

Define HID Collection item with the data length of one byte.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
aCollection item data
Returns
HID Collection item

◆ HID_END_COLLECTION

#define HID_END_COLLECTION    HID_ITEM(HID_ITEM_TAG_COLLECTION_END, HID_ITEM_TYPE_MAIN, 0)

#include <zephyr/usb/class/hid.h>

Define HID End Collection (non-data) item.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Returns
HID End Collection item

◆ HID_FEATURE

#define HID_FEATURE ( a)

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TAG_FEATURE
HID Feature item tag.
Definition hid.h:84

Define HID Feature item with the data length of one byte.

Parameters
aFeature item data
Returns
HID Feature item

◆ HID_INPUT

#define HID_INPUT ( a)

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TAG_INPUT
HID Input item tag.
Definition hid.h:78

Define HID Input item with the data length of one byte.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
aInput item data
Returns
HID Input item

◆ HID_ITEM

#define HID_ITEM ( bTag,
bType,
bSize )

#include <zephyr/usb/class/hid.h>

Value:
(((bTag & 0xF) << 4) | \
((bType & 0x3) << 2) | (bSize & 0x3))

Define HID short item.

Parameters
bTagItem tag
bTypeItem type
bSizeItem data size
Returns
HID Input item

◆ HID_LOGICAL_MAX16

#define HID_LOGICAL_MAX16 ( a,
b )

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TYPE_GLOBAL
HID Global item type.
Definition hid.h:73
#define HID_ITEM_TAG_LOGICAL_MAX
HID Logical Maximum item tag.
Definition hid.h:93

Define HID Logical Maximum item with the data length of two bytes.

Parameters
aMinimum value lower byte
bMinimum value higher byte
Returns
HID Logical Maximum item

◆ HID_LOGICAL_MAX32

#define HID_LOGICAL_MAX32 ( a,
b,
c,
d )

#include <zephyr/usb/class/hid.h>

Value:
irp nz macro MOVR cc d
Definition asm-macro-32-bit-gnu.h:11

Define HID Logical Maximum item with the data length of four bytes.

Parameters
aMinimum value lower byte
bMinimum value low middle byte
cMinimum value high middle byte
dMinimum value higher byte
Returns
HID Logical Maximum item

◆ HID_LOGICAL_MAX8

#define HID_LOGICAL_MAX8 ( a)

#include <zephyr/usb/class/hid.h>

Value:

Define HID Logical Maximum item with the data length of one byte.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
aMaximum value in logical units
Returns
HID Logical Maximum item

◆ HID_LOGICAL_MIN16

#define HID_LOGICAL_MIN16 ( a,
b )

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TAG_LOGICAL_MIN
HID Logical Minimum item tag.
Definition hid.h:91

Define HID Logical Minimum item with the data length of two bytes.

Parameters
aMinimum value lower byte
bMinimum value higher byte
Returns
HID Logical Minimum item

◆ HID_LOGICAL_MIN32

#define HID_LOGICAL_MIN32 ( a,
b,
c,
d )

#include <zephyr/usb/class/hid.h>

Value:

Define HID Logical Minimum item with the data length of four bytes.

Parameters
aMinimum value lower byte
bMinimum value low middle byte
cMinimum value high middle byte
dMinimum value higher byte
Returns
HID Logical Minimum item

◆ HID_LOGICAL_MIN8

#define HID_LOGICAL_MIN8 ( a)

#include <zephyr/usb/class/hid.h>

Value:

Define HID Logical Minimum item with the data length of one byte.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
aMinimum value in logical units
Returns
HID Logical Minimum item

◆ HID_OUTPUT

#define HID_OUTPUT ( a)

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TAG_OUTPUT
HID Output item tag.
Definition hid.h:80

Define HID Output item with the data length of one byte.

For usage examples, see HID_KEYBOARD_REPORT_DESC()

Parameters
aOutput item data
Returns
HID Output item

◆ HID_REPORT_COUNT

#define HID_REPORT_COUNT ( count)

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TAG_REPORT_COUNT
HID Report count item tag.
Definition hid.h:107

Define HID Report Count item with the data length of one byte.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
countNumber of data fields included in the report
Returns
HID Report Count item

◆ HID_REPORT_ID

#define HID_REPORT_ID ( id)

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TAG_REPORT_ID
HID Report ID item tag.
Definition hid.h:105

Define HID Report ID item with the data length of one byte.

Parameters
idReport ID
Returns
HID Report ID item

◆ HID_REPORT_SIZE

#define HID_REPORT_SIZE ( size)

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TAG_REPORT_SIZE
HID Report Size item tag.
Definition hid.h:103

Define HID Report Size item with the data length of one byte.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
sizeReport field size in bits
Returns
HID Report Size item

◆ HID_USAGE

#define HID_USAGE ( idx)

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TYPE_LOCAL
HID Local item type.
Definition hid.h:75
#define HID_ITEM_TAG_USAGE
HID Usage item tag.
Definition hid.h:110

Define HID Usage Index item with the data length of one byte.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
idxNumber of data fields included in the report
Returns
HID Usage Index item

◆ HID_USAGE_MAX16

#define HID_USAGE_MAX16 ( a,
b )

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TAG_USAGE_MAX
HID Usage Maximum item tag.
Definition hid.h:114

Define HID Usage Maximum item with the data length of two bytes.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
aEnding Usage lower byte
bEnding Usage higher byte
Returns
HID Usage Maximum item

◆ HID_USAGE_MAX8

#define HID_USAGE_MAX8 ( a)

#include <zephyr/usb/class/hid.h>

Value:

Define HID Usage Maximum item with the data length of one byte.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
aEnding Usage
Returns
HID Usage Maximum item

◆ HID_USAGE_MIN16

#define HID_USAGE_MIN16 ( a,
b )

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TAG_USAGE_MIN
HID Usage Minimum item tag.
Definition hid.h:112

Define HID Usage Minimum item with the data length of two bytes.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
aStarting Usage lower byte
bStarting Usage higher byte
Returns
HID Usage Minimum item

◆ HID_USAGE_MIN8

#define HID_USAGE_MIN8 ( a)

#include <zephyr/usb/class/hid.h>

Value:

Define HID Usage Minimum item with the data length of one byte.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
aStarting Usage
Returns
HID Usage Minimum item

◆ HID_USAGE_PAGE

#define HID_USAGE_PAGE ( page)

#include <zephyr/usb/class/hid.h>

Value:
#define HID_ITEM_TAG_USAGE_PAGE
HID Usage Page item tag.
Definition hid.h:89

Define HID Usage Page item.

For usage examples, see HID_MOUSE_REPORT_DESC(), HID_KEYBOARD_REPORT_DESC()

Parameters
pageUsage Page
Returns
HID Usage Page item