gensio_bswap - Man Page

Byte swapping routines.

Synopsis

#include <gensio/gensio_byteswap.h>

uint[16|32|64]_t gensio_bswap_[16|32|64](v)

uint[16|32|64]_t gensio_bswap_[16|32|64]_[from|to]_[be|le](v)

Description

These routine perform normal byte swapping operations in 16, 32, and 64-bit values.  The gensio_bswap_[16|32|64]() perform an unconditional byte swap.  The gensio_bswap_[16|32|64]_[from|to]_[be|le] will byte swap from/to the given endianness depending on the host platforms endianness.

GENSIO_IS_BIG_ENDIAN and GENSIO_IS_LITTLE_ENDIAN will be true or false depending on the host endian's endianness.

Return Values

The integer, byte swapped, will be returned.

See Also

gensio(5)

Referenced By

gensio(5).

04 Jan 2025