summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-07-21 19:06:36 +0700
committerhathach <[email protected]>2023-07-21 19:06:36 +0700
commitc122e9df73331fa60d1713c7cc4cf46251b0cd76 (patch)
tree00f4a6245e6357672cb42ab4ba0cf33c2892418e /src/common
parent14c98dd863a9cab55fc2981fb826f63eceed4b2d (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.h2
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))) )
//--------------------------------------------------------------------+