4 * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
5 * This file is part of DevLib - See devlib/README for information.
8 * \brief Functions to convert integers to/from host byte-order.
12 * \author Bernardo Innocenti <bernie@develer.com>
13 * \author Stefano Fedrigo <aleph@develer.com>
18 * Revision 1.1 2004/07/20 16:26:15 bernie
19 * Import byte-order macros into DevLib.
23 #ifndef MWARE_BYTEORDER_H
24 #define MWARE_BYTEORDER_H
29 INLINE uint16_t cpu_to_be16(uint16_t n);
30 INLINE uint16_t cpu_to_be16(uint16_t n)
32 if (CPU_BYTE_ORDER == CPU_LITTLE_ENDIAN)
38 INLINE uint16_t cpu_to_le16(uint16_t n);
39 INLINE uint16_t cpu_to_le16(uint16_t n)
41 if (CPU_BYTE_ORDER == CPU_BIG_ENDIAN)
47 #endif /* MWARE_BYTEORDER_H */