diff options
| author | Ha Thach <[email protected]> | 2024-11-28 16:13:20 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-11-28 16:13:20 +0700 |
| commit | c6dccffa2d81f692ca3f9729978ee37f7ed6281d (patch) | |
| tree | ce6529d15bdf12ca596641210e1827a3d8f53408 /src/common/tusb_common.h | |
| parent | 31429271141e5af70bbcbe28804442d4f2ffb9ba (diff) | |
| parent | 7f61a5a43b4637afc323f6e63cc59330f1b1e5a6 (diff) | |
Merge pull request #2847 from pschatzmann/rp2040-iso
Rp2040 - ISO API to make Audio work / Merge to master
Diffstat (limited to 'src/common/tusb_common.h')
| -rw-r--r-- | src/common/tusb_common.h | 1 |
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 |
