API Reference Manual 1.51.0
Loading...
Searching...
No Matches
api/abi-default/byteorder.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright (c) 2015-2018 Linaro Limited
3 */
4
11#ifndef ODP_ABI_BYTEORDER_H_
12#define ODP_ABI_BYTEORDER_H_
13
14#include <odp/api/std_types.h>
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20#ifndef __BYTE_ORDER__
21#error __BYTE_ORDER__ not defined!
22#endif
23
24#ifndef __ORDER_BIG_ENDIAN__
25#error __ORDER_BIG_ENDIAN__ not defined!
26#endif
27
28#ifndef __ORDER_LITTLE_ENDIAN__
29#error __ORDER_LITTLE_ENDIAN__ not defined!
30#endif
31
35#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
36 #define ODP_LITTLE_ENDIAN 1
37 #define ODP_BIG_ENDIAN 0
38 #define ODP_BYTE_ORDER ODP_LITTLE_ENDIAN
39 #define ODP_LITTLE_ENDIAN_BITFIELD 1
40 #define ODP_BIG_ENDIAN_BITFIELD 0
41 #define ODP_BITFIELD_ORDER ODP_LITTLE_ENDIAN_BITFIELD
42#else
43 #define ODP_LITTLE_ENDIAN 0
44 #define ODP_BIG_ENDIAN 1
45 #define ODP_BYTE_ORDER ODP_BIG_ENDIAN
46 #define ODP_LITTLE_ENDIAN_BITFIELD 0
47 #define ODP_BIG_ENDIAN_BITFIELD 1
48 #define ODP_BITFIELD_ORDER ODP_BIG_ENDIAN_BITFIELD
49#endif
50
51typedef uint16_t odp_u16le_t;
52typedef uint16_t odp_u16be_t;
53
54typedef uint32_t odp_u32le_t;
55typedef uint32_t odp_u32be_t;
56
57typedef uint64_t odp_u64le_t;
58typedef uint64_t odp_u64be_t;
59
60typedef uint16_t odp_u16sum_t;
61typedef uint32_t odp_u32sum_t;
62
67#ifdef __cplusplus
68}
69#endif
70
71#endif
Standard C language types and definitions for ODP.
uint16_t odp_u16sum_t
unsigned 16bit bitwise
uint32_t odp_u32be_t
unsigned 32bit big endian
uint32_t odp_u32le_t
unsigned 32bit little endian
uint16_t odp_u16be_t
unsigned 16bit big endian
uint16_t odp_u16le_t
unsigned 16bit little endian
uint64_t odp_u64be_t
unsigned 64bit big endian
uint64_t odp_u64le_t
unsigned 64bit little endian
uint32_t odp_u32sum_t
unsigned 32bit bitwise