Expand description
Defines for USB, mainly thosed covered at usb.org
Also refering to beyondlogic
There are some repeated/copied Enum defines from rusb in order to control Serialize/Deserialize and add impl
Structs
- Address information for a
USBEndpoint
- Devices can have multiple configurations, each with different attributes and interfaces
- Extra USB device data for verbose printing
- Endpoint for a
USBInterface
- Interface within a
USBConfiguration
- The version value (for BCD and USB) is in binary coded decimal with a format of 0xJJMN where JJ is the major version number, M is the minor version number and N is the sub minor version number. e.g. USB 2.0 is reported as 0x0200, USB 1.1 as 0x0110 and USB 1.0 as 0x0100. The type is a mirror of the one from rusb in order to impl Display, From etc.
Enums
- USB class code defines ref
- Configuration attributes
- Explains how the
ClassCode
is used - Transfer and
USBEndpoint
direction - USB Speed is also defined in libusb but this one allows us to provide updates and custom impl
- Isochronous synchronization mode for
USBEndpoint
- Transfer type for
USBEndpoint
- Isochronous usage type for
USBEndpoint
Functions
- Build replica of Linux dev path from libusb.c *devbususb for getting device with -D
- Build replica of sysfs path with interface
- Parent path is path to parent device
- Builds a replica of sysfs path; excludes config.interface
- Trunk path is path to trunk device on bus