Function util_reflect32

Function Documentation

uint32_t util_reflect32(uint32_t data, size_t n_bits)

Reflect N bits about the center position.

Starting from the LSB up to n_bits, reflect around the dividing line between bits 14-15.

Parameters:
  • data – The data to reflect.

  • n_bits – # of bits to reflect.

Returns:

The reflected data.