You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds comprehensive VID/PID (Vendor ID/Product ID) configuration
support to the USB device implementation, allowing both runtime and build-time
customization of USB device identification.
Key features:
- Runtime VID/PID properties (usb.vid, usb.pid) for dynamic configuration
- Build-time VID/PID override macros (MICROPY_HW_USB_RUNTIME_VID/PID)
- Dynamic descriptor patching based on custom VID/PID values
- Automatic VID/PID reset on USB deactivation for clean state
- Support for both runtime and static USB device modes
- Validation of VID/PID ranges (1-65535) with proper error handling
- Re-enumeration support in static mode for immediate VID/PID changes
The implementation uses a fallback system where custom VID/PID values
override runtime defaults, which in turn override compile-time defaults.
This provides maximum flexibility for different deployment scenarios.
Signed-off-by: Andrew Leech <[email protected]>
0 commit comments