diff options
| author | hathach <[email protected]> | 2023-07-21 19:06:36 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-07-21 19:06:36 +0700 |
| commit | c122e9df73331fa60d1713c7cc4cf46251b0cd76 (patch) | |
| tree | 00f4a6245e6357672cb42ab4ba0cf33c2892418e /src/common | |
| parent | 14c98dd863a9cab55fc2981fb826f63eceed4b2d (diff) | |
implement hcd_edpt_abort_xfer() for EHCI, also move thing around a bit
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h index 957491aa9..b3d9fc7cd 100644 --- a/src/common/tusb_common.h +++ b/src/common/tusb_common.h @@ -53,6 +53,8 @@ #define U32_TO_U8S_LE(_u32) TU_U32_BYTE0(_u32), TU_U32_BYTE1(_u32), TU_U32_BYTE2(_u32), TU_U32_BYTE3(_u32) #define TU_BIT(n) (1UL << (n)) + +// Generate a mask with bit from high (31) to low (0) set, e.g TU_GENMASK(3, 0) = 0b1111 #define TU_GENMASK(h, l) ( (UINT32_MAX << (l)) & (UINT32_MAX >> (31 - (h))) ) //--------------------------------------------------------------------+ |
