Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
USB HID common definitions

hid.h API More...

Modules

 Mouse and keyboard report descriptors
 
 USB HID Item helpers
 

USB HID types and values

#define USB_HID_VERSION   0x0111
 HID Specification release v1.11.
 
#define USB_DESC_HID   0x21
 USB HID Class HID descriptor type.
 
#define USB_DESC_HID_REPORT   0x22
 USB HID Class Report descriptor type.
 
#define USB_DESC_HID_PHYSICAL   0x23
 USB HID Class physical descriptor type.
 
#define USB_HID_GET_REPORT   0x01
 USB HID Class GetReport bRequest value.
 
#define USB_HID_GET_IDLE   0x02
 USB HID Class GetIdle bRequest value.
 
#define USB_HID_GET_PROTOCOL   0x03
 USB HID Class GetProtocol bRequest value.
 
#define USB_HID_SET_REPORT   0x09
 USB HID Class SetReport bRequest value.
 
#define USB_HID_SET_IDLE   0x0A
 USB HID Class SetIdle bRequest value.
 
#define USB_HID_SET_PROTOCOL   0x0B
 USB HID Class SetProtocol bRequest value.
 
#define HID_BOOT_IFACE_CODE_NONE   0
 USB HID Boot Interface Protocol (bInterfaceProtocol) Code None.
 
#define HID_BOOT_IFACE_CODE_KEYBOARD   1
 USB HID Boot Interface Protocol (bInterfaceProtocol) Code Keyboard.
 
#define HID_BOOT_IFACE_CODE_MOUSE   2
 USB HID Boot Interface Protocol (bInterfaceProtocol) Code Mouse.
 
#define HID_PROTOCOL_BOOT   0
 USB HID Class Boot protocol code.
 
#define HID_PROTOCOL_REPORT   1
 USB HID Class Report protocol code.
 
#define HID_ITEM_TYPE_MAIN   0x0
 HID Main item type.
 
#define HID_ITEM_TYPE_GLOBAL   0x1
 HID Global item type.
 
#define HID_ITEM_TYPE_LOCAL   0x2
 HID Local item type.
 
#define HID_ITEM_TAG_INPUT   0x8
 HID Input item tag.
 
#define HID_ITEM_TAG_OUTPUT   0x9
 HID Output item tag.
 
#define HID_ITEM_TAG_COLLECTION   0xA
 HID Collection item tag.
 
#define HID_ITEM_TAG_FEATURE   0xB
 HID Feature item tag.
 
#define HID_ITEM_TAG_COLLECTION_END   0xC
 HID End Collection item tag.
 
#define HID_ITEM_TAG_USAGE_PAGE   0x0
 HID Usage Page item tag.
 
#define HID_ITEM_TAG_LOGICAL_MIN   0x1
 HID Logical Minimum item tag.
 
#define HID_ITEM_TAG_LOGICAL_MAX   0x2
 HID Logical Maximum item tag.
 
#define HID_ITEM_TAG_PHYSICAL_MIN   0x3
 HID Physical Minimum item tag.
 
#define HID_ITEM_TAG_PHYSICAL_MAX   0x4
 HID Physical Maximum item tag.
 
#define HID_ITEM_TAG_UNIT_EXPONENT   0x5
 HID Unit Exponent item tag.
 
#define HID_ITEM_TAG_UNIT   0x6
 HID Unit item tag.
 
#define HID_ITEM_TAG_REPORT_SIZE   0x7
 HID Report Size item tag.
 
#define HID_ITEM_TAG_REPORT_ID   0x8
 HID Report ID item tag.
 
#define HID_ITEM_TAG_REPORT_COUNT   0x9
 HID Report count item tag.
 
#define HID_ITEM_TAG_USAGE   0x0
 HID Usage item tag.
 
#define HID_ITEM_TAG_USAGE_MIN   0x1
 HID Usage Minimum item tag.
 
#define HID_ITEM_TAG_USAGE_MAX   0x2
 HID Usage Maximum item tag.
 
#define HID_COLLECTION_PHYSICAL   0x00
 Physical collection type.
 
#define HID_COLLECTION_APPLICATION   0x01
 Application collection type.
 
#define HID_COLLECTION_LOGICAL   0x02
 Logical collection type.
 
#define HID_COLLECTION_REPORT   0x03
 Report collection type.
 
#define HID_COLLECTION_NAMED_ARRAY   0x04
 Named Array collection type.
 
#define HID_COLLECTION_USAGE_SWITCH   0x05
 Usage Switch collection type.
 
#define HID_COLLECTION_MODIFIER   0x06
 Modifier collection type.
 
#define HID_USAGE_GEN_DESKTOP   0x01
 HID Generic Desktop Controls Usage page.
 
#define HID_USAGE_GEN_KEYBOARD   0x07
 HID Keyboard Usage page.
 
#define HID_USAGE_GEN_LEDS   0x08
 HID LEDs Usage page.
 
#define HID_USAGE_GEN_BUTTON   0x09
 HID Button Usage page.
 
#define HID_USAGE_GEN_DESKTOP_UNDEFINED   0x00
 HID Generic Desktop Undefined Usage ID.
 
#define HID_USAGE_GEN_DESKTOP_POINTER   0x01
 HID Generic Desktop Pointer Usage ID.
 
#define HID_USAGE_GEN_DESKTOP_MOUSE   0x02
 HID Generic Desktop Mouse Usage ID.
 
#define HID_USAGE_GEN_DESKTOP_JOYSTICK   0x04
 HID Generic Desktop Joystick Usage ID.
 
#define HID_USAGE_GEN_DESKTOP_GAMEPAD   0x05
 HID Generic Desktop Gamepad Usage ID.
 
#define HID_USAGE_GEN_DESKTOP_KEYBOARD   0x06
 HID Generic Desktop Keyboard Usage ID.
 
#define HID_USAGE_GEN_DESKTOP_KEYPAD   0x07
 HID Generic Desktop Keypad Usage ID.
 
#define HID_USAGE_GEN_DESKTOP_X   0x30
 HID Generic Desktop X Usage ID.
 
#define HID_USAGE_GEN_DESKTOP_Y   0x31
 HID Generic Desktop Y Usage ID.
 
#define HID_USAGE_GEN_DESKTOP_WHEEL   0x38
 HID Generic Desktop Wheel Usage ID.
 

Detailed Description

hid.h API

Macro Definition Documentation

◆ HID_BOOT_IFACE_CODE_KEYBOARD

#define HID_BOOT_IFACE_CODE_KEYBOARD   1

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

USB HID Boot Interface Protocol (bInterfaceProtocol) Code Keyboard.

◆ HID_BOOT_IFACE_CODE_MOUSE

#define HID_BOOT_IFACE_CODE_MOUSE   2

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

USB HID Boot Interface Protocol (bInterfaceProtocol) Code Mouse.

◆ HID_BOOT_IFACE_CODE_NONE

#define HID_BOOT_IFACE_CODE_NONE   0

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

USB HID Boot Interface Protocol (bInterfaceProtocol) Code None.

◆ HID_COLLECTION_APPLICATION

#define HID_COLLECTION_APPLICATION   0x01

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

Application collection type.

◆ HID_COLLECTION_LOGICAL

#define HID_COLLECTION_LOGICAL   0x02

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

Logical collection type.

◆ HID_COLLECTION_MODIFIER

#define HID_COLLECTION_MODIFIER   0x06

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

Modifier collection type.

◆ HID_COLLECTION_NAMED_ARRAY

#define HID_COLLECTION_NAMED_ARRAY   0x04

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

Named Array collection type.

◆ HID_COLLECTION_PHYSICAL

#define HID_COLLECTION_PHYSICAL   0x00

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

Physical collection type.

◆ HID_COLLECTION_REPORT

#define HID_COLLECTION_REPORT   0x03

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

Report collection type.

◆ HID_COLLECTION_USAGE_SWITCH

#define HID_COLLECTION_USAGE_SWITCH   0x05

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

Usage Switch collection type.

◆ HID_ITEM_TAG_COLLECTION

#define HID_ITEM_TAG_COLLECTION   0xA

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

HID Collection item tag.

◆ HID_ITEM_TAG_COLLECTION_END

#define HID_ITEM_TAG_COLLECTION_END   0xC

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

HID End Collection item tag.

◆ HID_ITEM_TAG_FEATURE

#define HID_ITEM_TAG_FEATURE   0xB

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

HID Feature item tag.

◆ HID_ITEM_TAG_INPUT

#define HID_ITEM_TAG_INPUT   0x8

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

HID Input item tag.

◆ HID_ITEM_TAG_LOGICAL_MAX

#define HID_ITEM_TAG_LOGICAL_MAX   0x2

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

HID Logical Maximum item tag.

◆ HID_ITEM_TAG_LOGICAL_MIN

#define HID_ITEM_TAG_LOGICAL_MIN   0x1

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

HID Logical Minimum item tag.

◆ HID_ITEM_TAG_OUTPUT

#define HID_ITEM_TAG_OUTPUT   0x9

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

HID Output item tag.

◆ HID_ITEM_TAG_PHYSICAL_MAX

#define HID_ITEM_TAG_PHYSICAL_MAX   0x4

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

HID Physical Maximum item tag.

◆ HID_ITEM_TAG_PHYSICAL_MIN

#define HID_ITEM_TAG_PHYSICAL_MIN   0x3

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

HID Physical Minimum item tag.

◆ HID_ITEM_TAG_REPORT_COUNT

#define HID_ITEM_TAG_REPORT_COUNT   0x9

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

HID Report count item tag.

◆ HID_ITEM_TAG_REPORT_ID

#define HID_ITEM_TAG_REPORT_ID   0x8

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

HID Report ID item tag.

◆ HID_ITEM_TAG_REPORT_SIZE

#define HID_ITEM_TAG_REPORT_SIZE   0x7

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

HID Report Size item tag.

◆ HID_ITEM_TAG_UNIT

#define HID_ITEM_TAG_UNIT   0x6

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

HID Unit item tag.

◆ HID_ITEM_TAG_UNIT_EXPONENT

#define HID_ITEM_TAG_UNIT_EXPONENT   0x5

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

HID Unit Exponent item tag.

◆ HID_ITEM_TAG_USAGE

#define HID_ITEM_TAG_USAGE   0x0

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

HID Usage item tag.

◆ HID_ITEM_TAG_USAGE_MAX

#define HID_ITEM_TAG_USAGE_MAX   0x2

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

HID Usage Maximum item tag.

◆ HID_ITEM_TAG_USAGE_MIN

#define HID_ITEM_TAG_USAGE_MIN   0x1

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

HID Usage Minimum item tag.

◆ HID_ITEM_TAG_USAGE_PAGE

#define HID_ITEM_TAG_USAGE_PAGE   0x0

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

HID Usage Page item tag.

◆ HID_ITEM_TYPE_GLOBAL

#define HID_ITEM_TYPE_GLOBAL   0x1

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

HID Global item type.

◆ HID_ITEM_TYPE_LOCAL

#define HID_ITEM_TYPE_LOCAL   0x2

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

HID Local item type.

◆ HID_ITEM_TYPE_MAIN

#define HID_ITEM_TYPE_MAIN   0x0

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

HID Main item type.

◆ HID_PROTOCOL_BOOT

#define HID_PROTOCOL_BOOT   0

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

USB HID Class Boot protocol code.

◆ HID_PROTOCOL_REPORT

#define HID_PROTOCOL_REPORT   1

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

USB HID Class Report protocol code.

◆ HID_USAGE_GEN_BUTTON

#define HID_USAGE_GEN_BUTTON   0x09

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

HID Button Usage page.

◆ HID_USAGE_GEN_DESKTOP

#define HID_USAGE_GEN_DESKTOP   0x01

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

HID Generic Desktop Controls Usage page.

◆ HID_USAGE_GEN_DESKTOP_GAMEPAD

#define HID_USAGE_GEN_DESKTOP_GAMEPAD   0x05

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

HID Generic Desktop Gamepad Usage ID.

◆ HID_USAGE_GEN_DESKTOP_JOYSTICK

#define HID_USAGE_GEN_DESKTOP_JOYSTICK   0x04

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

HID Generic Desktop Joystick Usage ID.

◆ HID_USAGE_GEN_DESKTOP_KEYBOARD

#define HID_USAGE_GEN_DESKTOP_KEYBOARD   0x06

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

HID Generic Desktop Keyboard Usage ID.

◆ HID_USAGE_GEN_DESKTOP_KEYPAD

#define HID_USAGE_GEN_DESKTOP_KEYPAD   0x07

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

HID Generic Desktop Keypad Usage ID.

◆ HID_USAGE_GEN_DESKTOP_MOUSE

#define HID_USAGE_GEN_DESKTOP_MOUSE   0x02

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

HID Generic Desktop Mouse Usage ID.

◆ HID_USAGE_GEN_DESKTOP_POINTER

#define HID_USAGE_GEN_DESKTOP_POINTER   0x01

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

HID Generic Desktop Pointer Usage ID.

◆ HID_USAGE_GEN_DESKTOP_UNDEFINED

#define HID_USAGE_GEN_DESKTOP_UNDEFINED   0x00

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

HID Generic Desktop Undefined Usage ID.

◆ HID_USAGE_GEN_DESKTOP_WHEEL

#define HID_USAGE_GEN_DESKTOP_WHEEL   0x38

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

HID Generic Desktop Wheel Usage ID.

◆ HID_USAGE_GEN_DESKTOP_X

#define HID_USAGE_GEN_DESKTOP_X   0x30

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

HID Generic Desktop X Usage ID.

◆ HID_USAGE_GEN_DESKTOP_Y

#define HID_USAGE_GEN_DESKTOP_Y   0x31

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

HID Generic Desktop Y Usage ID.

◆ HID_USAGE_GEN_KEYBOARD

#define HID_USAGE_GEN_KEYBOARD   0x07

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

HID Keyboard Usage page.

◆ HID_USAGE_GEN_LEDS

#define HID_USAGE_GEN_LEDS   0x08

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

HID LEDs Usage page.

◆ USB_DESC_HID

#define USB_DESC_HID   0x21

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

USB HID Class HID descriptor type.

◆ USB_DESC_HID_PHYSICAL

#define USB_DESC_HID_PHYSICAL   0x23

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

USB HID Class physical descriptor type.

◆ USB_DESC_HID_REPORT

#define USB_DESC_HID_REPORT   0x22

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

USB HID Class Report descriptor type.

◆ USB_HID_GET_IDLE

#define USB_HID_GET_IDLE   0x02

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

USB HID Class GetIdle bRequest value.

◆ USB_HID_GET_PROTOCOL

#define USB_HID_GET_PROTOCOL   0x03

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

USB HID Class GetProtocol bRequest value.

◆ USB_HID_GET_REPORT

#define USB_HID_GET_REPORT   0x01

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

USB HID Class GetReport bRequest value.

◆ USB_HID_SET_IDLE

#define USB_HID_SET_IDLE   0x0A

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

USB HID Class SetIdle bRequest value.

◆ USB_HID_SET_PROTOCOL

#define USB_HID_SET_PROTOCOL   0x0B

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

USB HID Class SetProtocol bRequest value.

◆ USB_HID_SET_REPORT

#define USB_HID_SET_REPORT   0x09

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

USB HID Class SetReport bRequest value.

◆ USB_HID_VERSION

#define USB_HID_VERSION   0x0111

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

HID Specification release v1.11.