-
Notifications
You must be signed in to change notification settings - Fork 9
/
lmac_types.h
executable file
·69 lines (58 loc) · 1.49 KB
/
lmac_types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/**
****************************************************************************************
*
* @file co_types.h
*
* @brief This file replaces the need to include stdint or stdbool typical headers,
* which may not be available in all toolchains, and adds new types
*
* Copyright (C) ESWIN 2015-2020
*
* $Rev: $
*
****************************************************************************************
*/
#ifndef _LMAC_INT_H_
#define _LMAC_INT_H_
/**
****************************************************************************************
* @addtogroup CO_INT
* @ingroup COMMON
* @brief Common integer standard types (removes use of stdint)
*
* @{
****************************************************************************************
*/
/*
* DEFINES
****************************************************************************************
*/
#include <linux/version.h>
#include <linux/types.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
#include <linux/bits.h>
#else
#include <linux/bitops.h>
#endif
#ifdef CONFIG_ECRNX_TL4
typedef uint16_t u8_l;
typedef int16_t s8_l;
typedef uint16_t bool_l;
#else
typedef uint8_t u8_l;
typedef int8_t s8_l;
typedef bool bool_l;
#endif
typedef uint16_t u16_l;
typedef int16_t s16_l;
typedef uint32_t u32_l;
typedef int32_t s32_l;
typedef uint64_t u64_l;
#define ALIGNED(n) __attribute__((aligned (n)))
#if (__SIZEOF_POINTER__ == 8)
#define ptr_addr u64_l
#else
#define ptr_addr u32_l
#endif
/// @} CO_INT
#endif // _LMAC_INT_H_