diff options
| author | Zixun LI <[email protected]> | 2026-07-29 00:41:26 +0200 |
|---|---|---|
| committer | Zixun LI <[email protected]> | 2026-07-29 00:41:26 +0200 |
| commit | a7d778c68e46c6013a39d8520c176a3592fc0cd7 (patch) | |
| tree | 66a45d15db61ccd6ed146f336143e09b7a74a8c2 /src/common | |
| parent | 192e0bd872608b4a39b36047e0d5c1d18c2a8f02 (diff) | |
| parent | 1eb216ed024002119a16ac15004e0b0124a7da6a (diff) | |
Merge tinyusb/master into fix/lpc43-hfp-reliability
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_types.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h index d49d277ed..fa4d67df1 100644 --- a/src/common/tusb_types.h +++ b/src/common/tusb_types.h @@ -244,7 +244,7 @@ enum { TUSB_DESC_CONFIG_ATT_SELF_POWERED = 1 << 6, }; -#define TUSB_DESC_CONFIG_POWER_MA(x) ((x)/2) +#define TUSB_DESC_CONFIG_POWER_MA(x) ((uint8_t)TU_MIN((x)/2, UINT8_MAX)) // USB 2.0 Spec Table 9-7: Test Mode Selectors typedef enum { |
