summaryrefslogtreecommitdiff
path: root/examples/device/dfu_runtime/src
diff options
context:
space:
mode:
authortswan22 <[email protected]>2025-11-01 12:51:40 -0400
committertswan22 <[email protected]>2025-11-01 12:51:40 -0400
commitca44c772f7ad87a8d12de0b3a57ad8816f2edc10 (patch)
tree2ac98dc0c073ca161741751504fdbeb0b710dd11 /examples/device/dfu_runtime/src
parent9d46cca57637cfd086499970a8f5d5669ba9bfa0 (diff)
parenta6c16d147593732028ed89292805e0e6a972e4b5 (diff)
Merge branch 'master' of https://github.com/hathach/tinyusb
Diffstat (limited to 'examples/device/dfu_runtime/src')
-rw-r--r--examples/device/dfu_runtime/src/usb_descriptors.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/device/dfu_runtime/src/usb_descriptors.c b/examples/device/dfu_runtime/src/usb_descriptors.c
index c5cc9f92f..1d46ee252 100644
--- a/examples/device/dfu_runtime/src/usb_descriptors.c
+++ b/examples/device/dfu_runtime/src/usb_descriptors.c
@@ -33,9 +33,9 @@
* Auto ProductID layout's Bitmap:
* [MSB] HID | MSC | CDC [LSB]
*/
-#define _PID_MAP(itf, n) ( (CFG_TUD_##itf) << (n) )
-#define USB_PID (0x4000 | _PID_MAP(CDC, 0) | _PID_MAP(MSC, 1) | _PID_MAP(HID, 2) | \
- _PID_MAP(MIDI, 3) | _PID_MAP(VENDOR, 4) )
+#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) )
//--------------------------------------------------------------------+
// Device Descriptors