summaryrefslogtreecommitdiff
path: root/drivers/staging/nmf-cm/inc/typedef.h
blob: a29e6b88fdea9d5e3e77a6c1ad106420e2f1f414 (plain)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/*
 * Copyright (C) ST-Ericsson SA 2010
 * Author: Jean-Philippe FASSINO <jean-philippe.fassino@stericsson.com> for ST-Ericsson.
 * License terms:  GNU General Public License (GPL), version 2, with
 * user space exemption described in the top-level COPYING file in
 * the Linux kernel source tree.
 */
/*!
 * \defgroup COMMON Common types and definitions
 *
 * \defgroup NMF_COMMON NMF common definition
 * \ingroup COMMON
 *
 * \defgroup NMF_ABI NMF ABI specification
 * \warning This page is not for multimedia developers !
 */
/*!
 * \brief Primitive Type Definition
 *
 * \defgroup NMF_PRIMITIVE_TYPE Primitive type definition
 * \ingroup COMMON
 */

#ifndef NMF_TYPEDEF_H_
#define NMF_TYPEDEF_H_

#undef PRIVATE
#define PRIVATE  static                 //!< Private macro declaration \ingroup NMF_PRIMITIVE_TYPE

#undef PUBLIC
#ifdef __cplusplus
#define PUBLIC extern "C"               //!< Public macro declaration \ingroup NMF_PRIMITIVE_TYPE
#else
#define PUBLIC extern                   //!< Public macro declaration \ingroup NMF_PRIMITIVE_TYPE
#endif

#if defined(__SYMBIAN32__)
/*!
 * \brief Declared IMPORT_SHARED to allow dll/shared library creation
 *
 * \note Value depend on OS.
 *
 * \ingroup NMF_PRIMITIVE_TYPE
 */
    #ifndef IMPORT_SHARED
        #define IMPORT_SHARED   IMPORT_C
    #endif
/*!
 * \brief Declared EXPORT_SHARED to allow dll/shared library creation
 *
 * \note Value depend on OS.
 *
 * \ingroup NMF_PRIMITIVE_TYPE
 */
    #ifndef EXPORT_SHARED
        #define EXPORT_SHARED   EXPORT_C
    #endif
#elif defined(LINUX)
    #ifndef IMPORT_SHARED
        #define IMPORT_SHARED
    #endif
    #ifndef EXPORT_SHARED
        #define EXPORT_SHARED   __attribute__ ((visibility ("default")))
    #endif
#else
    #ifndef IMPORT_SHARED
        #define IMPORT_SHARED
    #endif

    #ifndef EXPORT_SHARED
        #define EXPORT_SHARED
    #endif
#endif

/*
 * Definition of type that are used by interface.
 */

typedef unsigned int t_uword;
typedef signed int t_sword;

#ifdef __flexcc2__

typedef unsigned char t_bool;

#ifdef __mode16__

typedef signed char t_sint8;
typedef signed int t_sint16;
typedef signed long t_sint24;
typedef signed long t_sint32;
typedef signed long long t_sint40;
// bigger type are not handle on this mode

typedef unsigned char t_uint8;
typedef unsigned int t_uint16;
typedef unsigned long t_uint24;
typedef unsigned long t_uint32;
typedef unsigned long long t_uint40;
// bigger type are not handle on this mode

// shared addr type definition
//typedef __SHARED16 t_uint16 * t_shared_addr;
typedef void * t_shared_field;

#else /* __mode16__ -> __mode24__ */

typedef signed char t_sint8;
typedef signed short t_sint16;
typedef signed int t_sint24;
typedef signed long t_sint32;
typedef signed long t_sint40;
typedef signed long t_sint48;
typedef signed long long t_sint56;

typedef unsigned char t_uint8;
typedef unsigned short t_uint16;
typedef unsigned int t_uint24;
typedef unsigned long t_uint32;
typedef unsigned long t_uint40;
typedef unsigned long t_uint48;
typedef unsigned long long t_uint56;

// shared addr type definition
//typedef __SHARED16 t_uint16 * t_shared_addr;
typedef t_uint24 t_shared_field;

#endif /* MMDSP mode24 */

// shared register (ARM world) type definition
#if 0
typedef struct {
    t_uint16 lsb;
    t_uint16 msb;
} t_shared_reg;
#endif
typedef t_uint32 t_shared_reg;

typedef t_uint32 t_physical_address;

#include <stwdsp.h>

#else /* __flexcc2__ -> RISC 32 Bits */

#ifndef _HCL_DEFS_H
typedef unsigned char t_bool;                   //!< Boolean primitive type \ingroup NMF_PRIMITIVE_TYPE

typedef unsigned char t_uint8;                  //!< Unsigned 8 bits primitive type \ingroup NMF_PRIMITIVE_TYPE
typedef signed char t_sint8;                    //!< Signed 8 bits primitive type \ingroup NMF_PRIMITIVE_TYPE
typedef unsigned short t_uint16;                //!< Unsigned 16 bits primitive type \ingroup NMF_PRIMITIVE_TYPE
typedef signed short t_sint16;                  //!< Signed 16 bits primitive type \ingroup NMF_PRIMITIVE_TYPE
typedef unsigned long t_uint32;                 //!< Unsigned 32 bits primitive type \ingroup NMF_PRIMITIVE_TYPE
typedef signed long t_sint32;                   //!< Signed 32 bits primitive type \ingroup NMF_PRIMITIVE_TYPE
typedef unsigned long long t_uint64;            //!< Unsigned 64 bits primitive type \ingroup NMF_PRIMITIVE_TYPE
typedef signed long long t_sint64;              //!< Signed 64 bits primitive type \ingroup NMF_PRIMITIVE_TYPE

typedef t_uint32 t_physical_address;
#endif /* _HCL_DEFS_H */

typedef unsigned long t_uint24;
typedef signed long t_sint24;
typedef unsigned long long t_uint48;
typedef signed long long t_sint48;

// shared addr type definition
typedef t_uint32 t_shared_addr;

// shared register (ARM world) type definition
typedef t_uint32 t_shared_reg;
typedef t_uint32 t_shared_field;

#endif /* RISC 32 Bits */

/*
 * Define boolean type
 */
#undef FALSE
#define FALSE  0                                            //!< Boolean FALSE value
#undef TRUE
#define TRUE  1                                             //!< Boolean TRUE value

#ifndef NULL
    #if defined __flexcc2__ || defined __SYMBIAN32__
        #define NULL (0x0)                                  //!< Null type \ingroup NMF_PRIMITIVE_TYPE
    #else
        #define NULL ((void*)0x0)                           //!< Null type \ingroup NMF_PRIMITIVE_TYPE
    #endif
#endif

typedef t_uint32 t_nmf_component_handle;

#endif /* NMF_TYPEDEF_H_ */