This repo is archived because it is no longer used by CircuitPython. We recommend https://github.com/usb-tools/python-usb-protocol instead.

Introduction

Documentation Status Discord

The adafruit_usb_descriptor library provides Python classes that make it easier to generate a binary USB descriptor. It can be used in place of a series of C macros.

Dependencies

This library has no external dependencies. It only uses Python struct.

Usage Example

A current usage example that generates descriptors for use with [TinyUSB](https://github.com/hathach/tinyusb) can be found here in CircuitPython.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

API Reference

adafruit_usb_descriptor - USB descriptor generation

adafruit_usb_descriptor.standard - Standard descriptors

This is a good reference: http://www.beyondlogic.org/usbnutshell/usb5.shtml

  • Author(s): Scott Shawcroft

adafruit_usb_descriptor.cdc - CDC specific descriptors

This PDF is a good reference:
https://cscott.net/usb_dev/data/devclass/usbcdc11.pdf
  • Author(s): Scott Shawcroft