summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorZixun LI <[email protected]>2026-07-29 00:41:26 +0200
committerZixun LI <[email protected]>2026-07-29 00:41:26 +0200
commita7d778c68e46c6013a39d8520c176a3592fc0cd7 (patch)
tree66a45d15db61ccd6ed146f336143e09b7a74a8c2 /src/device
parent192e0bd872608b4a39b36047e0d5c1d18c2a8f02 (diff)
parent1eb216ed024002119a16ac15004e0b0124a7da6a (diff)
Merge tinyusb/master into fix/lpc43-hfp-reliability
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 9be12ed0a..2015d1869 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -229,7 +229,7 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_requ
// Config number, interface count, string index, total length, attribute, power in mA
#define TUD_CONFIG_DESCRIPTOR(config_num, _itfcount, _stridx, _total_len, _attribute, _power_ma) \
- 9, TUSB_DESC_CONFIGURATION, U16_TO_U8S_LE(_total_len), _itfcount, config_num, _stridx, TU_BIT(7) | _attribute, (_power_ma)/2
+ 9, TUSB_DESC_CONFIGURATION, U16_TO_U8S_LE(_total_len), _itfcount, config_num, _stridx, TU_BIT(7) | _attribute, (uint8_t)TU_MIN((_power_ma)/2, UINT8_MAX)
//--------------------------------------------------------------------+
// CDC Descriptor Templates