diff options
Diffstat (limited to 'tinyusb/common')
| -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 a5416f3f9..82b64576c 100644 --- a/tinyusb/common/common.h +++ b/tinyusb/common/common.h @@ -105,6 +105,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 __h2be_16(u16) ((uint16_t) ((U16_LOW_U8(u16) << 8) | U16_HIGH_U8(u16)) ) // TODO refractor later +#define __be2h_16(u16) __h2be_16(u16) + //--------------------------------------------------------------------+ // INLINE FUNCTION //--------------------------------------------------------------------+ |
