rf_txiq_run.cpp
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:21k
- /*****************************************************************************
- * 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).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * rf_txiq_run.cpp
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * RF BB TX IQ runtime source
- *
- * Author:
- * -------
- * Andy Ueng (mtk00490)
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * $Revision$
- * $Modtime$
- * $Log$
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- #include <IniFiles.hpp>
- #pragma hdrstop
- #ifndef _RF_COMMON_H_
- #include "rf_common.h"
- #endif
- #ifndef _RF_TXIQ_RUN_H_
- #include "rf_txiq_run.h"
- #endif
- #ifndef _MAN_ACTIVE_H_
- #include "man_active.h"
- #endif
- //===========================================================================
- static CRFTXIQRUN* g_txiq_run_ptr;
- static bool g_bIsRunning = false;
- //===========================================================================
- static void REQ_GetBBTxCfg(void)
- {
- g_txiq_run_ptr->REQ_GetBBTxCfg();
- }
- //------------------------------------------------------------------------------
- static void REQ_SetBBTxCfg(void)
- {
- g_txiq_run_ptr->REQ_SetBBTxCfg();
- }
- //------------------------------------------------------------------------------
- static void __stdcall CNF_BBTXCfg(const unsigned char cnf, const short token, void *usrData)
- {
- g_txiq_run_ptr->CNF_BBTXCfg(cnf, token, usrData);
- }
- //===========================================================================
- CRFTXIQRUN::CRFTXIQRUN(void)
- {
- g_bIsRunning = false;
- ConfirmCallback = NULL;
- }
- //---------------------------------------------------------------------------
- CRFTXIQRUN::~CRFTXIQRUN()
- {
- g_bIsRunning = false;
- ConfirmCallback = NULL;
- }
- //---------------------------------------------------------------------------
- void CRFTXIQRUN::REQ_Stop(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- META_Cancel_r(m_META_HANDLE_Obj.Get_MainHandle(), m_sRFID_TXIQRUN);
- META_CancelAllBlockingCall_r(m_META_HANDLE_Obj.Get_MainHandle());
- Confirm(METAAPP_STOP);
- g_bIsRunning = false;
- }
- //---------------------------------------------------------------------------
- void CRFTXIQRUN::Confirm(E_METAAPP_RESULT_T confirm_state)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- g_bIsRunning = false;
- if (NULL == ConfirmCallback)
- {
- return;
- }
- if (confirm_state != METAAPP_SUCCESS)
- {
- META_Cancel_r(m_META_HANDLE_Obj.Get_MainHandle(), m_sRFID_TXIQRUN);
- META_CancelAllBlockingCall_r(m_META_HANDLE_Obj.Get_MainHandle());
- }
- m_eConfirmState = confirm_state;
- ActiveMan->SetActiveFunction( ConfirmCallback );
- }
- //===========================================================================
- void CRFTXIQRUN::Compose_BBTXCfg(void)
- {
- if (m_eBbTxCfgVer >= BBTXCFG_VER4)
- {
- // offsetI
- if (m_sBbTxCfg.TxOffsetI > MAX_OFFSET_IQ_OLD)
- {
- m_sBbTxCfg.TxOffsetI = m_sBbTxCfg.TxOffsetI - (MAX_OFFSET_IQ_OLD + 1);
- m_sBbTxCfg.TxCoarseI = 1;
- }
- else if (m_sBbTxCfg.TxOffsetI < MIN_OFFSET_IQ_OLD)
- {
- m_sBbTxCfg.TxOffsetI = m_sBbTxCfg.TxOffsetI + (MAX_OFFSET_IQ_OLD + 1);
- m_sBbTxCfg.TxCoarseI = -1;
- }
- else
- {
- m_sBbTxCfg.TxCoarseI = 0;
- }
- // offsetQ
- if (m_sBbTxCfg.TxOffsetQ > MAX_OFFSET_IQ_OLD)
- {
- m_sBbTxCfg.TxOffsetQ = m_sBbTxCfg.TxOffsetQ - (MAX_OFFSET_IQ_OLD + 1);
- m_sBbTxCfg.TxCoarseQ = 1;
- }
- else if (m_sBbTxCfg.TxOffsetQ < MIN_OFFSET_IQ_OLD)
- {
- m_sBbTxCfg.TxOffsetQ = m_sBbTxCfg.TxOffsetQ + (MAX_OFFSET_IQ_OLD + 1);
- m_sBbTxCfg.TxCoarseQ = -1;
- }
- else
- {
- m_sBbTxCfg.TxCoarseQ = 0;
- }
- }
- else
- {
- m_sBbTxCfg.TxCoarseI = 0;
- m_sBbTxCfg.TxCoarseQ = 0;
- }
- }
- //---------------------------------------------------------------------------
- void CRFTXIQRUN::DeCompose_BBTXCfg(void)
- {
- if (m_eBbTxCfgVer >= BBTXCFG_VER4)
- {
- // TxOffsetI
- if (1 == m_sBbTxCfg.TxCoarseI)
- {
- m_sBbTxCfg.TxOffsetI += (MAX_OFFSET_IQ_OLD + 1);
- }
- else if (-1 == m_sBbTxCfg.TxCoarseI)
- {
- m_sBbTxCfg.TxOffsetI -= (MAX_OFFSET_IQ_OLD + 1);
- }
- // TxOffsetQ
- if (1 == m_sBbTxCfg.TxCoarseQ)
- {
- m_sBbTxCfg.TxOffsetQ += (MAX_OFFSET_IQ_OLD + 1);
- }
- else if (-1 == m_sBbTxCfg.TxCoarseQ)
- {
- m_sBbTxCfg.TxOffsetQ -= (MAX_OFFSET_IQ_OLD + 1);
- }
- }
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void CRFTXIQRUN::REQ_GetBBTxCfg_Start(E_BBTXCFG_VER_T bbtxcfg_ver)
- {
- g_txiq_run_ptr = this;
- g_bIsRunning = true;
- m_eBbTxCfgVer = bbtxcfg_ver;
- ActiveMan->SetActiveFunction(::REQ_GetBBTxCfg);
- }
- //---------------------------------------------------------------------------
- void CRFTXIQRUN::REQ_GetBBTxCfg(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- META_RESULT MetaResult;
- switch (m_eBbTxCfgVer)
- {
- case BBTXCFG_VER2:
- {
- RfBBTXCfg2 RFCnf_BBTXCFG2;
- MetaResult = META_Rf_GetBBTxCfg2_r(m_META_HANDLE_Obj.Get_MainHandle(), 5000, &RFCnf_BBTXCFG2);
- m_sBbTxCfg.TxTrimI = RFCnf_BBTXCFG2.TxTrimI;
- m_sBbTxCfg.TxTrimQ = RFCnf_BBTXCFG2.TxTrimQ;
- m_sBbTxCfg.TxOffsetI = RFCnf_BBTXCFG2.TxOffsetI;
- m_sBbTxCfg.TxOffsetQ = RFCnf_BBTXCFG2.TxOffsetQ;
- m_sBbTxCfg.TxCalbias = RFCnf_BBTXCFG2.TxCalbias;
- m_sBbTxCfg.TxIQSwap = RFCnf_BBTXCFG2.TxIQSwap;
- m_sBbTxCfg.TxCMV = RFCnf_BBTXCFG2.TxCMV;
- m_sBbTxCfg.TxGain = RFCnf_BBTXCFG2.TxGain;
- m_sBbTxCfg.TxCalrcsel = RFCnf_BBTXCFG2.TxCalrcsel;
- }
- break;
- case BBTXCFG_VER3:
- {
- RfBBTXCfg3 RFCnf_BBTXCFG3;
- MetaResult = META_Rf_GetBBTxCfg3_r(m_META_HANDLE_Obj.Get_MainHandle(), 5000, &RFCnf_BBTXCFG3);
- m_sBbTxCfg.TxTrimI = RFCnf_BBTXCFG3.TxTrimI;
- m_sBbTxCfg.TxTrimQ = RFCnf_BBTXCFG3.TxTrimQ;
- m_sBbTxCfg.TxOffsetI = RFCnf_BBTXCFG3.TxOffsetI;
- m_sBbTxCfg.TxOffsetQ = RFCnf_BBTXCFG3.TxOffsetQ;
- m_sBbTxCfg.TxCalbias = RFCnf_BBTXCFG3.TxCalbias;
- m_sBbTxCfg.TxIQSwap = RFCnf_BBTXCFG3.TxIQSwap;
- m_sBbTxCfg.TxCMV = RFCnf_BBTXCFG3.TxCMV;
- m_sBbTxCfg.TxGain = RFCnf_BBTXCFG3.TxGain;
- m_sBbTxCfg.TxCalrcsel = RFCnf_BBTXCFG3.TxCalrcsel;
- m_sBbTxCfg.TxPhasesel = RFCnf_BBTXCFG3.TxPhasesel;
- }
- break;
- case BBTXCFG_VER4:
- {
- MetaResult = META_Rf_GetBBTxCfg4_r(m_META_HANDLE_Obj.Get_MainHandle(), 5000, &m_sBbTxCfg);
- }
- break;
- case BBTXCFG_VER5:
- {
- MetaResult = META_Rf_GetBBTxCfg5_r(m_META_HANDLE_Obj.Get_MainHandle(), 5000, &m_sBbTxCfg);
- }
- break;
- }
- if (MetaResult != META_SUCCESS)
- {
- Confirm(METAAPP_FAIL);
- return;
- }
- DeCompose_BBTXCfg();
- Confirm(METAAPP_SUCCESS);
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void CRFTXIQRUN::REQ_SetBBTxCfg_Start(E_BBTXCFG_VER_T bbtxcfg_ver, RfBBTXCfg4 bbtx_cfg)
- {
- g_txiq_run_ptr = this;
- g_bIsRunning = true;
- m_eBbTxCfgVer = bbtxcfg_ver;
- m_sBbTxCfg = bbtx_cfg;
- ActiveMan->SetActiveFunction(::REQ_SetBBTxCfg);
- }
- //---------------------------------------------------------------------------
- void CRFTXIQRUN::REQ_SetBBTxCfg(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- META_RESULT MetaResult;
- Compose_BBTXCfg();
- switch (m_eBbTxCfgVer)
- {
- case BBTXCFG_VER1:
- {
- short RFID_BBTXCFG;
- RfSetBBTXCfg_Req RFReq_BBTXCFG;
- RFReq_BBTXCFG.TxTrimI = m_sBbTxCfg.TxTrimI;
- RFReq_BBTXCFG.TxTrimQ = m_sBbTxCfg.TxTrimQ;
- RFReq_BBTXCFG.TxOffsetI = m_sBbTxCfg.TxOffsetI;
- RFReq_BBTXCFG.TxOffsetQ = m_sBbTxCfg.TxOffsetQ;
- MetaResult = META_Rf_SetBBTXCfg_r(m_META_HANDLE_Obj.Get_MainHandle(), &RFReq_BBTXCFG, ::CNF_BBTXCfg, &RFID_BBTXCFG, NULL);
- }
- break;
- case BBTXCFG_VER2:
- {
- RfBBTXCfg2 RFReq_BBTXCFG2;
- RfBBTXCfg2 RFCnf_BBTXCFG2;
- RFReq_BBTXCFG2.TxTrimI = m_sBbTxCfg.TxTrimI;
- RFReq_BBTXCFG2.TxTrimQ = m_sBbTxCfg.TxTrimQ;
- RFReq_BBTXCFG2.TxOffsetI = m_sBbTxCfg.TxOffsetI;
- RFReq_BBTXCFG2.TxOffsetQ = m_sBbTxCfg.TxOffsetQ;
- RFReq_BBTXCFG2.TxCalbias = m_sBbTxCfg.TxCalbias;
- RFReq_BBTXCFG2.TxIQSwap = m_sBbTxCfg.TxIQSwap;
- RFReq_BBTXCFG2.TxCMV = m_sBbTxCfg.TxCMV;
- RFReq_BBTXCFG2.TxGain = m_sBbTxCfg.TxGain;
- RFReq_BBTXCFG2.TxCalrcsel = m_sBbTxCfg.TxCalrcsel;
- MetaResult = META_Rf_SetBBTxCfg2_r(m_META_HANDLE_Obj.Get_MainHandle(), 5000, &RFReq_BBTXCFG2, &RFCnf_BBTXCFG2);
- }
- break;
- case BBTXCFG_VER3:
- {
- RfBBTXCfg3 sBBTXCFG3;
- RfBBTXCfg3 sBBTXCFGCNF;
- sBBTXCFG3.TxTrimI = m_sBbTxCfg.TxTrimI;
- sBBTXCFG3.TxTrimQ = m_sBbTxCfg.TxTrimQ;
- sBBTXCFG3.TxOffsetI = m_sBbTxCfg.TxOffsetI;
- sBBTXCFG3.TxOffsetQ = m_sBbTxCfg.TxOffsetQ;
- sBBTXCFG3.TxCalbias = m_sBbTxCfg.TxCalbias;
- sBBTXCFG3.TxIQSwap = m_sBbTxCfg.TxIQSwap;
- sBBTXCFG3.TxCMV = m_sBbTxCfg.TxCMV;
- sBBTXCFG3.TxGain = m_sBbTxCfg.TxGain;
- sBBTXCFG3.TxCalrcsel = m_sBbTxCfg.TxCalrcsel;
- sBBTXCFG3.TxPhasesel = m_sBbTxCfg.TxPhasesel;
- MetaResult = META_Rf_SetBBTxCfg3_r(m_META_HANDLE_Obj.Get_MainHandle(), 5000, &sBBTXCFG3, &sBBTXCFGCNF);
- }
- break;
- case BBTXCFG_VER4:
- {
- RfBBTXCfg4 RFCnf_BBTXCFG4;
- MetaResult = META_Rf_SetBBTxCfg4_r(m_META_HANDLE_Obj.Get_MainHandle(), 5000, &m_sBbTxCfg, &RFCnf_BBTXCFG4);
- }
- break;
- case BBTXCFG_VER5:
- {
- RfBBTXCfg4 RFCnf_BBTXCFG4;
- MetaResult = META_Rf_SetBBTxCfg5_r(m_META_HANDLE_Obj.Get_MainHandle(), 5000, &m_sBbTxCfg, &RFCnf_BBTXCFG4);
- }
- break;
- }
- if (MetaResult != META_SUCCESS)
- {
- Confirm(METAAPP_FAIL);
- return;
- }
- if (m_eBbTxCfgVer != BBTXCFG_VER1)
- {
- Confirm(METAAPP_SUCCESS);
- }
- }
- //-------------------------------------
- void __stdcall CRFTXIQRUN::CNF_BBTXCfg(const unsigned char cnf, const short token, void *usrData)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- if (false == cnf)
- {
- Confirm(METAAPP_FAIL);
- return;
- }
- Confirm(METAAPP_SUCCESS);
- }
- //===========================================================================
- bool CRFTXIQRUN::REQ_Read_From_File(char *filename, E_BBTXCFG_VER_T bbtxcfg_ver)
- {
- TIniFile *ini_file;
- AnsiString as_Str;
- ini_file = new TIniFile(filename);
- if (NULL == ini_file)
- {
- return false;
- }
- as_Str = ini_file->ReadString("BB TX Run Time Parameters",
- "Trim I",
- 0
- );
- m_sBbTxCfg.TxTrimI = as_Str.ToInt();
- as_Str = ini_file->ReadString("BB TX Run Time Parameters",
- "Trim Q",
- 0
- );
- m_sBbTxCfg.TxTrimQ = as_Str.ToInt();
- as_Str = ini_file->ReadString("BB TX Run Time Parameters",
- "Offset I",
- 0
- );
- m_sBbTxCfg.TxOffsetI = as_Str.ToInt();
- as_Str = ini_file->ReadString("BB TX Run Time Parameters",
- "Offset Q",
- 0
- );
- m_sBbTxCfg.TxOffsetQ = as_Str.ToInt();
- as_Str = ini_file->ReadString("BB TX Run Time Parameters",
- "BB TX calbias",
- 0
- );
- m_sBbTxCfg.TxCalbias = as_Str.ToInt();
- as_Str = ini_file->ReadString("BB TX Run Time Parameters",
- "BB TX IQ swap",
- 0
- );
- m_sBbTxCfg.TxIQSwap = as_Str.ToInt();
- as_Str = ini_file->ReadString("BB TX Run Time Parameters",
- "BB TX common mode voltage",
- 0
- );
- m_sBbTxCfg.TxCMV = as_Str.ToInt();
- as_Str = ini_file->ReadString("BB TX Run Time Parameters",
- "BB TX gain",
- 0
- );
- m_sBbTxCfg.TxGain = as_Str.ToInt();
- as_Str = ini_file->ReadString("BB TX Run Time Parameters",
- "BB TX calrcsel",
- 0
- );
- m_sBbTxCfg.TxCalrcsel = as_Str.ToInt();
- if (bbtxcfg_ver >= BBTXCFG_VER3)
- {
- as_Str = ini_file->ReadString( "BB TX Run Time Parameters",
- "BB TX phasesel",
- 0
- );
- m_sBbTxCfg.TxPhasesel = as_Str.ToInt();
- }
- delete ini_file;
- return true;
- }
- //-------------------------------------------------------------------------
- bool CRFTXIQRUN::REQ_Write_To_File(char *filename, E_BBTXCFG_VER_T bbtxcfg_ver)
- {
- TIniFile *ini_file;
- ini_file = new TIniFile(filename);
- if (NULL == ini_file)
- {
- return false;
- }
- ini_file->WriteString("BB TX Run Time Parameters",
- "Trim I",
- IntToStr((int)m_sBbTxCfg.TxTrimI)
- );
- ini_file->WriteString("BB TX Run Time Parameters",
- "Trim Q",
- IntToStr((int)m_sBbTxCfg.TxTrimQ)
- );
- ini_file->WriteString("BB TX Run Time Parameters",
- "Offset I",
- IntToStr((int)m_sBbTxCfg.TxOffsetI)
- );
- ini_file->WriteString("BB TX Run Time Parameters",
- "Offset Q",
- IntToStr((int)m_sBbTxCfg.TxOffsetQ)
- );
- ini_file->WriteString("BB TX Run Time Parameters",
- "BB TX calbias",
- IntToStr((int)m_sBbTxCfg.TxCalbias)
- );
- ini_file->WriteString("BB TX Run Time Parameters",
- "BB TX IQ swap",
- IntToStr((int)m_sBbTxCfg.TxIQSwap)
- );
- ini_file->WriteString("BB TX Run Time Parameters",
- "BB TX common mode voltage",
- IntToStr((int)m_sBbTxCfg.TxCMV)
- );
- ini_file->WriteString("BB TX Run Time Parameters",
- "BB TX gain",
- IntToStr((int)m_sBbTxCfg.TxGain)
- );
- ini_file->WriteString("BB TX Run Time Parameters",
- "BB TX calrcsel",
- IntToStr((int) m_sBbTxCfg.TxCalrcsel)
- );
- if (bbtxcfg_ver >= BBTXCFG_VER3)
- {
- ini_file->WriteString("BB TX Run Time Parameters",
- "BB TX phasesel",
- IntToStr((int) m_sBbTxCfg.TxPhasesel)
- );
- }
- delete ini_file;
- return true;
- }
- //===========================================================================
- //////////////////////////////// Query ///////////////////////////////
- //===========================================================================
- E_BBTXCFG_VER_T CRFTXIQRUN::Query_BBTxCfgVer_Start(BBCHIP_TYPE bb_chip)
- {
- META_RESULT MetaResult;
- MetaResult = META_QueryIfFunctionSupportedByTarget_r(m_META_HANDLE_Obj.Get_MainHandle(), 300, "META_Rf_SetBBTxCfg3");
- if (META_SUCCESS == MetaResult)
- {
- return BBTXCFG_VER3;
- }
- MetaResult = META_QueryIfFunctionSupportedByTarget_r(m_META_HANDLE_Obj.Get_MainHandle(), 300, "META_Rf_SetBBTxCfg2");
- if (META_SUCCESS == MetaResult)
- {
- return BBTXCFG_VER2;
- }
-
- if ((bb_chip != MT6205) &&
- (bb_chip != MT6205B) &&
- (bb_chip != MT6218) &&
- (bb_chip != MT6218B) &&
- (bb_chip != MT6219) &&
- (bb_chip != MT6217) &&
- (bb_chip != MT6228) &&
- (bb_chip != MT6227) &&
- (bb_chip != MT6229) &&
- (bb_chip != MT6226) &&
- (bb_chip != MT6226M) &&
- (bb_chip != MT6230) &&
- (bb_chip != MT6225) &&
- (bb_chip != MT6268T) &&
- (bb_chip != MT6223) &&
- (bb_chip != MT6227D) &&
- (bb_chip != MT6226D) &&
- (bb_chip != MT6223P)
- )
- {
- MetaResult = META_QueryIfFunctionSupportedByTarget_r(m_META_HANDLE_Obj.Get_MainHandle(), 300, "META_Rf_SetBBTxCfg5");
- if (META_SUCCESS == MetaResult)
- {
- return BBTXCFG_VER5;
- }
- }
- MetaResult = META_QueryIfFunctionSupportedByTarget_r(m_META_HANDLE_Obj.Get_MainHandle(), 300, "META_Rf_SetBBTxCfg4");
- if (META_SUCCESS == MetaResult)
- {
- return BBTXCFG_VER4;
- }
- return BBTXCFG_VER1;
- }
- //===========================================================================
- //////////////////////////// export information ///////////////////////////
- //===========================================================================
- E_METAAPP_RESULT_T CRFTXIQRUN::Get_ConfirmState(void)
- {
- return m_eConfirmState;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- E_BBTXCFG_VER_T CRFTXIQRUN::Get_BbTxCfgVer(void)
- {
- return m_eBbTxCfgVer;
- }
- //---------------------------------------------------------------------------
- void CRFTXIQRUN::Set_BbTxCfgVer(E_BBTXCFG_VER_T bb_tx_cfg_ver)
- {
- m_eBbTxCfgVer = bb_tx_cfg_ver;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- RfBBTXCfg4* CRFTXIQRUN::Get_BbTxCfg(void)
- {
- return &m_sBbTxCfg;
- }
- //---------------------------------------------------------------------------
- void CRFTXIQRUN::Set_BbTxCfg(RfBBTXCfg4 bb_tx_cfg)
- {
- m_sBbTxCfg = bb_tx_cfg;
- }