diff options
| author | hathach <[email protected]> | 2022-11-04 16:14:35 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-11-04 16:14:35 +0700 |
| commit | d2c9b8bcfba42ebc0023154493383b8bcb892020 (patch) | |
| tree | 612dcb70c98c789a86574c088f2f281cf2e1d2e7 /src/common | |
| parent | b554c2ed836527296dd0b79169db04fc2f68cf5a (diff) | |
fix -wconversion-int and add minor comment
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_types.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h index cfa24bd82..e11f08dd1 100644 --- a/src/common/tusb_types.h +++ b/src/common/tusb_types.h @@ -513,15 +513,19 @@ TU_ATTR_ALWAYS_INLINE static inline uint16_t tu_edpt_packet_size(tusb_desc_endpo return tu_le16toh(desc_ep->wMaxPacketSize) & TU_GENMASK(10, 0); } -static inline const char *tu_edpt_dir_str(tusb_dir_t dir) { +#if CFG_TUSB_DEBUG +TU_ATTR_ALWAYS_INLINE static inline const char *tu_edpt_dir_str(tusb_dir_t dir) +{ static const char *str[] = {"out", "in"}; return str[dir]; } -static inline const char *tu_edpt_type_str(tusb_xfer_type_t t) { +TU_ATTR_ALWAYS_INLINE static inline const char *tu_edpt_type_str(tusb_xfer_type_t t) +{ static const char *str[] = {"control", "isochronous", "bulk", "interrupt"}; return str[t]; } +#endif //--------------------------------------------------------------------+ // Descriptor helper |
