Skip to main content

XRUSB

XRUSB is the USB device stack inside LibXR. It is built from platform-side USB device/endpoint implementations plus upper-layer USB device classes, and it is mainly oriented toward device-side development.

Main Characteristics

  • modern C++ implementation
  • lock-free data structures where appropriate
  • double-buffer and DMA-oriented transfer paths
  • dynamic endpoint allocation
  • one-shot construction-time memory allocation
  • interrupt-driven and ISR-safe design

Supported Device Classes

ProtocolStatusNotes
CDC-ACMsupportedexposed as LibXR UART adapters
HIDsupportedkeyboard / mouse / gamepad paths are ready to use; other HID types should derive their own class
UACsupportedcurrent mainline primarily documents a UAC1 microphone path
GSUSBsupported (CAN/FDCAN)oriented toward Linux SocketCAN
DAPLinkV1supported (SWD only)oriented toward CMSIS-DAP v1 HID host tooling
DFU Runtimesupportedhandles runtime DETACH and deferred jump to bootloader
DFU Bootloadersupportedsupports DNLOAD / UPLOAD / GETSTATUS / ABORT / CLRSTATUS / manifest flows
DAPLinkV2supported (SWD only)oriented toward CMSIS-DAP v2 bulk host tooling

BOS / Platform Capability Support

CapabilityStatusNotes
WebUSBsupportedmainly used by DFU runtime / bootloader paths
WinUSB MS OS 2.0supportedused by DAPLinkV2 and current DFU runtime / bootloader paths on Windows

Additional notes:

  • This table describes capability surfaces that can already be confirmed from current mainline device-class or BOS-related code.
  • Whether a specific BOS capability is actually published by a device instance still depends on constructor choices such as WebUSB landing-page parameters or the selected/default WinUSB metadata scope.

Platform Support

PlatformCurrent mainline device class / controller pathStatusTested hardware
STM32STM32USBDeviceDevFs / FSDEVsupportedSTM32F103 / STM32G431
STM32STM32USBDeviceOtgFS / USB_OTG_FSsupported (Device)STM32F401 / STM32F407
STM32STM32USBDeviceOtgHS / USB_OTG_HSsupported (Device)STM32F407 / STM32H750
ESP32-S3ESP32USBDevice / USB_OTG_FSsupported (Device)ESP32-S3
CH32CH32USBDeviceFS / USB_DEVICE_FSsupportedCH32V203
CH32CH32USBOtgFS / USBFSsupported (Device)CH32V307 / CH32V203 / CH32V208
CH32CH32USBOtgHS / USBHSsupported (Device)CH32V305 / CH32V307

Contents

Notes

  • the platform-specific pages focus on how USB device and endpoint implementations are realized on different MCU / SoC targets;
  • the device-class pages focus on the behavior and interfaces of each USB device class;
  • the VID/PID page covers the default XRUSB conventions, not every special identification strategy such as CMSIS-DAP compatibility choices.
  • the current documentation covers device-side paths only; the host side still does not have a stable public stack surface in current mainline that should be expanded into parallel host-stack pages.