ft_private.h
9.78 KB
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*******************************************************************************
* Modification Notice:
* --------------------------
* This software is modified by MediaTek Inc. and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2001
*
*******************************************************************************/
/*******************************************************************************
* Filename:
* ---------
* ft_private.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* FT private stuff
*
* Author:
* -------
* -------
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
#ifndef FT_PRIVATE_H
#define FT_PRIVATE_H
#include "ft_msg.h"
#include "l1d_cid.h"
#include "app_ltlcom.h"
#include "stack_config.h"
#include "stack_msgs.h"
#include "stack_common.h"
#include "nvram_struct.h"
#include "l1_types_public.h"
#include "fs_type.h"
#include "kal_general_types.h"
#include "kal_public_defs.h"
#include "l1cal.h"
#if defined(__UMTS_RAT__) && defined(__MTK_UL1_FDD__)
/* under construction !*/
#endif // #if defined(__UMTS_RAT__) && defined(__MTK_UL1_FDD__)
#include "wndrv_cal.h"
#include "wndrv_ft_types.h"
#include "wndrv_ft_msg.h"
/***********************
* TST module APIs
**********************/
#include "kal_trace.h"
extern kal_uint8 tst_get_meta_mode_trace_enable();
extern kal_bool tst_set_meta_mode_trace_enable(kal_uint8 enable);
#ifdef __cplusplus
extern "C" {
#endif
extern kal_uint16 ft_gl_token;
extern kal_uint16 ft_gl_rf_token;
extern kal_uint16 ft_gl_l4aud_token;
extern kal_uint16 ft_gl_l4aud_ind_token;
extern kal_uint16 ft_gl_l4aud_current_volume;
extern peer_buff_struct *ft_gl_l4aud_peer_buf;
extern kal_uint16 ft_gl_nvram_token;
//extern kal_bool g_META_DLL_Version_Incorrect;
extern kal_bool g_b_ft_assert_check_enable;
extern kal_bool g_b_ver_Incorrect;
extern kal_uint8 g_u1_msg_recv_times;
extern kal_bool g_b_ft_nvram_rec; // true: get the checksum of the nvram LID, rid
extern kal_bool g_b_ft_nvram_proc_locally; // true: don't return the CAL integrity data to PC side
/* for build warning */
extern void FT_FtPMICRegisterRead(ft_PMICRegisterRead_req_T* req, unsigned char RegType);
extern void FT_FtPMICRegisterWrite(ft_PMICRegisterWrite_req_T* req, unsigned char RegType);
/* for backup and restore calibration data */
extern kal_uint8 ft_gl_path_check_flag;
/* for ft event group pointer */
#define FT_EVENT_TIMEOUT 5000 // 10 sec
extern kal_uint32 ft_event_group_ptr; // event bit map in ft_public.h
/* ------------------------------------------------------------------------- */
typedef struct
{
kal_uint16 ft_msg_id;
RfTestCmdType type;
RfTestCmdAfc afcCmd;
RfTestResultParam param;
kal_bool wait_cnf;
kal_bool result_ready;
#if (IS_FHC_SUPPORT == 1)
DTSParam* pDTSBuf; // for FDT calibration
UTSParam* pUTSBuf;
#endif // #if (IS_FHC_SUPPORT == 1)
}L1RF_DATA_T;
typedef union
{
l1cal_agcPathLoss_T ft_l1cal_agcPathLoss;
l1cal_rampTable_T ft_l1cal_rampTable;
l1cal_afcData_T ft_l1cal_afcData;
l1spfc_T ft_l1spfc;
l1cal_txiq_T ft_l1cal_txiq;
l1cal_interRampData_T ft_l1cal_interRampData;
l1cal_crystalAfcData_T ft_l1cal_crystalAfcData;
l1cal_crystalCapData_T ft_l1cal_crystalCapData;
l1cal_rfspecialcoef_T ft_l1cal_rfspecialcoef;
l1cal_txpc_T ft_l1cal_txpc;
kal_uint16 m_txpc_subband_compensation[11];
#if defined(__WIFI_SUPPORT__)
wndrv_cal_mac_addr_struct ft_wndrv_mac_addr;
wndrv_cal_txpwr_2400M_struct ft_wndrv_txpwr_2400M;
wndrv_cal_txpwr_5000M_struct ft_wndrv_txpwr_5000M;
wndrv_cal_dac_dc_offset_struct ft_wndrv_dac_dc_offset;
wndrv_cal_tx_ALC_2400M_struct ft_wndrv_tx_ALC_2400M_struct;
wndrv_cal_ALC_Slope_2400M_struct ft_wndrv_txALC_slope_2400M;
#endif // #if defined(__WIFI_SUPPORT__)
#if defined(__EPSK_TX__)
l1cal_EPSK_interRampData_T ft_l1cal_epsk_interramp;
#endif // #if defined(__EPSK_TX__)
#if defined(__UMTS_RAT__) && defined(__MTK_UL1_FDD__)
/* under construction !*/
/* under construction !*/
/* under construction !*/
#if defined(__UL1_HS_PLATFORM__)
/* under construction !*/
#endif // #if defined(__UL1_HS_PLATFORM__)
#endif // #if defined(__UMTS_RAT__) && defined(__MTK_UL1_FDD__)
}RuntimeUpdate_T;
extern L1RF_DATA_T ft_rfDATA;
extern RuntimeUpdate_T ft_rf_data_pt;
/*******************************************************************************
*
* ft_fnc.c
*
*******************************************************************************/
void FT_DispatchMessage(ilm_struct* ptrMsg);
void FT_InitCalibrationData(task_entry_struct *task_entry_ptr);
void FT_InitFtData(void);
void FT_WriteTo_NVRAM (ft_nvram_write_req_struct_T* req, peer_buff_struct * peer_buff, ilm_struct* ptrMsg);
void FT_ReadFrom_NVRAM(ft_nvram_read_req_struct_T* req);
void FT_ReadFrom_NVRAM_CNF(nvram_read_cnf_struct*,peer_buff_struct*);
void FT_WriteTo_NVRAM_CNF(nvram_write_cnf_struct*);
/* BaseBand Testing */
void FT_FtRegisterRead (ft_RegisterRead_req_T *req, unsigned char RegType);
void FT_FtRegisterWrite (ft_RegisterWrite_req_T *req, unsigned char RegType);
void FT_FtADC_GetMeaData (ft_FtADC_GetMeaData_req_T *req);
/* Version Info */
extern void FT_GetVersionInfo(void);
/* FT task test alive */
extern void FT_TestAlive(void);
/* FT task Power Off */
extern void FT_PowerOff(void);
/* FT task utility command */
extern void FT_UtilityCommand(ilm_struct *ptrMsg);
/*******************************************************************************
*
* other module's api
*
*******************************************************************************/
extern kal_uint32 SaveAndSetIRQMask(void);
/***************************
* FT task self message API
**************************/
typedef void (*ft_in_proc_call_type) (kal_uint32 arg1, void *arg2);
typedef struct
{
LOCAL_PARA_HDR
ft_in_proc_call_type func;
kal_uint32 func_arg1;
void *func_arg2;
} ft_in_proc_call_req_struct;
typedef enum
{
MSG_ID_FT_IN_PROC_CALL_REQ,
MSG_ID_FT_IN_PROC_CALL_CNF
}FT_TASK_MESSAGE_TYPE;
void ft_send_in_proc_call_req(ft_in_proc_call_type func, kal_uint32 func_arg1, void *func_arg2);
void ft_in_proc_call_handler(ilm_struct *ilm_ptr);
extern kal_char g_FT_debug_buf[128];
/***********************
* NVRAM module APIs
**********************/
extern kal_bool nvram_get_disk_file_info(kal_uint32 *diskfilesize, kal_uint32 *freespace, kal_uint32 *overhead);
/***********************
* CCT module APIs
**********************/
kal_uint8 ft_cct_check_op_is_support(kal_uint32 query_op_code);
#ifdef __cplusplus
}
#endif // #ifdef __cplusplus
#endif // #ifndef FT_PRIVATE_H