This commit is contained in:
Skyler84 2022-07-11 22:09:36 +07:00 committed by GitHub
commit 71cdbb67ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -513,6 +513,16 @@ 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) {
static const char *str[] = {"out", "in"};
return str[dir];
}
static inline const char *tu_edpt_type_str(tusb_xfer_type_t t) {
static const char *str[] = {"control", "isochronous", "bulk", "interrupt"};
return str[t];
}
//--------------------------------------------------------------------+
// Descriptor helper
//--------------------------------------------------------------------+