yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | /***************************************************************************** |
| 2 | * Copyright Statement: |
| 3 | * -------------------- |
| 4 | * This software is protected by Copyright and the information contained |
| 5 | * herein is confidential. The software may not be copied and the information |
| 6 | * contained herein may not be used or disclosed except with the written |
| 7 | * permission of MediaTek Inc. (C) 2016 |
| 8 | * |
| 9 | * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| 10 | * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS (""MEDIATEK SOFTWARE"") |
| 11 | * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| 12 | * AN ""AS-IS"" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| 13 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| 14 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| 15 | * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| 16 | * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| 17 | * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| 18 | * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| 19 | * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| 20 | * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| 21 | * |
| 22 | * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| 23 | * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| 24 | * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| 25 | * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| 26 | * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| 27 | * |
| 28 | * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| 29 | * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| 30 | * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| 31 | * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| 32 | * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| 33 | * |
| 34 | *****************************************************************************/ |
| 35 | /************************************************************* |
| 36 | * |
| 37 | * This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc. |
| 38 | * |
| 39 | * Any unauthorized use inconsistent with the terms of such license is strictly prohibited. |
| 40 | * |
| 41 | * Copyright (c) 1998-2010 VIA Telecom, Inc. All rights reserved. |
| 42 | * |
| 43 | *************************************************************/ |
| 44 | #ifndef __INC_OTTSDEFS_H__ |
| 45 | #define __INC_OTTSDEFS_H__ |
| 46 | |
| 47 | /***************************************************************************** |
| 48 | FILE NAME: ottsdefs.h |
| 49 | |
| 50 | DESCRIPTION: |
| 51 | Defines macros and types that allow the code to be freely ported between |
| 52 | ARM and Visual C++ compiler environments. The Visual C++ compiler is used |
| 53 | for the Off Target Test System (OTTS) simulation (where the protocol stack |
| 54 | and some other CP code is compiled so it can be tested under simulation), |
| 55 | while the ARM compiler is used for the "real code" targeted toward the phone |
| 56 | hardware. |
| 57 | |
| 58 | *****************************************************************************/ |
| 59 | |
| 60 | #if !defined (__MTK_TARGET__) |
| 61 | typedef kal_int8 int8; |
| 62 | typedef kal_int16 int16; |
| 63 | typedef kal_int32 int32; |
| 64 | typedef kal_int64 int64; |
| 65 | |
| 66 | typedef kal_uint8 uint8; |
| 67 | typedef kal_uint16 uint16; |
| 68 | typedef kal_uint32 uint32; |
| 69 | typedef kal_uint64 uint64; |
| 70 | |
| 71 | typedef kal_uint8 UINT8; /* Unsigned 8-bit quantity */ |
| 72 | typedef kal_int8 INT8; /* Signed 8-bit quantity */ |
| 73 | typedef kal_uint16 UINT16; /* Unsigned 16-bit quantity */ |
| 74 | typedef kal_int16 INT16; /* Signed 16-bit quantity */ |
| 75 | typedef kal_uint32 UINT32; /* Unsigned 32-bit quantity */ |
| 76 | typedef kal_int32 INT32; /* Signed 32-bit quantity */ |
| 77 | |
| 78 | typedef kal_bool bool; |
| 79 | typedef kal_bool Bool; |
| 80 | #endif |
| 81 | |
| 82 | #if (defined MTK_PLT_ON_PC) |
| 83 | |
| 84 | /* Suppress some of the useless and annoying warnings. |
| 85 | Also suppress some of the warnings that the ARM compiler should be |
| 86 | bitching about, and which the stack programmers should pay attention to, |
| 87 | but are frequent enough that they muddy the compile result listing (the |
| 88 | purpose of the run through the Visual C++ compiler is *not* to catch |
| 89 | this kind of stuff, just to allow their code to run and be tested under |
| 90 | the simulator. These kinds of warnings should be caught and fixed at the |
| 91 | ARM compile stage. |
| 92 | ----------------------------------------------------------------------- */ |
| 93 | #pragma warning(disable: 4761) /* integral size mismatch */ |
| 94 | #pragma warning(disable: 4244) /* conversion loses precision */ |
| 95 | #pragma warning(disable: 4013) /* function used without prototype, assuming extern returning int */ |
| 96 | #pragma warning(disable: 4018) /* signed/unsigned mismatch */ |
| 97 | #pragma warning(disable: 4091) /* extern ignored when variable not declared */ |
| 98 | #pragma warning(disable: 4002) /* too many actual parameters for macro */ |
| 99 | #pragma warning(disable: 4003) /* not enough actual parameters for macro */ |
| 100 | #pragma warning(disable: 4554) /* check operator precedence for possible error */ |
| 101 | #pragma warning(disable: 4103) /* used #pragma to change alignment */ |
| 102 | #pragma warning(disable: 4142) /* bening redefinition of type */ |
| 103 | |
| 104 | #ifndef TRUE |
| 105 | #define TRUE (1) |
| 106 | #endif |
| 107 | |
| 108 | #ifndef FALSE |
| 109 | #define FALSE (0) |
| 110 | #endif |
| 111 | |
| 112 | #endif /* MTK_PLT_ON_PC */ |
| 113 | |
| 114 | #define OTTS_static |
| 115 | |
| 116 | /* enable ARM compiler "__packed" and "__inline" directives */ |
| 117 | #if defined(GEN_FOR_PC) /* For Cgen generate NVRAM database */ |
| 118 | #define PACKED |
| 119 | #define PACKED_PREFIX |
| 120 | #define PACKED_POSTFIX |
| 121 | #elif defined(__ARMCC_VERSION) |
| 122 | #define PACKED __packed |
| 123 | #define PACKED_PREFIX PACKED |
| 124 | #define PACKED_POSTFIX |
| 125 | |
| 126 | #define INLINE __inline |
| 127 | #elif defined(__GNUC__) |
| 128 | #define PACKED |
| 129 | #define PACKED_PREFIX |
| 130 | #define PACKED_POSTFIX |
| 131 | |
| 132 | #define INLINE inline |
| 133 | #elif defined(_MSC_VER) |
| 134 | /* no "__packed" or "__inline" directives in Visual C++ */ |
| 135 | #define PACKED |
| 136 | #define PACKED_PREFIX |
| 137 | #define PACKED_POSTFIX |
| 138 | |
| 139 | /* INLINE has been defined in kal_public_defs.h */ |
| 140 | #endif |
| 141 | |
| 142 | /*After Jade (GCC build), Remove PACKED attribute for NVRAM Data structure*/ |
| 143 | #if defined (MTK_DEV_CCCI_FS) && defined (__GNUC__) |
| 144 | #define NV_PACKED_PREFIX |
| 145 | #define NV_PACKED_POSTFIX |
| 146 | #else |
| 147 | #define NV_PACKED_PREFIX PACKED_PREFIX |
| 148 | #define NV_PACKED_POSTFIX PACKED_POSTFIX |
| 149 | #endif |
| 150 | |
| 151 | #if defined(GEN_FOR_PC) /* For Cgen generate NVRAM database */ |
| 152 | #define GET_RETURN_ADDRESS(a) |
| 153 | #define GET_STACK_POINTER(a) |
| 154 | #define PRAGMA_BEGIN_COMPILER_OPTIMIZE_DISABLE |
| 155 | #define PRAGMA_END_COMPILER_OPTIMIZE_DISABLE |
| 156 | #define PRAGMA_BEGIN_COMPILER_OPTIMIZE_TIME |
| 157 | #define PRAGMA_END_COMPILER_OPTIMIZE_TIME |
| 158 | #define PRAGMA_BEGIN_COMPILER_OPTIMIZE_SPACE |
| 159 | #define PRAGMA_END_COMPILER_OPTIMIZE_SPACE |
| 160 | #endif |
| 161 | |
| 162 | #if defined(GEN_FOR_PC) /* For Cgen generate NVRAM database */ |
| 163 | #define ATTRIB(x) |
| 164 | #define ATTRIB_SECTION(x) |
| 165 | #define ATTRIB_ALIGNED(x) |
| 166 | #elif defined(__ARMCC_VERSION) |
| 167 | #define ATTRIB(x) __attribute__(x) |
| 168 | #if defined(USE_ATTRIB_SECTION) |
| 169 | #define ATTRIB_SECTION(x) ATTRIB((section(x))) |
| 170 | #else |
| 171 | #define ATTRIB_SECTION(x) |
| 172 | #endif |
| 173 | #define ATTRIB_ALIGNED(x) __align(x) |
| 174 | #elif defined(__GNUC__) |
| 175 | #define ATTRIB(x) /*__attribute__(x)*/ |
| 176 | #define ATTRIB_SECTION(x) /* ATTRIB((section(x))) */ |
| 177 | #define ATTRIB_ALIGNED(x) ATTRIB((aligned(x))) |
| 178 | #elif defined(_MSC_VER) |
| 179 | #define ATTRIB(x) |
| 180 | #define ATTRIB_SECTION(x) |
| 181 | #define ATTRIB_ALIGNED(x) __declspec(align(x)) |
| 182 | #endif |
| 183 | |
| 184 | /***************************************************************************** |
| 185 | * $Log: ottsdefs.h $ |
| 186 | * |
| 187 | * 09 05 2019 jari.manninen |
| 188 | * [MOLY00437520] [System Service][MOLY Kernel Internal Request] Legacy RTOS reference removal from mandatory source code delivery files |
| 189 | * |
| 190 | * Legacy RTOS reference removal. |
| 191 | * |
| 192 | * 10 12 2017 sue.zhong |
| 193 | * [MOLY00282761] [MT6763][SMO][C2K]Optimize inter-category interfaces |
| 194 | * |
| 195 | * . |
| 196 | * |
| 197 | * 07 06 2017 sue.zhong |
| 198 | * [MOLY00259241] [6293][C2K]Replace with KAL data type |
| 199 | * ::interface |
| 200 | * |
| 201 | * 06 23 2017 sue.zhong |
| 202 | * [MOLY00259241] [6293][C2K]Replace with KAL data type |
| 203 | * ::Delete legacy header files |
| 204 | * Revision 1.2 2004/03/25 11:46:02 fpeng |
| 205 | * Updated from 6.0 CP 2.5.0 |
| 206 | * Revision 1.2 2004/02/10 15:17:02 bcolford |
| 207 | * Merged CBP4.0 Release 8.05.0 changes. |
| 208 | * Revision 1.5 2003/10/31 15:23:51 mclee |
| 209 | * define kal_uint16 |
| 210 | * Revision 1.4 2002/10/21 09:39:23 mshaver |
| 211 | * Changes to support OTTS incorportated into the baseline. |
| 212 | * These changes enabled only by #ifdef OTTS. |
| 213 | * Normal CP operation is unaffected. |
| 214 | * Revision 1.3 2002/06/04 08:07:21 mshaver |
| 215 | * Added VIA Technologies copyright notice. |
| 216 | * Revision 1.2 2002/02/01 11:58:03 ameya |
| 217 | * Created this file and moved all OTTS related definitions existing in all other files to this header file. |
| 218 | * Revision 1.1 2002/02/01 11:06:55 ameya |
| 219 | * Initial revision |
| 220 | * Revision 1.00 2001/12/14 14:29:00 jackt |
| 221 | * Original version. |
| 222 | *****************************************************************************/ |
| 223 | |
| 224 | /***************************************************************************** |
| 225 | * End of File |
| 226 | *****************************************************************************/ |
| 227 | #endif |
| 228 | /**Log information: \main\TROPHY_Trophy_0.4.21_QILIAN_ALPHA\1 2013-08-26 07:41:52 GMT xding |
| 229 | ** href#0000, merge MMC from CBP8**/ |
| 230 | /**Log information: \main\Trophy\Trophy_xding_href22331\1 2013-12-10 07:18:02 GMT xding |
| 231 | ** HREF#22331, ºÏ²¢MMCÏà¹Ø¹¦Äܵ½Trophy baselineÉÏ**/ |
| 232 | /**Log information: \main\Trophy\1 2013-12-10 08:33:37 GMT jzwang |
| 233 | ** href#22331:Merge MMC latest implementation from Qilian branch.**/ |
| 234 | |