diff options
| author | Ha Thach <[email protected]> | 2026-07-17 16:40:34 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-07-17 16:40:34 +0700 |
| commit | aa410008e8e74b0727f8c30a1ec109ff2c37efc6 (patch) | |
| tree | 613a6d86ae8afbec9d97f8ca3feac50c596b7782 /examples/device/hid_multiple_interface/src | |
| parent | ac595bc5cf64949332347a2b9d901de507a744a6 (diff) | |
| parent | 8a42508300e03e3ed3bf7dc3e31821adf079189e (diff) | |
Merge pull request #3758 from hathach/usbtest
usbtest: device-side peer for the Linux kernel usbtest battery + DCD fixes across 13 ports
Diffstat (limited to 'examples/device/hid_multiple_interface/src')
| -rw-r--r-- | examples/device/hid_multiple_interface/src/usb_descriptors.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/examples/device/hid_multiple_interface/src/usb_descriptors.c b/examples/device/hid_multiple_interface/src/usb_descriptors.c index cd2d93c44..90aef6dd7 100644 --- a/examples/device/hid_multiple_interface/src/usb_descriptors.c +++ b/examples/device/hid_multiple_interface/src/usb_descriptors.c @@ -26,15 +26,8 @@ #include "bsp/board_api.h" #include "tusb.h" -/* A combination of interfaces must have a unique product id, since PC will save device driver after the first plug. - * Same VID/PID with different interface e.g MSC (first), then CDC (later) will possibly cause system error on PC. - * - * Auto ProductID layout's Bitmap: - * [MSB] HID | MSC | CDC [LSB] - */ -#define PID_MAP(itf, n) ((CFG_TUD_##itf) ? (1 << (n)) : 0) -#define USB_PID (0x4000 | PID_MAP(CDC, 0) | PID_MAP(MSC, 1) | PID_MAP(HID, 2) | \ - PID_MAP(MIDI, 3) | PID_MAP(VENDOR, 4) ) +// Unique PID per example: guarantees re-enumeration on re-flash and a fresh host driver match. +#define USB_PID 0x4013 //--------------------------------------------------------------------+ // Device Descriptors |
