Changed the name of a file and some lines
[staging/basesystem.git] / agl-basefiles / include / agl_types_deprecated.h
1 /*
2  * @copyright Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef _AGL_TYPES_OBSOLUTED_H_
18 #define _AGL_TYPES_OBSOLUTED_H_
19
20 #include <sys/mman.h>
21 #include <sys/types.h>
22 #include <stdint.h>
23 #include <stdbool.h>
24 #include <linux/types.h>
25 #include <stdio.h>
26
27 #ifndef _GNU_SOURCE
28 #define _GNU_SOURCE
29 #endif
30 #include <errno.h>
31
32 typedef u_int64_t               _Uint64t;
33 typedef int64_t                 _Int64t;
34 typedef u_int32_t               _Uint32t;
35 typedef int32_t                 _Int32t;
36 typedef u_int16_t               _Uint16t;
37 typedef int16_t                 _Int16t;
38 typedef u_int8_t                _Uint8t;
39 typedef int8_t                  _Int8t;
40
41 typedef _Int8t                                  _int8;
42 typedef _Uint8t                                 _uint8;
43 typedef _Int16t                                 _int16;
44 typedef _Uint16t                                _uint16;
45 typedef _Int32t                                 _int32;
46 typedef _Uint32t                                _uint32;
47 typedef _Int64t                                 _int64;
48 typedef _Uint64t                                _uint64;
49
50
51 #ifdef AGL_PosixBasedOS001LEGACY_USED
52 #define AGL_PROTECTION_NO_CACHE        0x00000800
53 #define AGL_MAP_NON_INIT       0x00004000
54 #define AGL_MAP_PHYSICAL           0x00010000
55 #define AGL_NON_FD             (-1)
56 #define AGL_MAP_DEV_FAILED ((unsigned long)MAP_FAILED)
57 #endif /*AGL_PosixBasedOS001LEGACY_USED*/
58
59 #define EOK     0
60
61 #ifdef AGL_PosixBasedOS001LEGACY_USED
62 #define agl_io_in32(_x) *(volatile unsigned long *)(_x)
63 #define agl_io_out32(_x, _y) {*(volatile unsigned long *)((void*)(_x)) = (_y);}
64 #endif /*AGL_PosixBasedOS001LEGACY_USED*/
65
66
67
68 #define __AGLDD_TYPEDEF_I64
69 typedef int64_t         i64;    /* 8-byte signed integer */
70
71 #define __AGLDD_TYPEDEF_U64
72 typedef uint64_t        u64;    /* 8-byte unsigned integer */
73
74 #define __AGLDD_TYPEDEF_U32
75 typedef uint32_t                u32;    /* 4-byte unsigned integer */
76
77 #define __AGLDD_TYPEDEF_U16
78 typedef uint16_t                u16;    /* 2-byte unsigned integer */
79
80 #define __AGLDD_TYPEDEF_I16
81 typedef int16_t                 i16;    /* 2-byte signed integer */
82
83 #define __AGLDD_TYPEDEF_U8
84 typedef uint8_t         u8;     /* 1-byte unsigned integer */
85
86 #define __AGLDD_TYPEDEF_I8
87 typedef int8_t                  i8;     /* 1-byte signed integer */
88
89 #define __AGLDD_TYPEDEF_INT8
90 typedef int8_t          INT8;
91
92 #define __AGLDD_TYPEDEF_INT16
93 typedef int16_t         INT16;
94
95 #define __AGLDD_TYPEDEF_INT32
96 typedef int32_t         INT32;
97
98 #define __AGLDD_TYPEDEF_INT64
99 typedef int64_t INT64;
100
101 #define __AGLDD_TYPEDEF_UINT8
102 typedef uint8_t         UINT8;
103
104 #define __AGLDD_TYPEDEF_UINT16
105 typedef uint16_t                UINT16;
106
107 #define __AGLDD_TYPEDEF_UINT32
108 typedef uint32_t                UINT32;
109
110 #define __AGLDD_TYPEDEF_UINT64
111 typedef uint64_t        UINT64;
112
113 #ifndef __KERNEL__
114 #if !defined    __WIN_TYPEDEF_BOOL
115 #define __AGLDD_TYPEDEF_BOOL
116 typedef uint32_t                  BOOL;
117 #endif
118 #endif
119
120 #ifndef TRUE
121 #define TRUE                    1
122 #endif
123 #ifndef FALSE
124 #define FALSE                   0
125 #endif
126
127 // AGL ASSERT MACRO
128 #ifdef AGL_ASSERT_ON
129 #define AGL_ASSERT_NOT_TESTED() \
130 do {fprintf(stderr, "[%s][%s][%s:%d]AGL_ASSERT_NOT_TESTED.\n",  \
131     program_invocation_short_name, __func__, __FILE__, __LINE__);} while(0)
132 #else
133 #define AGL_ASSERT_NOT_TESTED() \
134 do {} while(0)
135 #endif
136 #endif /* _AGL_TYPES_OBSOLUTED_H_ */