diff options
| author | Ha Thach <[email protected]> | 2024-01-22 23:08:16 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-01-22 23:08:16 +0700 |
| commit | 57bbf3ad2baf4e47ed2a501e80cf975f2dcafad1 (patch) | |
| tree | 2662d1f78865cf6256ad0f70585ee9a66aabf382 /src/common/tusb_common.h | |
| parent | 938cae818f5f53887ad12e34189e6746dbce4889 (diff) | |
| parent | 769a237b19bbe5254e1c83869b463c79afb1af34 (diff) | |
Merge pull request #2391 from IngHK/cdc_ch34x_support
initial support of CH34x CDC device
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 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)) |
