NETSwapBytes*

C Specification

#include <revolution/net.h>

inline u16 NETSwapBytes16( u16 val );
inline u32 NETSwapBytes32( u32 val );

Arguments

val Value whose byte order is to be reversed.

Return Values

Value whose byte order was reversed.

Description

This function reverses the byte order of a 16- or 32-bit value.
This function can be used for endian conversion and other such uses.

Ex.)
NETSwapBytes16(0xAABB) == 0xBBAA
NETSwapBytes32(0xAABB) == 0xBBAA0000

See Also

NETReadSwappedBytes16, NETReadSwappedBytes32, NETWriteSwappedBytes16, NETWriteSwappedBytes32

Revision History

2006/09/01 Initial version.


CONFIDENTIAL