Function mem_bswap16

Function Documentation

status_t mem_bswap16(uint16_t *buf, size_t n_bytes)

Byte swap memory in 1 byte chunks (upper 8/lower 8) in place.

Parameters:
  • buf – Memory to swap. Must be 16-bit aligned or no action is performed.

  • n_bytes – # bytes to swap. Must be 16-bit aligned or no action is performed.

Returns:

status_t