flip_u32() function
Inverts the ordering of bits inside a 32-bit word (e.g. 31..0 -> 0..31). This routine can be used to flip smaller data types by using smaller values for @c width.
Syntax
uint32_t flip_u32(uint32_t value,
unsigned width);
Arguments
width
The number of bits in value (2-32).
Return value
A 32-bit word with @c value in reversed bit-order.