summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorIngHK <[email protected]>2024-01-16 08:20:23 +0100
committerIngHK <[email protected]>2024-01-16 08:20:23 +0100
commitf7ef3c1b1cbf8a19548e9d7ca0a95ae324fcdd5b (patch)
tree0afe6500d844d95eb83adb351d1daa2137ae44a5 /src/common
parent4e6408ea4940085f66c676772d77e3951e82ea11 (diff)
parent57c6f8cfa27f5c7b34a52e20b66cc81fe62c2815 (diff)
Merge branch 'cdc_ch34x_support' of https://github.com/IngHK/tinyusb into cdc_ch34x_support
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 caeb5f2ef..1f08ce4ed 100644
--- a/src/common/tusb_common.h
+++ b/src/common/tusb_common.h
@@ -37,6 +37,7 @@
#define TU_ARRAY_SIZE(_arr) ( sizeof(_arr) / sizeof(_arr[0]) )
#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))
#define TU_U16(_high, _low) ((uint16_t) (((_high) << 8) | (_low)))
#define TU_U16_HIGH(_u16) ((uint8_t) (((_u16) >> 8) & 0x00ff))