Specifications
System Macros Invoked by Drivers
SWAPWORD
SWAPWORD
Swaps the bytes within each word supplied.
Format
SWAPWORD word
Parameters
word
The address of the data (2 bytes) that requires the bytes to be swapped.
Description
When a data word is passed between a host CPU and a device with a differing
byte-order pattern (big-endian and little-endian devices), the byte positions
must be swapped. The SWAPWORD macro reads the location of the 2-byte data
supplied in the word argument and swaps the byte positions.
2–97