diff options
| author | Ha Thach <[email protected]> | 2022-11-05 15:16:36 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-05 15:16:36 +0700 |
| commit | 9e9f331503fa99900829e692cf65788eb1872ea7 (patch) | |
| tree | 612dcb70c98c789a86574c088f2f281cf2e1d2e7 /src/common | |
| parent | 28f49c088bb0c498d730d80943017172061cfd05 (diff) | |
| parent | d2c9b8bcfba42ebc0023154493383b8bcb892020 (diff) | |
Merge pull request #1434 from Skyler84/rp2040-hcd-bulk
Rp2040 hcd bulk
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_types.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h index 1f2a38d4c..e11f08dd1 100644 --- a/src/common/tusb_types.h +++ b/src/common/tusb_types.h @@ -513,6 +513,20 @@ 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); } +#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]; +} + +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 //--------------------------------------------------------------------+ |
