summaryrefslogtreecommitdiff
path: root/src/device/usbd.h
diff options
context:
space:
mode:
authorTenGui <[email protected]>2026-07-23 15:26:18 -0700
committerTenGui <[email protected]>2026-07-23 15:26:18 -0700
commit7e59f1bf8a7590e13da7fe5e8c602b41c95d2341 (patch)
treed368a988c7eaed9924b9e5b500734ca9de8aad0e /src/device/usbd.h
parentf3736185c7e22dda0e58ffa6e2c8df2c310d5765 (diff)
fix narrowing, add cast
Diffstat (limited to 'src/device/usbd.h')
-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..296ec417d 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)((_power_ma)/2)
//--------------------------------------------------------------------+
// CDC Descriptor Templates