28.4 __builtin_bswap16 Built-in Function

Returns its argument with the order of its bytes reversed. For example, an argument value of 0xaabb is returned as 0xbbaa. A byte here always means exactly 8 bits.

Prototype

uint16_t __builtin_bswap16 (uint16_t x)

Argument

x: the value whose bytes are to be swapped

Return Value

The byte-swapped value

Error Messages

None.