Interface __SizeFrom2ToConst

Preprocessor macro expanding to an expression

#include <ENDIAN.H>

x = __SizeFrom2ToConst(val)

Description

This is a family of preprocessor macros that convert to or from different endianity. The function of the macro is encoded in parts of its name: Size, From, To, Const.

Arguments

Returns

The if the CPU endianity differs from the requested endianity, the macro will return an argument with swapped bytes. Otherwise the macro will return val unchanged.

See also

ntohs, htons, ntohl, htonl