diff options
Diffstat (limited to 'tinyusb/common/common.h')
| -rw-r--r-- | tinyusb/common/common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tinyusb/common/common.h b/tinyusb/common/common.h index 403ca5d6c..a3c8cfef5 100644 --- a/tinyusb/common/common.h +++ b/tinyusb/common/common.h @@ -98,6 +98,9 @@ #define U32_TO_U8S_BE(u32) U32_B1_U8(u32), U32_B2_U8(u32), U32_B3_U8(u32), U32_B4_U8(u32) #define U32_TO_U8S_LE(u32) U32_B4_U8(u32), U32_B3_U8(u32), U32_B2_U8(u32), U32_B1_U8(u32) + +#define memclr_(buffer, size) memset(buffer, 0, size) + /// form an uint32_t from 4 x uint8_t static inline uint32_t u32_from_u8(uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4) ATTR_ALWAYS_INLINE ATTR_CONST; static inline uint32_t u32_from_u8(uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4) |
