Lines Matching refs:bytes
46 static void u16_to_bytes(uint16_t u16, uint8_t *bytes) in u16_to_bytes() argument
48 *bytes = (uint8_t) (u16 >> 8); in u16_to_bytes()
49 *(bytes + 1) = (uint8_t) u16; in u16_to_bytes()
52 static void bytes_to_u16(uint8_t *bytes, uint16_t *u16) in bytes_to_u16() argument
54 *u16 = (uint16_t) ((*bytes << 8) + *(bytes + 1)); in bytes_to_u16()
57 static void bytes_to_u32(uint8_t *bytes, uint32_t *u32) in bytes_to_u32() argument
59 *u32 = (uint32_t) ((*(bytes) << 24) + in bytes_to_u32()
60 (*(bytes + 1) << 16) + in bytes_to_u32()
61 (*(bytes + 2) << 8) + (*(bytes + 3))); in bytes_to_u32()
64 static void u32_to_bytes(uint32_t u32, uint8_t *bytes) in u32_to_bytes() argument
66 *bytes = (uint8_t) (u32 >> 24); in u32_to_bytes()
67 *(bytes + 1) = (uint8_t) (u32 >> 16); in u32_to_bytes()
68 *(bytes + 2) = (uint8_t) (u32 >> 8); in u32_to_bytes()
69 *(bytes + 3) = (uint8_t) u32; in u32_to_bytes()