Rev 2794 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2794 | Rev 2797 | ||
---|---|---|---|
Line 34... | Line 34... | ||
34 | */ |
34 | */ |
35 | 35 | ||
36 | #ifndef KERN_arm32_BYTEORDER_H_ |
36 | #ifndef KERN_arm32_BYTEORDER_H_ |
37 | #define KERN_arm32_BYTEORDER_H_ |
37 | #define KERN_arm32_BYTEORDER_H_ |
38 | 38 | ||
39 | #include <byteorder.h> |
- | |
40 | - | ||
41 | #ifdef BIG_ENDIAN |
39 | #ifdef BIG_ENDIAN |
42 | - | ||
43 | #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) |
- | |
44 | #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) |
- | |
45 | #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) |
- | |
46 | - | ||
47 | #define uint16_t_be2host(n) (n) |
- | |
48 | #define uint32_t_be2host(n) (n) |
- | |
49 | #define uint64_t_be2host(n) (n) |
40 | #define ARCH_IS_BIG_ENDIAN |
50 | - | ||
51 | #else |
41 | #else |
52 | - | ||
53 | #define uint16_t_le2host(n) (n) |
- | |
54 | #define uint32_t_le2host(n) (n) |
- | |
55 | #define uint64_t_le2host(n) (n) |
42 | #define ARCH_IS_LITTLE_ENDIAN |
56 | - | ||
57 | #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) |
- | |
58 | #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) |
- | |
59 | #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) |
- | |
60 | - | ||
61 | #endif |
43 | #endif |
62 | 44 | ||
63 | #endif |
45 | #endif |
64 | 46 | ||
65 | /** @} |
47 | /** @} |