diff options
| author | hathach <[email protected]> | 2021-09-01 16:52:27 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-09-01 16:52:27 +0700 |
| commit | fc889ece74626f49a08898039102f0a9bf2b85a1 (patch) | |
| tree | 3b7762f39a0ad4af4ca7b48883aff7fe12eca50b /src/common | |
| parent | 90dc9bc289e12950fba9ea5dafe20e1b0777d0ba (diff) | |
rp2040 correct ep set/clear stall
- stall will remove pending (not complete) transfer. Correct reset data
toggle when clear stall.
- remove buf ctrl debug code
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h index 1452e0105..687f980be 100644 --- a/src/common/tusb_common.h +++ b/src/common/tusb_common.h @@ -110,6 +110,9 @@ TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_u32_byte2(uint32_t u32) { return TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_u32_byte1(uint32_t u32) { return TU_U32_BYTE1(u32); } TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_u32_byte0(uint32_t u32) { return TU_U32_BYTE0(u32); } +TU_ATTR_ALWAYS_INLINE static inline uint16_t tu_u32_high16(uint32_t u32) { return (uint16_t) (u32 >> 16); } +TU_ATTR_ALWAYS_INLINE static inline uint16_t tu_u32_low16 (uint32_t u32) { return (uint16_t) (u32 & 0x0000ffffu); } + TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_u16_high(uint16_t u16) { return TU_U16_HIGH(u16); } TU_ATTR_ALWAYS_INLINE static inline uint8_t tu_u16_low (uint16_t u16) { return TU_U16_LOW(u16); } |
