summaryrefslogtreecommitdiff
path: root/examples/device/dfu_runtime/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-10-30 13:59:25 +0700
committerhathach <[email protected]>2025-10-30 14:35:11 +0700
commit88305b1b34160b4548609b78807be910944856ab (patch)
tree289dcba56ba8e65f04fe978806d845ab15e25f6c /examples/device/dfu_runtime/src
parent83baf13dcbde66942419c03348cc88ef22575e32 (diff)
parent3ff54153d42c83fc0a1e13106c6632c3237b1670 (diff)
Merge branch 'master' into add-ohci-lpc55
# Conflicts: - hw/bsp/lpc17/family.cmake - hw/bsp/lpc40/family.cmake - hw/bsp/lpc55/family.cmake
Diffstat (limited to 'examples/device/dfu_runtime/src')
-rw-r--r--examples/device/dfu_runtime/src/usb_descriptors.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/device/dfu_runtime/src/usb_descriptors.c b/examples/device/dfu_runtime/src/usb_descriptors.c
index 7ac53d255..1d46ee252 100644
--- a/examples/device/dfu_runtime/src/usb_descriptors.c
+++ b/examples/device/dfu_runtime/src/usb_descriptors.c
@@ -33,14 +33,14 @@
* 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
//--------------------------------------------------------------------+
-tusb_desc_device_t const desc_device =
+static tusb_desc_device_t const desc_device =
{
.bLength = sizeof(tusb_desc_device_t),
.bDescriptorType = TUSB_DESC_DEVICE,
@@ -122,7 +122,7 @@ enum {
};
// array of pointer to string descriptors
-char const *string_desc_arr[] =
+static char const *string_desc_arr[] =
{
(const char[]) { 0x09, 0x04 }, // 0: is supported language is English (0x0409)
"TinyUSB", // 1: Manufacturer