navit  0.5.3-trunk
endianess.h File Reference

Go to the source code of this file.

Macros

#define __bswap_16(__bsx)   ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8))
 
#define __bswap_32(__bsx)
 
#define le16_to_cpu(x)   __bswap_16 (x)
 
#define le32_to_cpu(x)   __bswap_32 (x)
 
#define le64_to_cpu(x)   __bswap_64 (x)
 
#define cpu_to_le16(x)   __bswap_16 (x)
 
#define cpu_to_le32(x)   __bswap_32 (x)
 
#define cpu_to_le64(x)   __bswap_64 (x)
 
#define __ENDIANESS_HANDLER__
 

Macro Definition Documentation

◆ __bswap_16

#define __bswap_16 (   __bsx)    ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8))

Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

◆ __bswap_32

#define __bswap_32 (   __bsx)
Value:
((((__bsx) & 0xff000000) >> 24) | \
(((__bsx) & 0x00ff0000) >> 8) |\
(((__bsx) & 0x0000ff00) << 8) | \
(((__bsx) & 0x000000ff) << 24))

◆ __ENDIANESS_HANDLER__

#define __ENDIANESS_HANDLER__

◆ cpu_to_le16

#define cpu_to_le16 (   x)    __bswap_16 (x)

◆ cpu_to_le32

#define cpu_to_le32 (   x)    __bswap_32 (x)

◆ cpu_to_le64

#define cpu_to_le64 (   x)    __bswap_64 (x)

◆ le16_to_cpu

#define le16_to_cpu (   x)    __bswap_16 (x)

◆ le32_to_cpu

#define le32_to_cpu (   x)    __bswap_32 (x)

◆ le64_to_cpu

#define le64_to_cpu (   x)    __bswap_64 (x)