| USBD ROM Stack 1.0 ROM based USB device stack

Data Structures
HID Class Function Driver

## Detailed Description

# Module Description

HID Class Function Driver module. This module contains an internal implementation of the USB HID Class. User applications can use this class driver instead of implementing the HID class manually via the low-level HW and core APIs.

This module is designed to simplify the user code by exposing only the required interface needed to interface with Devices using the USB HID Class.

## Data Structures
struct | HID_DESCRIPTOR
| HID class-specific HID Descriptor. More...
struct | USB_HID_REPORT_T
| HID report descriptor data structure. More...
struct | USBD_HID_INIT_PARAM_T
| USB descriptors data structure. More...
struct | USBD_HID_API_T
| HID class API functions structure.This structure contains pointers to all the function exposed by HID function driver module. More...

## Macro Definition Documentation

## ◆ HID_SUBCLASS_NONE

#define HID_SUBCLASS_NONE 0x00

HID Subclass CodesDescriptor Subclass value indicating that the device or interface does not implement a HID boot protocol.

## ◆ HID_SUBCLASS_BOOT

#define HID_SUBCLASS_BOOT 0x01

Descriptor Subclass value indicating that the device or interface implements a HID boot protocol.

## ◆ HID_PROTOCOL_NONE

#define HID_PROTOCOL_NONE 0x00

HID Protocol CodesDescriptor Protocol value indicating that the device or interface does not belong to a HID boot protocol.

## ◆ HID_PROTOCOL_KEYBOARD

#define HID_PROTOCOL_KEYBOARD 0x01

Descriptor Protocol value indicating that the device or interface belongs to the Keyboard HID boot protocol.

## ◆ HID_PROTOCOL_MOUSE

#define HID_PROTOCOL_MOUSE 0x02

Descriptor Protocol value indicating that the device or interface belongs to the Mouse HID boot protocol.

## ◆ HID_HID_DESCRIPTOR_TYPE

#define HID_HID_DESCRIPTOR_TYPE 0x21

Descriptor TypesDescriptor header type value, to indicate a HID class HID descriptor.

## ◆ HID_REPORT_DESCRIPTOR_TYPE

#define HID_REPORT_DESCRIPTOR_TYPE 0x22

Descriptor header type value, to indicate a HID class HID report descriptor.

## ◆ HID_PHYSICAL_DESCRIPTOR_TYPE

#define HID_PHYSICAL_DESCRIPTOR_TYPE 0x23

Descriptor header type value, to indicate a HID class HID Physical descriptor.

## ◆ HID_REQUEST_GET_REPORT

#define HID_REQUEST_GET_REPORT 0x01

HID Request Codes

## ◆ HID_REPORT_INPUT

#define HID_REPORT_INPUT 0x01

HID Report Types

## ◆ HID_USAGE_PAGE_UNDEFINED

#define HID_USAGE_PAGE_UNDEFINED 0x00

Usage Pages

## ◆ HID_USAGE_GENERIC_POINTER

#define HID_USAGE_GENERIC_POINTER 0x01

Generic Desktop Page (0x01)

## ◆ HID_USAGE_SIMULATION_RUDDER

#define HID_USAGE_SIMULATION_RUDDER 0xBA

Simulation Controls Page (0x02)

## ◆ HID_USAGE_KEYBOARD_NOEVENT

#define HID_USAGE_KEYBOARD_NOEVENT 0x00

Keyboard/Keypad Page (0x07)Error "keys"

## ◆ HID_USAGE_KEYBOARD_aA

#define HID_USAGE_KEYBOARD_aA 0x04

Letters

## ◆ HID_USAGE_KEYBOARD_ONE

#define HID_USAGE_KEYBOARD_ONE 0x1E

Numbers

## ◆ HID_USAGE_KEYBOARD_F1

#define HID_USAGE_KEYBOARD_F1 0x3A

Funtion keys

## ◆ HID_USAGE_KEYBOARD_LCTRL

#define HID_USAGE_KEYBOARD_LCTRL 0xE0

Modifier Keys

## ◆ HID_USAGE_LED_NUM_LOCK

#define HID_USAGE_LED_NUM_LOCK 0x01

LED Page (0x08)

## ◆ HID_USAGE_TELEPHONY_PHONE

#define HID_USAGE_TELEPHONY_PHONE 0x01

Telephony Device Page (0x0B)

## ◆ HID_USAGE_CONSUMER_CONTROL

#define HID_USAGE_CONSUMER_CONTROL 0x01

Consumer Page (0x0C)

## ◆ HID_Input

#define HID_Input | ( |  | x | ) | 0x81, x

HID Report Item MacrosMain Items

## ◆ HID_Data

#define HID_Data 0 << 0

Data (Input, Output, Feature)

## ◆ HID_Physical

#define HID_Physical 0x00

Collection Data

## ◆ HID_UsagePage

#define HID_UsagePage | ( |  | x | ) | 0x05, x

Global Items

## ◆ HID_Usage

#define HID_Usage | ( |  | x | ) | 0x09, x

Local Items