summaryrefslogtreecommitdiff
path: root/src/common/tusb_common.h
diff options
context:
space:
mode:
authorYixingShen <[email protected]>2024-01-26 09:09:44 +0800
committerYixingShen <[email protected]>2024-01-26 09:09:44 +0800
commit2f2d2bcf3e1fd09fa15015efaae686dd65612c30 (patch)
tree45f89e794e57cdbd90b5851091c615ea16506195 /src/common/tusb_common.h
parent4c9f462423338a812378924233eac55ce0e96fb8 (diff)
parentb7134934363b88881e4767a16eecb22cad410d73 (diff)
Merge branch 'master' of https://github.com/YixingShen/tinyusb
Diffstat (limited to 'src/common/tusb_common.h')
-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))