picofuse

Data Fields
hw_usb_device_t Struct Reference

Describes one interface of a USB device observed by the host. More...

#include <usb.h>

Data Fields

uint32_t device_id
 Opaque identifier, stable across every interface event belonging to one physical attach/detach - disambiguates two simultaneously-attached devices that happen to share the same vid/pid. More...
 
uint16_t vid
 USB Vendor ID.
 
uint16_t pid
 USB Product ID.
 
hw_usb_device_class_t device_class
 USB device class code.
 
hw_usb_device_subclass_t device_subclass
 USB device subclass code.
 
hw_usb_device_protocol_t device_protocol
 USB device protocol code.
 
uint8_t interface_number
 This interface's number, or 0xFF if interface information wasn't available (see this file's own top-level doc) - in that case interface_class/_subclass/_protocol below are just copies of device_class/ _subclass/_protocol above. More...
 
hw_usb_device_class_t interface_class
 USB interface class code.
 
hw_usb_device_subclass_t interface_subclass
 USB interface subclass.
 
hw_usb_device_protocol_t interface_protocol
 USB interface protocol.
 
char manufacturer [HW_USB_STRING_MAX_LENGTH+1]
 Manufacturer string.
 
char product [HW_USB_STRING_MAX_LENGTH+1]
 Product string.
 
char serial [HW_USB_STRING_MAX_LENGTH+1]
 Serial number string.
 

Detailed Description

Describes one interface of a USB device observed by the host.

This structure is populated when an interface is attached or detached - see this file's own top-level doc on why enumeration happens at the interface level, not the device level.

Note
On detach, manufacturer, product and serial may be empty strings. Callers should not rely on them being populated for hw_usb_event_detached.

Definition at line 251 of file usb.h.

Field Documentation

◆ device_id

uint32_t hw_usb_device_t::device_id

Opaque identifier, stable across every interface event belonging to one physical attach/detach - disambiguates two simultaneously-attached devices that happen to share the same vid/pid.

Not stable across a replug of the same device.

Definition at line 252 of file usb.h.

◆ interface_number

uint8_t hw_usb_device_t::interface_number

This interface's number, or 0xFF if interface information wasn't available (see this file's own top-level doc) - in that case interface_class/_subclass/_protocol below are just copies of device_class/ _subclass/_protocol above.

Definition at line 262 of file usb.h.


The documentation for this struct was generated from the following file: