⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module hid

Module hid 

Source
Expand description

USB HID (Human Interface Device) Driver

Implements HID Boot Protocol support for keyboards and mice, HID report descriptor parsing stubs, and input event generation.

Reference: USB HID Specification 1.11, USB HID Usage Tables 1.12

Structs§

BootKeyboardReport
Boot keyboard report: 8 bytes
BootMouseReport
Boot mouse report: 3 bytes minimum, optional 4th byte for scroll
HidCapabilities
Parsed capabilities from a HID report descriptor
HidDevice
Represents a USB HID device with state tracking
InputEventBatch
Small fixed-capacity collection of input events from a single report
InputEventBatchIter
Iterator over events in an InputEventBatch

Enums§

HidDesktopUsage
Generic Desktop usage IDs
HidDeviceType
Classification of HID device types
HidGlobalTag
Global item tags
HidItemType
Report descriptor item types
HidMainTag
Main item tags
HidUsagePage
Usage page values
InputEvent
Input events generated from HID reports

Constants§

HID_BOOT_PROTOCOL_KEYBOARD
Keyboard boot protocol
HID_BOOT_PROTOCOL_MOUSE
Mouse boot protocol
HID_DESCRIPTOR_TYPE
HID descriptor type (returned in GET_DESCRIPTOR)
HID_GET_IDLE
Get the idle rate
HID_GET_PROTOCOL
Get the active protocol (boot vs report)
HID_GET_REPORT
Get a report from the device
HID_PHYSICAL_DESCRIPTOR_TYPE
HID physical descriptor type
HID_PROTOCOL_BOOT
Boot protocol (simplified fixed-format reports)
HID_PROTOCOL_REPORT
Report protocol (full report descriptor driven)
HID_REPORT_DESCRIPTOR_TYPE
HID report descriptor type
HID_SET_IDLE
Set the idle rate
HID_SET_PROTOCOL
Set the active protocol (boot vs report)
HID_SET_REPORT
Send a report to the device
HID_SUBCLASS_BOOT
Boot interface subclass
HID_SUBCLASS_NONE
No subclass

Functions§

parse_report_descriptor
Parse a HID report descriptor to determine device capabilities.