summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-03-04 19:26:54 +0700
committerhathach <[email protected]>2022-03-04 19:26:54 +0700
commite08a875d52792c03e1e7cd114f0f3f7013c36210 (patch)
tree043e6ea0a9b4c8700b6e1f85073995a09e34bfdb /src/common
parent3a7d1cfead0d3147425c305d778723a505900d48 (diff)
add tuh_descriptor_get() and tuh_descriptor_device_get()
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 80bb40f77..26865805e 100644
--- a/src/common/tusb_common.h
+++ b/src/common/tusb_common.h
@@ -38,6 +38,7 @@
#define TU_MIN(_x, _y) ( ( (_x) < (_y) ) ? (_x) : (_y) )
#define TU_MAX(_x, _y) ( ( (_x) > (_y) ) ? (_x) : (_y) )
+#define TU_U16(_high, _low) ((uint16_t) (((_high) << 8) | (_low)))
#define TU_U16_HIGH(_u16) ((uint8_t) (((_u16) >> 8) & 0x00ff))
#define TU_U16_LOW(_u16) ((uint8_t) ((_u16) & 0x00ff))
#define U16_TO_U8S_BE(_u16) TU_U16_HIGH(_u16), TU_U16_LOW(_u16)