Drop BeRTOS SD and FAT modules
[rmslog.git] / FAT16 / byteordering.c
1
2 /*
3  * Copyright (c) 2006-2009 by Roland Riegel <feedback@roland-riegel.de>
4  *
5  * This file is free software; you can redistribute it and/or modify
6  * it under the terms of either the GNU General Public License version 2
7  * or the GNU Lesser General Public License version 2.1, both as
8  * published by the Free Software Foundation.
9  */
10
11 #include "byteordering.h"
12
13 /**
14  * \addtogroup byteordering
15  *
16  * Architecture-dependent handling of byte-ordering.
17  *
18  * @{
19  */
20 /**
21  * \file
22  * Byte-order handling implementation (license: GPLv2 or LGPLv2.1)
23  *
24  * \author Roland Riegel
25  */
26
27 #if !(__AVR__)
28 /**
29  * Converts a 16-bit integer to little-endian byte order.
30  *
31  * Use this function on variable values instead of the
32  * macro HTOL16(). This saves code size.
33  *
34  * \param[in] h A 16-bit integer in host byte order.
35  * \returns The given 16-bit integer converted to little-endian byte order.
36  */
37 uint16_t htol16(uint16_t h)
38 {
39     return HTOL16(h);
40 }
41 #endif
42
43 #if !(__AVR__)
44 /**
45  * Converts a 32-bit integer to little-endian byte order.
46  *
47  * Use this function on variable values instead of the
48  * macro HTOL32(). This saves code size.
49  *
50  * \param[in] h A 32-bit integer in host byte order.
51  * \returns The given 32-bit integer converted to little-endian byte order.
52  */
53 uint32_t htol32(uint32_t h)
54 {
55     return HTOL32(h);
56 }
57 #endif
58
59 /**
60  * @}
61  */
62