28.2.127 __builtin_swap

Architecture

dsPIC33C/E/F, dsPIC30

Description

For a 16-bit word, swap the bytes in the word: 0x1234 -> 0x3412.

Prototype

uint16_t __builtin_swap(uint16_t word);

Argument

word – 16-bit word

Return Value

Returns the swapped value.

Machine Instruction

swap

Error Messages

None.