blob: d855c51fadb89bd46f8f842d0934d1cc2fe8f53b [file] [log] [blame]
yu.dongc33b3072024-08-21 23:14:49 -07001/*******************************************************************************
2* Modification Notice:
3* --------------------------
4* This software is modified by MediaTek Inc. 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*
38* Filename:
39* ---------
40* cl1tstl1psif.h
41*
42* Project:
43* --------
44* MTXXXX Project
45*
46* Description:
47* ------------
48* This file contains the log IQ functions.
49*
50* Author:
51* -------
52*
53*
54*==============================================================================
55* HISTORY
56* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
57*------------------------------------------------------------------------------
58 * removed!
59 * removed!
60 * removed!
61*
62 * removed!
63 * removed!
64 * removed!
65*
66 * removed!
67 * removed!
68 * removed!
69 * removed!
70*
71 * removed!
72 * removed!
73 * removed!
74 * removed!
75*
76 * removed!
77 * removed!
78 * removed!
79 * removed!
80*
81 * removed!
82 * removed!
83 * removed!
84 * removed!
85*
86 * removed!
87 * removed!
88 * removed!
89 * removed!
90*
91 * removed!
92 * removed!
93 * removed!
94 * removed!
95*
96 * removed!
97 * removed!
98 * removed!
99 * removed!
100*
101 * removed!
102 * removed!
103 * removed!
104 * removed!
105*
106 * removed!
107 * removed!
108 * removed!
109*
110 * removed!
111 * removed!
112 * removed!
113*
114 * removed!
115 * removed!
116*
117 * removed!
118 * removed!
119*
120 * removed!
121 * removed!
122 * removed!
123*
124 * removed!
125 * removed!
126 * removed!
127*
128 * removed!
129 * removed!
130*
131 * removed!
132 * removed!
133*
134 * removed!
135 * removed!
136*
137*
138*
139*
140*
141*
142*------------------------------------------------------------------------------
143* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
144*==============================================================================
145******************************************************************************/
146
147#ifndef _CL1TST_L1PS_IF_H_
148#define _CL1TST_L1PS_IF_H_
149
150/*----------------------------------------------------------------------------
151 Include Files
152----------------------------------------------------------------------------*/
153#include "cl1tsteltif.h"
154#include "valapi.h"
155
156
157typedef enum
158{
159 CL1_DISABLE_MODE = 0,
160 CL1_MAINRX_ONLY_MODE = 1,
161 CL1_DIVERSITYRX_ONLY_MODE,
162 CL1_DUAL_MODE,
163 CL1_TESTMODE_NUM
164} Cl1AntennaTestModeT;
165
166typedef enum
167{
168 H_ANT = 0,
169 L_ANT_1,
170 L_ANT_2,
171 INVALID_ANT = 255
172} Cl1MainAntennaInfoT;
173
174typedef struct
175{
176 Cl1AntennaTestModeT AntTestMode;
177} Cl1TstAntennaTestModeMsgT;
178
179typedef struct
180{
181 LOCAL_PARA_HDR
182 Cl1TstAntennaTestModeMsgT msg;
183}cl1tst_val_rx_test_mode_msg_struct;
184
185typedef struct
186{
187 ValCl1tstReqModeT Mode;
188 kal_uint16 Channel;
189 kal_uint8 Band;
190 kal_int8 TxPower;/*Q0*/
191 ValCl1tstTxSigTypeT TxSigType;
192} Cl1tstValRxTxPwrDetectMsgT;
193
194/** define Tx CDMA channel contorl message*/
195typedef struct
196{
197 LOCAL_PARA_HDR
198 Cl1tstValRxTxPwrDetectMsgT Msg;
199} cl1tst_val_rxtx_pwr_detect_msg_struct;
200
201typedef struct
202{
203 kal_uint8 RatType;
204 kal_bool MonitoringReq;
205} Cl1tstValGetAntInfoReqMsgT;
206
207/** define Tx CDMA channel contorl message*/
208typedef struct
209{
210 LOCAL_PARA_HDR
211 Cl1tstValGetAntInfoReqMsgT Msg;
212} cl1tst_val_get_ant_info_req_msg_struct;
213
214typedef struct
215{
216 kal_uint8 RatType;
217 kal_uint8 AntennaIndex;
218} Cl1tstTasMainPathSwitchInfoMsgT;
219
220/** define Tx CDMA channel contorl message*/
221typedef struct
222{
223 LOCAL_PARA_HDR
224 Cl1tstTasMainPathSwitchInfoMsgT Msg;
225} cl1tst_tas_main_path_switch_info_msg_struct;
226
227#ifdef __RF_SCAN_FOR_DESENSE_TEST__
228typedef struct
229{
230 kal_uint8 RatType;/*1xRTT or EVDO*/
231 kal_uint8 Band;
232 kal_uint16 Channel;
233 kal_bool TxOnFlag;
234 kal_int8 TxPower;/*Q0*/
235 kal_uint8 RepeatTimes;
236} Cl1tstValRxScanMsgT;
237
238/** define Tx CDMA channel contorl message*/
239typedef struct
240{
241 LOCAL_PARA_HDR
242 Cl1tstValRxScanMsgT Msg;
243} cl1tst_val_rx_scan_msg_struct;
244#endif
245
246#ifdef __EM_MAX_TX_POWER_SUPPORT__
247/*MSG_ID_CL1TST_VAL_MAX_TX_PWR_SET_MSG: define Max TxPower Adjust Offset set message : */
248typedef struct
249{
250 kal_uint8 Band;
251 kal_int16 MaxTxPwrOffset; /* Adjust Max TxPower for test*/
252} Cl1tstValMaxTxPwrSetMsgT;
253
254typedef struct
255{
256 LOCAL_PARA_HDR
257 Cl1tstValMaxTxPwrSetMsgT Msg;
258} cl1tst_val_max_tx_pwr_set_msg_struct;
259#endif
260
261#ifdef MTK_DEV_ENGINEER_MODE
262/**MSG_ID_CL1TST_RCP_TX_TRANSMIT_CTRL_MSG */
263typedef struct
264{
265 RfTstControlActionT Action;
266 kal_uint16 Channel;
267 kal_uint8 Band;
268 kal_int8 TxPower;/*Q0*/
269 Cl1TstTxSigTypeT TxSigType;
270} Cl1TstRcpRxTxTransmitCtrlMsgT;
271
272/** define Tx CDMA channel contorl message*/
273typedef struct
274{
275 LOCAL_PARA_HDR
276 Cl1TstRcpRxTxTransmitCtrlMsgT Msg;
277} cl1tst_rcp_tx_transmit_ctrl_msg_struct;
278#endif
279
280typedef struct
281{
282 kal_uint32 SetResult;
283} Cl1tstSetMobileIdRspT;
284
285typedef struct
286{
287 LOCAL_PARA_HDR
288 Cl1tstSetMobileIdRspT Msg;
289} cl1tst_set_mobile_id_rsp_msg_struct;
290
291typedef struct
292{
293 kal_uint64 Meid;
294 kal_uint32 Esn;
295} Cl1tstGetMobileIdRspT;
296
297typedef struct
298{
299 LOCAL_PARA_HDR
300 Cl1tstGetMobileIdRspT Msg;
301} cl1tst_get_mobile_id_rsp_msg_struct;
302
303#if (defined(MTK_PLT_ON_PC_IT))||(defined(MTK_C2K_L1_TST))
304
305typedef struct
306{
307 kal_bool result;/* 1->Pass, 0->Fail */
308}Cl1tstPhyUtTstRptT;
309
310typedef struct
311{
312 LOCAL_PARA_HDR
313 Cl1tstPhyUtTstRptT msg;
314} Cl1TstPhyutRptMsgStruct;
315#endif
316/*----------------------------------------------------------------------------
317 Global Typedefs
318----------------------------------------------------------------------------*/
319extern void Cl1TstRxTestModeSetCtrl(Cl1TstAntennaTestModeMsgT *MsgPtr);
320extern void Cl1TstValRxTxPwrDetect(Cl1tstValRxTxPwrDetectMsgT *MsgPtr);
321#ifdef __RF_SCAN_FOR_DESENSE_TEST__
322extern void Cl1TstValRxScan(Cl1tstValRxScanMsgT *MsgPtr);
323#endif
324#ifdef MTK_DEV_ENGINEER_MODE
325extern void Cl1tstRcpTxTransmitCtrl(Cl1TstRcpRxTxTransmitCtrlMsgT *MsgPtr);
326#endif
327extern void Cl1TstValGetAntInfoReq(Cl1tstValGetAntInfoReqMsgT *MsgPtr);
328extern void Cl1TstValGetAntInfoInd(Cl1tstTasMainPathSwitchInfoMsgT *MsgPtr);
329extern void Cl1TstFhcReportToFt(void);
330extern Cl1AntennaTestModeT Cl1TstGetAntennaTestMode(SysCdmaBandT CurrentBand);
331extern kal_bool Cl1TstDiversityOnlyTestCtrl(void);
332extern kal_bool Cl1TstMainOnlyTestCtrl(void);
333extern kal_bool IsTestModeValid(Cl1AntennaTestModeT AntTestMode);
334extern kal_bool Cl1TstRfIsDiversityCompiledIn(void);
335extern void Cl1TstEltIfTempRead(EltTstReadTempT *MsgPtr);
336#if (defined(MTK_PLT_ON_PC_IT))||(defined(MTK_C2K_L1_TST))
337extern void Cl1TstShPhyutReport(Cl1tstPhyUtTstRptT *MsgPtr);
338#endif
339extern kal_bool Cl1TstRxDiversityOnlyTestEnable(SysCdmaBandT CurrentBand);
340extern kal_bool Cl1TstRfCustRxDiversityEnable(SysCdmaBandT CurrentBand);
341
342extern void Cl1TstNstPowerUpProc(Cl1TstNstPowerUpCmdT *Ptr);
343extern void Cl1TstNstTchFerCfgProc(Cl1TstNstTchFerCfgCmdT *Ptr);
344extern void Cl1TstNstTxPwrMeasCfgProc(Cl1TstNstTxPwrMeasCfgCmdT *Ptr);
345extern void Cl1TstNstRxPwrMeasCfgProc(Cl1TstNstRxPwrMeasCfgCmdT *Ptr);
346extern void Cl1TstNstListSetCfgProc(Cl1TstNstListSetCfgCmdT *Ptr);
347extern void Cl1TstNstEnterTestModeProc(Cl1TstNstEnterTestModeCmdT *Ptr);
348extern void Cl1TstNstExitTestModeProc(Cl1TstNstExitTestModeCmdT *Ptr);
349
350extern void Cl1TstNstPowerUpCnfProcess(PswNstPowerupAckRspMsgT *MsgPtr);
351extern void Cl1TstNstTchFerCfgCnfProcess(PswNstTchFerCfgCnfMsgT *MsgPtr);
352extern void Cl1TstNstTxMeasCfgCnfProcess(PswNstTransmitTchAckMsgT *MsgPtr);
353extern void Cl1TstNstRxMeasCfgCnfProcess(PswNstRxPwrRespMsgT *MsgPtr);
354extern void Cl1TstNstListSetCfgCnfProcess(PswNstListSetRespMsgT *MsgPtr);
355
356extern void Cl1tstL4CEnterFacModeReqPro(msg_type msg_id);
357extern void Cl1tstL4CEnterNorModeReqPro(msg_type msg_id);
358extern void Cl1tstSetMobileIdRspPro(Cl1tstSetMobileIdRspT *Ptr);
359extern void Cl1tstGetMobileIdRspPro(Cl1tstGetMobileIdRspT *Ptr);
360
361extern void Cl1TstRxAntTestModeSetProc(Cl1TstRxAntTestModeSetCmdT *Ptr);
362#endif /* _CL1TST_L1PS_IF_H_ */
363