Byteordering


Files

file  byteordering.c
file  byteordering.h

Defines

#define LTOH16(val)   HTOL16(val)
#define LTOH32(val)   HTOL32(val)
#define ltoh16(l)   htol16(l)
#define ltoh32(l)   htol32(l)

Functions

uint16_t htol16 (uint16_t h)
uint32_t htol32 (uint32_t h)

Detailed Description

Architecture-dependent handling of byte-ordering.

Define Documentation

#define ltoh16 (  )     htol16(l)

Converts a 16-bit integer to host byte order.

Use this function on variable values instead of the macro LTOH16(). This saves code size.

Parameters:
[in] l A 16-bit integer in little-endian byte order.
Returns:
The given 16-bit integer converted to host byte order.

Definition at line 109 of file byteordering.h.

Referenced by fat_dir_entry_read_callback(), fat_free_clusters(), fat_get_next_cluster(), and fat_read_header().

#define LTOH16 ( val   )     HTOL16(val)

Converts a 16-bit integer to host byte order.

Use this macro for compile time constants only. For variable values use the function ltoh16() instead. This saves code size.

Parameters:
[in] val A 16-bit integer in little-endian byte order.
Returns:
The given 16-bit integer converted to host byte order.

Definition at line 84 of file byteordering.h.

#define ltoh32 (  )     htol32(l)

Converts a 32-bit integer to host byte order.

Use this function on variable values instead of the macro LTOH32(). This saves code size.

Parameters:
[in] l A 32-bit integer in little-endian byte order.
Returns:
The given 32-bit integer converted to host byte order.

Definition at line 124 of file byteordering.h.

Referenced by fat_dir_entry_read_callback(), fat_free_clusters(), fat_get_next_cluster(), and fat_read_header().

#define LTOH32 ( val   )     HTOL32(val)

Converts a 32-bit integer to host byte order.

Use this macro for compile time constants only. For variable values use the function ltoh32() instead. This saves code size.

Parameters:
[in] val A 32-bit integer in little-endian byte order.
Returns:
The given 32-bit integer converted to host byte order.

Definition at line 95 of file byteordering.h.


Function Documentation

uint16_t htol16 ( uint16_t  h  ) 

Converts a 16-bit integer to little-endian byte order.

Use this function on variable values instead of the macro HTOL16(). This saves code size.

Parameters:
[in] h A 16-bit integer in host byte order.
Returns:
The given 16-bit integer converted to little-endian byte order.

Definition at line 37 of file byteordering.c.

Referenced by fat_append_clusters(), and fat_write_dir_entry().

00038 {
00039     return HTOL16(h);
00040 }

Here is the caller graph for this function:

uint32_t htol32 ( uint32_t  h  ) 

Converts a 32-bit integer to little-endian byte order.

Use this function on variable values instead of the macro HTOL32(). This saves code size.

Parameters:
[in] h A 32-bit integer in host byte order.
Returns:
The given 32-bit integer converted to little-endian byte order.

Definition at line 53 of file byteordering.c.

Referenced by fat_append_clusters(), and fat_write_dir_entry().

00054 {
00055     return HTOL32(h);
00056 }

Here is the caller graph for this function:


Generated on Tue Jul 20 09:30:59 2010 for WaspmoteAPI by  doxygen 1.5.6