summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-10-02 19:58:12 +0700
committerGitHub <[email protected]>2025-10-02 19:58:12 +0700
commitc1bf19ed6cf1eaa791f221c1bc5ce4b3d069f76d (patch)
tree60fe2447d25af0ab07b80f435d79a147cf717d8f /src/common
parentf655d210b17fad3d2e95c7ef07e114a2f0b6dac6 (diff)
parent610f353d8d602c3192f9edc03669ab792056f7da (diff)
Merge pull request #3023 from ennebi/mtp
Add support for MTP device class
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h
index 9c4699362..12dea2183 100644
--- a/src/common/tusb_common.h
+++ b/src/common/tusb_common.h
@@ -35,6 +35,7 @@
// Macros Helper
//--------------------------------------------------------------------+
#define TU_ARRAY_SIZE(_arr) ( sizeof(_arr) / sizeof(_arr[0]) )
+#define TU_FIELD_SZIE(_type, _field) (sizeof(((_type *)0)->_field))
#define TU_MIN(_x, _y) ( ( (_x) < (_y) ) ? (_x) : (_y) )
#define TU_MAX(_x, _y) ( ( (_x) > (_y) ) ? (_x) : (_y) )
#define TU_DIV_CEIL(n, d) (((n) + (d) - 1) / (d))