summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-11-28 15:56:47 +0700
committerhathach <[email protected]>2024-11-28 15:56:47 +0700
commit7f61a5a43b4637afc323f6e63cc59330f1b1e5a6 (patch)
tree931c86181cc6bae2fd92bfa1741632a48d2b8bf3 /src/common
parentc514a8c87993abf481f3eda5f206765e4422571b (diff)
made change per reviews, remove dcd_edpt_close(), rename and move thing around
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 d05032d00..74cac965d 100644
--- a/src/common/tusb_common.h
+++ b/src/common/tusb_common.h
@@ -177,6 +177,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool tu_is_aligned64(uint64_t value) { retur
//------------- Mathematics -------------//
TU_ATTR_ALWAYS_INLINE static inline uint32_t tu_div_ceil(uint32_t v, uint32_t d) { return TU_DIV_CEIL(v, d); }
+TU_ATTR_ALWAYS_INLINE static inline uint32_t tu_round_up(uint32_t v, uint32_t f) { return tu_div_ceil(v, f) * f; }
// log2 of a value is its MSB's position
// TODO use clz TODO remove