Home
last modified time | relevance | path

Searched refs:upper_bytes (Results 1 – 1 of 1) sorted by relevance

/external/libiio/src/
Dchannel.c490 size_t upper_bytes = ((len * 8 - bits) / 8); in sign_extend() local
494 msb = dst[len - 1 - upper_bytes] & msb_bit; in sign_extend()
495 if (upper_bytes) in sign_extend()
496 memset(dst + len - upper_bytes, msb ? 0xff : 0x00, upper_bytes); in sign_extend()
498 dst[len - 1 - upper_bytes] |= ~(msb_bit - 1); in sign_extend()
500 dst[len - 1 - upper_bytes] &= (msb_bit - 1); in sign_extend()
503 msb = dst[upper_bytes] & msb_bit; in sign_extend()
504 if (upper_bytes) in sign_extend()
505 memset(dst, msb ? 0xff : 0x00, upper_bytes); in sign_extend()
507 dst[upper_bytes] |= ~(msb_bit - 1); in sign_extend()