Lines Matching refs:bytes
344 static void u32_to_bytes(uint32_t u32, uint8_t *bytes) in u32_to_bytes() argument
346 *bytes = (uint8_t) (u32 >> 24); in u32_to_bytes()
347 *(bytes + 1) = (uint8_t) (u32 >> 16); in u32_to_bytes()
348 *(bytes + 2) = (uint8_t) (u32 >> 8); in u32_to_bytes()
349 *(bytes + 3) = (uint8_t) u32; in u32_to_bytes()
352 static void bytes_to_u32(uint8_t *bytes, uint32_t *u32) in bytes_to_u32() argument
354 *u32 = (uint32_t) ((*(bytes) << 24) + in bytes_to_u32()
355 (*(bytes + 1) << 16) + in bytes_to_u32()
356 (*(bytes + 2) << 8) + (*(bytes + 3))); in bytes_to_u32()
359 static void u16_to_bytes(uint16_t u16, uint8_t *bytes) in u16_to_bytes() argument
361 *bytes = (uint8_t) (u16 >> 8); in u16_to_bytes()
362 *(bytes + 1) = (uint8_t) u16; in u16_to_bytes()
365 static void bytes_to_u16(uint8_t *bytes, uint16_t *u16) in bytes_to_u16() argument
367 *u16 = (uint16_t) ((*bytes << 8) + *(bytes + 1)); in bytes_to_u16()
370 static void get_op_result_bits(uint8_t *bytes, uint8_t *res) in get_op_result_bits() argument
372 *res = *(bytes + 1) & RPMB_RESULT_MASK; in get_op_result_bits()