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 | |
| 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')
| -rw-r--r-- | src/common/tusb_common.h | 1 | ||||
| -rw-r--r-- | src/common/tusb_mcu.h | 1 |
2 files changed, 2 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 diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h index 0c64c041c..d282c890d 100644 --- a/src/common/tusb_mcu.h +++ b/src/common/tusb_mcu.h @@ -400,6 +400,7 @@ // Raspberry Pi //--------------------------------------------------------------------+ #elif TU_CHECK_MCU(OPT_MCU_RP2040) + #define TUP_DCD_EDPT_ISO_ALLOC #define TUP_DCD_ENDPOINT_MAX 16 #define TU_ATTR_FAST_FUNC __attribute__((section(".time_critical.tinyusb"))) |
