UpdateParameter.cpp
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:41k
- /*****************************************************************************
- * 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:
- * ---------
- * UpdateParameter.cpp
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * RF and ADC calibration parameter update 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!!
- *============================================================================
- ****************************************************************************/
- //---------------------------------------------------------------------------
- #pragma hdrstop
- // man
- #include "man_active.h"
- #include "man_fdm.h"
- #ifndef _WIFI_APC_H_
- #include "wifi_apc.h"
- #endif
- #ifndef _UPDATEPARAMETER_H
- #include "UpdateParameter.h"
- #endif
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- //---------------------------------------------------------------------------
- static CUPDATEPARAMETER* update_parameter_ptr;
- static bool g_bIsRunning = false;
- //----------------------------------------------------------------------------
- static void CNF_ReadAGCFromNVRAM(void)
- {
- update_parameter_ptr->CNF_ReadAGCFromNVRAM();
- }
- //---------------------------------------------------------------------------
- static void CNF_WriteAGCToNVRAM(void)
- {
- update_parameter_ptr->CNF_WriteAGCToNVRAM();
- }
- //----------------------------------------------------------------------------
- static void CNF_ReadAFCFromNVRAM(void)
- {
- update_parameter_ptr->CNF_ReadAFCFromNVRAM();
- }
- //---------------------------------------------------------------------------
- static void CNF_WriteAFCToNVRAM(void)
- {
- update_parameter_ptr->CNF_WriteAFCToNVRAM();
- }
- //----------------------------------------------------------------------------
- static void CNF_ReadCrystalAFCFromNVRAM(void)
- {
- update_parameter_ptr->CNF_ReadCrystalAFCFromNVRAM();
- }
- //---------------------------------------------------------------------------
- static void CNF_WriteCrystalAFCToNVRAM(void)
- {
- update_parameter_ptr->CNF_WriteCrystalAFCToNVRAM();
- }
- //----------------------------------------------------------------------------
- static void CNF_ReadIP2FromNVRAM(void)
- {
- update_parameter_ptr->CNF_ReadIP2FromNVRAM();
- }
- //---------------------------------------------------------------------------
- static void CNF_WriteIP2ToNVRAM(void)
- {
- update_parameter_ptr->CNF_WriteIP2ToNVRAM();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_ReadTxIqFromNVRAM(void)
- {
- update_parameter_ptr->CNF_ReadTxIqFromNVRAM();
- }
- //---------------------------------------------------------------------------
- static void CNF_WriteTxIqToNVRAM(void)
- {
- update_parameter_ptr->CNF_WriteTxIqToNVRAM();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_ReadGmskAPCFromNVRAM(void)
- {
- update_parameter_ptr->CNF_ReadGmskAPCFromNVRAM();
- }
- //----------------------------------------------------------------------------
- static void CNF_ReadEpskAPCFromNVRAM( void )
- {
- update_parameter_ptr->CNF_ReadEpskAPCFromNVRAM();
- }
- //---------------------------------------------------------------------------
- static void CNF_WriteGmskAPCToNVRAM( void )
- {
- update_parameter_ptr->CNF_WriteGmskAPCToNVRAM( );
- }
- //---------------------------------------------------------------------------
- static void CNF_WriteEpskAPCToNVRAM( void )
- {
- update_parameter_ptr->CNF_WriteEpskAPCToNVRAM( );
- }
- //----------------------------------------------------------------------------
- static void CNF_ReadADCFromNVRAM( void )
- {
- update_parameter_ptr->CNF_ReadADCFromNVRAM();
- }
- //----------------------------------------------------------------------------
- static void CNF_WriteADCToNVRAM( void )
- {
- update_parameter_ptr->CNF_WriteADCToNVRAM( );
- }
- //----------------------------------------------------------------------------
- static void CNF_ReadWiFiTxDcOffsetFromNVRAM( void )
- {
- update_parameter_ptr->CNF_ReadWiFiTxDcOffsetFromNVRAM();
- }
- //----------------------------------------------------------------------------
- static void CNF_WriteWiFiTxDcOffsetToNVRAM( void )
- {
- update_parameter_ptr->CNF_WriteWiFiTxDcOffsetToNVRAM( );
- }
- //----------------------------------------------------------------------------
- static void CNF_ReadWiFiTxPowerFromNVRAM( void )
- {
- update_parameter_ptr->CNF_ReadWiFiTxPowerFromNVRAM();
- }
- //----------------------------------------------------------------------------
- static void CNF_WriteWiFiTxPowerToNVRAM( void )
- {
- update_parameter_ptr->CNF_WriteWiFiTxPowerToNVRAM( );
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_ReadWiFiAlcFromNVRAM(void)
- {
- update_parameter_ptr->CNF_ReadWiFiAlcFromNVRAM();
- }
- //----------------------------------------------------------------------------
- static void CNF_WriteWiFiAlcToNVRAM(void)
- {
- update_parameter_ptr->CNF_WriteWiFiAlcToNVRAM();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_ReadBtCapIdFromNVRAM(void)
- {
- update_parameter_ptr->CNF_ReadBtCapIdFromNVRAM();
- }
- //----------------------------------------------------------------------------
- static void CNF_WriteBtCapIdToNVRAM(void)
- {
- update_parameter_ptr->CNF_WriteBtCapIdToNVRAM();
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- static void CNF_ReadIMEIFromNVRAM( void )
- {
- update_parameter_ptr->CNF_ReadIMEIFromNVRAM();
- }
- //----------------------------------------------------------------------------
- static void CNF_WriteIMEIToNVRAM( void )
- {
- update_parameter_ptr->CNF_WriteIMEIToNVRAM( );
- }
- //----------------------------------------------------------------------------
- static void CNF_ReadBarcodeFromNVRAM( void )
- {
- update_parameter_ptr->CNF_ReadBarcodeFromNVRAM();
- }
- //----------------------------------------------------------------------------
- static void CNF_WriteBarcodeToNVRAM( void )
- {
- update_parameter_ptr->CNF_WriteBarcodeToNVRAM( );
- }
- //----------------------------------------------------------------------------
- static void REQ_TimeOut( void )
- { update_parameter_ptr->REQ_TimeOut();
- }
- //----------------------------------------------------------------------------
- static void REQ_Finish( void )
- { update_parameter_ptr->REQ_Finish();
- }
- //===========================================================================
- CUPDATEPARAMETER::CUPDATEPARAMETER(void)
- {
- m_rf_afc_ptr = new CRFAFC();
- m_rf_crystal_afc_ptr = new CCRYSTALAFC();
- m_rf_ip2_ptr = new CRFPM();
- m_rf_txiq_ptr = new CRFTXIQ();
- m_rf_agc_ptr = new CRFAGC();
- m_rf_apc_ptr = new CRFAPC();
- m_rf_epsk_apc_ptr = new CRFAPC8PSK();
- m_bb_adc_ptr = new CBBADC();
- m_wifi_txdc_ptr = new CWIFITXDC();
- m_wifi_apc_ptr = new CWIFIAPC();
- m_wifi_alc_ptr = new CWIFIALC();
- m_bt_info6601_ptr = new CBTINFO6601();
- m_bt_info6611_ptr = new CBTINFO6611();
- MF_imei_ptr = new CIMEIDOWNLOAD();
- m_barcode_ptr = new CBARCODE();
-
- update_parameter_ptr = this;
- m_bCrystal_AFC_trigger = false;
- g_bIsRunning = false;
- }
- //---------------------------------------------------------------------------
- CUPDATEPARAMETER::~CUPDATEPARAMETER( )
- {
- if(m_rf_afc_ptr)
- {
- delete m_rf_afc_ptr;
- m_rf_afc_ptr = NULL;
- }
- if(m_rf_crystal_afc_ptr)
- {
- delete m_rf_crystal_afc_ptr;
- m_rf_crystal_afc_ptr = NULL;
- }
- if(m_rf_agc_ptr)
- {
- delete m_rf_agc_ptr;
- m_rf_agc_ptr = NULL;
- }
- if( m_rf_ip2_ptr )
- {
- delete m_rf_ip2_ptr;
- m_rf_ip2_ptr = NULL;
- }
- if( m_rf_txiq_ptr )
- {
- delete m_rf_txiq_ptr;
- m_rf_txiq_ptr = NULL;
- }
- if(m_rf_apc_ptr)
- {
- delete m_rf_apc_ptr;
- m_rf_apc_ptr = NULL;
- }
- if(m_rf_epsk_apc_ptr)
- {
- delete m_rf_epsk_apc_ptr;
- m_rf_epsk_apc_ptr = NULL;
- }
- if(m_bb_adc_ptr)
- {
- delete m_bb_adc_ptr;
- m_bb_adc_ptr = NULL;
- }
- if( m_wifi_txdc_ptr )
- {
- delete m_wifi_txdc_ptr;
- m_wifi_txdc_ptr = NULL;
- }
-
- if (m_wifi_apc_ptr)
- {
- delete m_wifi_apc_ptr;
- m_wifi_apc_ptr = NULL;
- }
- if (m_wifi_alc_ptr)
- {
- delete m_wifi_alc_ptr;
- m_wifi_alc_ptr = NULL;
- }
- if (m_bt_info6601_ptr)
- {
- delete m_bt_info6601_ptr;
- m_bt_info6601_ptr = NULL;
- }
- if (m_bt_info6611_ptr)
- {
- delete m_bt_info6611_ptr;
- m_bt_info6611_ptr = NULL;
- }
- if (MF_imei_ptr)
- {
- delete MF_imei_ptr;
- MF_imei_ptr = NULL;
- }
- if(m_barcode_ptr)
- {
- delete m_barcode_ptr;
- m_barcode_ptr = NULL;
- }
-
- }
- //==========================================================================================
- void CUPDATEPARAMETER::Confirm(E_METAAPP_RESULT_T confirm_state)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- g_bIsRunning = false;
- if (NULL == ConfirmCallback)
- {
- return;
- }
- m_eConfirmState = confirm_state;
- ActiveMan->SetActiveFunction(ConfirmCallback);
- }
- //==============================================================================
- void CUPDATEPARAMETER::REQ_TimeOut(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- Confirm(METAAPP_TIMEOUT);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Finish(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
-
- Confirm(METAAPP_SUCCESS);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_AGC_From_NVRAM(void)
- {
- g_bIsRunning = true;
- m_rf_agc_ptr->ConfirmCallback = ::CNF_ReadAGCFromNVRAM;
- m_rf_agc_ptr->REQ_Read_From_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadAGCFromNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_agc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_AFC_From_NVRAM(void)
- {
- g_bIsRunning = true;
- m_rf_afc_ptr->ConfirmCallback = ::CNF_ReadAFCFromNVRAM;
- m_rf_afc_ptr->REQ_Read_From_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadAFCFromNVRAM( void )
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_afc_ptr->Get_ConfirmState();
- if (METAAPP_SUCCESS == state)
- {
- if( ! m_bCrystal_AFC_trigger )
- {
- Confirm( METAAPP_SUCCESS );
- }
- else // crystal
- {
- m_bCrystal_AFC_trigger = false;
- m_rf_crystal_afc_ptr->ConfirmCallback = ::CNF_ReadCrystalAFCFromNVRAM;
- m_rf_crystal_afc_ptr->REQ_Read_CAPID_From_NVRAM_Start();
- }
- }
- else
- {
- Confirm(state);
- }
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_Crystal_AFC_From_NVRAM(void)
- {
- g_bIsRunning = true;
- m_bCrystal_AFC_trigger = true;
- m_rf_afc_ptr->ConfirmCallback = ::CNF_ReadAFCFromNVRAM;
- m_rf_afc_ptr->REQ_Read_From_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadCrystalAFCFromNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_crystal_afc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_IP2_From_NVRAM(unsigned int rfmod_id)
- {
- g_bIsRunning = true;
- m_rf_ip2_ptr->ConfirmCallback = ::CNF_ReadIP2FromNVRAM;
- m_rf_ip2_ptr->REQ_Read_IP2Reg_From_NVRAM_Start(rfmod_id);
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadIP2FromNVRAM(void)
- {
- if(!g_bIsRunning) return;
- E_METAAPP_RESULT_T state = m_rf_ip2_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_TxIq_From_NVRAM(unsigned int rfmod_id, E_BBTXCFG_VER_T bbtxcfg_ver)
- {
- g_bIsRunning = true;
- m_rf_txiq_ptr->ConfirmCallback = ::CNF_ReadTxIqFromNVRAM;
- m_rf_txiq_ptr->REQ_Read_From_NVRAM_Start(rfmod_id, bbtxcfg_ver);
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadTxIqFromNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_txiq_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_GMSK_APC_From_NVRAM(unsigned int rf_id, bool b_tado_support)
- {
- g_bIsRunning = true;
- m_rf_apc_ptr->ConfirmCallback = ::CNF_ReadGmskAPCFromNVRAM;
- m_rf_apc_ptr->REQ_Read_APC_From_NVRAM_Start(rf_id, b_tado_support);
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadGmskAPCFromNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_apc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_EPSK_APC_From_NVRAM(unsigned int rf_id)
- {
- g_bIsRunning = true;
- m_rf_epsk_apc_ptr->ConfirmCallback = ::CNF_ReadEpskAPCFromNVRAM;
- m_rf_epsk_apc_ptr->REQ_Read_APC_From_NVRAM_Start(rf_id);
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadEpskAPCFromNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_epsk_apc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_ADC_From_NVRAM(void)
- {
- g_bIsRunning = true;
- m_bb_adc_ptr->ConfirmCallback = ::CNF_ReadADCFromNVRAM;
- m_bb_adc_ptr->REQ_Read_From_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadADCFromNVRAM(void)
- {
- if(!g_bIsRunning) return;
- E_METAAPP_RESULT_T state = m_bb_adc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_WiFiTxDcOffset_From_NVRAM(void)
- {
- g_bIsRunning = true;
- m_wifi_txdc_ptr->ConfirmCallback = ::CNF_ReadWiFiTxDcOffsetFromNVRAM;
- m_wifi_txdc_ptr->REQ_Read_From_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadWiFiTxDcOffsetFromNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_wifi_txdc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_WiFiTxPower_From_NVRAM(void)
- {
- g_bIsRunning = true;
- m_wifi_apc_ptr->ConfirmCallback = ::CNF_ReadWiFiTxPowerFromNVRAM;
- m_wifi_apc_ptr->REQ_Read_TxPower2400M_From_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadWiFiTxPowerFromNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_wifi_apc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void CUPDATEPARAMETER::REQ_Read_WiFiAlc_From_NVRAM(void)
- {
- g_bIsRunning = true;
- m_wifi_alc_ptr->ConfirmCallback = ::CNF_ReadWiFiAlcFromNVRAM;
- m_wifi_alc_ptr->REQ_Read_From_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadWiFiAlcFromNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_wifi_alc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void CUPDATEPARAMETER::REQ_Read_BtCapId_From_NVRAM(void)
- {
- g_bIsRunning = true;
- m_bt_info6601_ptr->ConfirmCallback = ::CNF_ReadBtCapIdFromNVRAM;
- m_bt_info6601_ptr->REQ_Read_From_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadBtCapIdFromNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_bt_info6601_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_IMEI_From_NVRAM(void)
- {
- g_bIsRunning = true;
- MF_imei_ptr->ConfirmCallback = ::CNF_ReadIMEIFromNVRAM;
- MF_imei_ptr->REQ_Read_From_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadIMEIFromNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = MF_imei_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Read_Barcode_From_NVRAM(void)
- {
- g_bIsRunning = true;
- m_barcode_ptr->ConfirmCallback = ::CNF_ReadBarcodeFromNVRAM;
- m_barcode_ptr->REQ_Read_From_NVRAM();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_ReadBarcodeFromNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_barcode_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_AGC_To_NVRAM(void)
- {
- g_bIsRunning = true;
- m_rf_agc_ptr->ConfirmCallback = ::CNF_WriteAGCToNVRAM;
- m_rf_agc_ptr->REQ_Write_To_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteAGCToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_agc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_AFC_To_NVRAM(void)
- {
- g_bIsRunning = true;
- m_rf_afc_ptr->ConfirmCallback = ::CNF_WriteAFCToNVRAM;
- m_rf_afc_ptr->REQ_Write_To_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteAFCToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_afc_ptr->Get_ConfirmState();
- if (METAAPP_SUCCESS == state)
- {
- if( ! m_bCrystal_AFC_trigger )
- {
- ActiveMan->SetActiveFunction( ::REQ_Finish );
- }
- else
- {
- m_bCrystal_AFC_trigger = false;
- m_rf_crystal_afc_ptr->ConfirmCallback = ::CNF_WriteCrystalAFCToNVRAM;
- m_rf_crystal_afc_ptr->REQ_Write_CAPID_To_NVRAM_Start();
- }
- }
- else
- { Confirm(state);
- }
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_Crystal_AFC_To_NVRAM(void)
- {
- g_bIsRunning = true;
- m_bCrystal_AFC_trigger = true;
- m_rf_afc_ptr->ConfirmCallback = ::CNF_WriteAFCToNVRAM;
- m_rf_afc_ptr->REQ_Write_To_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteCrystalAFCToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_crystal_afc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_IP2_To_NVRAM(unsigned int rfmod_id)
- {
- g_bIsRunning = true;
- m_rf_ip2_ptr->ConfirmCallback = ::CNF_WriteIP2ToNVRAM;
- m_rf_ip2_ptr->REQ_Write_IP2Reg_To_NVRAM_Start(rfmod_id);
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteIP2ToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_ip2_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_TxIq_To_NVRAM(unsigned int rfmod_id, E_BBTXCFG_VER_T bbtxcfg_ver)
- {
- g_bIsRunning = true;
- m_rf_txiq_ptr->ConfirmCallback = ::CNF_WriteTxIqToNVRAM;
- m_rf_txiq_ptr->REQ_Write_To_NVRAM_Start(rfmod_id, bbtxcfg_ver);
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteTxIqToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_txiq_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_GMSK_APC_To_NVRAM(unsigned int rf_id, bool b_tado_support)
- {
- g_bIsRunning = true;
- m_rf_apc_ptr->ConfirmCallback = ::CNF_WriteGmskAPCToNVRAM;
- m_rf_apc_ptr->REQ_Write_APC_To_NVRAM_Start(rf_id, b_tado_support);
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteGmskAPCToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_apc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_EPSK_APC_To_NVRAM(unsigned int rf_id)
- {
- g_bIsRunning = true;
- m_rf_epsk_apc_ptr->ConfirmCallback = ::CNF_WriteEpskAPCToNVRAM;
- m_rf_epsk_apc_ptr->REQ_Write_APC_To_NVRAM_Start(rf_id);
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteEpskAPCToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_rf_epsk_apc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_ADC_To_NVRAM(void)
- {
- g_bIsRunning = true;
- m_bb_adc_ptr->ConfirmCallback = ::CNF_WriteADCToNVRAM;
- m_bb_adc_ptr->REQ_Write_To_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteADCToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_bb_adc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_WiFiTxDcOffset_To_NVRAM(void)
- {
- g_bIsRunning = true;
- m_wifi_txdc_ptr->ConfirmCallback = ::CNF_WriteWiFiTxDcOffsetToNVRAM;
- m_wifi_txdc_ptr->REQ_Write_To_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteWiFiTxDcOffsetToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_wifi_txdc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void CUPDATEPARAMETER::REQ_Write_BtCapId_To_NVRAM(void)
- {
- g_bIsRunning = true;
- m_bt_info6601_ptr->ConfirmCallback = ::CNF_WriteBtCapIdToNVRAM;
- m_bt_info6601_ptr->REQ_Write_To_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteBtCapIdToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_bt_info6601_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_WiFiTxPower_To_NVRAM(void)
- {
- g_bIsRunning = true;
- m_wifi_apc_ptr->ConfirmCallback = ::CNF_WriteWiFiTxPowerToNVRAM;
- m_wifi_apc_ptr->REQ_Write_TxPower2400M_To_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteWiFiTxPowerToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_wifi_apc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_WiFiAlc_To_NVRAM(void)
- {
- g_bIsRunning = true;
- m_wifi_alc_ptr->ConfirmCallback = ::CNF_WriteWiFiAlcToNVRAM;
- m_wifi_alc_ptr->REQ_Write_To_NVRAM_Start();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteWiFiAlcToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_wifi_alc_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_IMEI_To_NVRAM(bool check_checksum)
- {
- g_bIsRunning = true;
- MF_imei_ptr->ConfirmCallback = ::CNF_WriteIMEIToNVRAM;
- MF_imei_ptr->REQ_Write_To_NVRAM_Start(check_checksum);
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteIMEIToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = MF_imei_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- void CUPDATEPARAMETER::REQ_Write_Barcode_To_NVRAM(void)
- {
- g_bIsRunning = true;
- m_barcode_ptr->ConfirmCallback = ::CNF_WriteBarcodeToNVRAM;
- m_barcode_ptr->REQ_Write_To_NVRAM();
- }
- //-------------------------------------
- void CUPDATEPARAMETER::CNF_WriteBarcodeToNVRAM(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- E_METAAPP_RESULT_T state = m_barcode_ptr->Get_ConfirmState();
- Confirm(state);
- }
- //===========================================================================
- bool CUPDATEPARAMETER::AnyRxLossSectionExist(char *filename)
- {
- bool ok = m_rf_agc_ptr->AnyRxLossSectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_AGC_From_File( char *filename )
- {
- bool ok = m_rf_agc_ptr->REQ_Read_From_File(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_AGC_To_File( char *filename )
- {
- bool ok = m_rf_agc_ptr->REQ_Write_To_File(filename);
- if( !ok ) return false;
- return true;
- }
- //===========================================================================
- bool CUPDATEPARAMETER::AfcSectionExist( char *filename )
- {
- bool ok = m_rf_afc_ptr->AfcSectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_AFC_From_File( char *filename )
- {
- bool ok = m_rf_afc_ptr->REQ_Read_From_File(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_AFC_To_File( char *filename )
- {
- bool ok = m_rf_afc_ptr->REQ_Write_To_File(filename);
- if( !ok ) return false;
- return true;
- }
- //===========================================================================
- bool CUPDATEPARAMETER::CrystalAfcSectionExist( char *filename )
- {
- bool ok = m_rf_crystal_afc_ptr->CrystalAfcSectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_Crystal_AFC_From_File( char *filename )
- {
- bool ok = m_rf_afc_ptr->REQ_Read_From_File(filename);
- if( !ok ) return false;
- ok = m_rf_crystal_afc_ptr->REQ_Read_CAPID_From_File(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_Crystal_AFC_To_File( char *filename )
- {
- bool ok = m_rf_afc_ptr->REQ_Write_To_File(filename);
- if( !ok ) return false;
- ok = m_rf_crystal_afc_ptr->REQ_Write_CAPID_To_File(filename);
- if( !ok ) return false;
- return true;
- }
- //===========================================================================
- bool CUPDATEPARAMETER::AnyIP2SectionExist( char *filename )
- {
- bool ok = m_rf_ip2_ptr->AnyIP2SectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //----------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_IP2_From_File( char *filename, unsigned int rfmod_id )
- {
- bool ok = m_rf_ip2_ptr->REQ_Read_IP2Reg_From_File(filename, rfmod_id );
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_IP2_To_File( char *filename, unsigned int rfmod_id )
- {
- bool ok = m_rf_ip2_ptr->REQ_Write_IP2Reg_To_File( filename, rfmod_id );
- if( !ok ) return false;
- return true;
- }
- //===========================================================================
- bool CUPDATEPARAMETER::TxIqSectionExist( char *filename )
- {
- bool ok = m_rf_txiq_ptr->TxIqSectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //----------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_TxIq_From_File( char *filename, unsigned int rfmod_id, E_BBTXCFG_VER_T bbtxcfg_ver)
- {
- bool ok = m_rf_txiq_ptr->REQ_Read_From_File(filename, rfmod_id, bbtxcfg_ver);
- return ok;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_TxIq_To_File(char *filename, unsigned int rfmod_id, E_BBTXCFG_VER_T bbtxcfg_ver)
- {
- bool ok = m_rf_txiq_ptr->REQ_Write_To_File(filename, rfmod_id, bbtxcfg_ver);
- return ok;
- }
- //===========================================================================
- bool CUPDATEPARAMETER::AnyGmskApcSectionExist( char *filename )
- {
- bool ok = m_rf_apc_ptr->AnyApcSectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_GMSK_APC_From_File(char *filename, unsigned int rf_id, bool b_tado_support)
- {
- bool ok = m_rf_apc_ptr->REQ_Read_APC_From_File(filename, rf_id, b_tado_support);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_GMSK_APC_To_File(char *filename, unsigned int rf_id, bool b_tado_support)
- {
- bool ok = m_rf_apc_ptr->REQ_Write_APC_To_File(filename, rf_id, b_tado_support);
- if( !ok ) return false;
- return true;
- }
- //===========================================================================
- bool CUPDATEPARAMETER::AnyEpskApcSectionExist( char *filename )
- {
- bool ok = m_rf_epsk_apc_ptr->AnyApcSectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_EPSK_APC_From_File(char *filename, unsigned int rf_id)
- {
- bool ok = m_rf_epsk_apc_ptr->REQ_Read_APC_From_File(filename, rf_id);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_EPSK_APC_To_File(char *filename, unsigned int rf_id)
- {
- bool ok = m_rf_epsk_apc_ptr->REQ_Write_APC_To_File(filename, rf_id);
- if (! ok) return false;
- return true;
- }
- //===========================================================================
- bool CUPDATEPARAMETER::AdcSectionExist( char *filename )
- {
- bool ok = m_bb_adc_ptr->AdcSectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_ADC_From_File( char *filename )
- {
- bool ok = m_bb_adc_ptr->REQ_Read_From_File(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_ADC_To_File( char *filename )
- {
- bool ok = m_bb_adc_ptr->REQ_Write_To_File(filename);
- if( !ok ) return false;
- return true;
- }
- //===========================================================================
- // WiFi TX DC offset
- bool CUPDATEPARAMETER::WiFiTxDcOffsetSectionExist( char *filename )
- {
- bool ok = m_wifi_txdc_ptr->WiFiTxDcOffsetSectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_WiFiTxDcOffset_From_File( char *filename )
- {
- bool ok = m_wifi_txdc_ptr->REQ_Read_From_File(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_WiFiTxDcOffset_To_File( char *filename )
- {
- bool ok = m_wifi_txdc_ptr->REQ_Write_To_File(filename);
- if( !ok ) return false;
- return true;
- }
- //===========================================================================
- // WiFi TX power
- bool CUPDATEPARAMETER::WiFiTxPowerSectionExist( char *filename )
- {
- bool ok = m_wifi_apc_ptr->WiFiTxPower2400MSectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_WiFiTxPower_From_File( char *filename )
- {
- bool ok = m_wifi_apc_ptr->REQ_Read_TxPower2400M_From_File(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_WiFiTxPower_To_File( char *filename )
- {
- bool ok = m_wifi_apc_ptr->REQ_Write_TxPower2400M_To_File(filename);
- if( !ok ) return false;
- return true;
- }
- //===========================================================================
- // WiFi ALC
- bool CUPDATEPARAMETER::WiFiAlcSectionExist(char *filename)
- {
- if (!m_wifi_alc_ptr->WiFiAlc2400MSectionExist(filename))
- {
- return false;
- }
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_WiFiAlc_From_File(char *filename)
- {
- if (!m_wifi_alc_ptr->REQ_Read_From_File(filename))
- {
- return false;
- }
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_WiFiAlc_To_File(char *filename)
- {
- if (!m_wifi_alc_ptr->REQ_Write_To_File(filename))
- {
- return false;
- }
- return true;
- }
- //===========================================================================
- // BT CAP ID
- bool CUPDATEPARAMETER::BtCapIdSectionExist(char *filename)
- {
- if (!m_bt_info6601_ptr->BtCapIdSectionExist(filename))
- {
- return false;
- }
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_BtCapId_From_File(char *filename)
- {
- if (!m_bt_info6601_ptr->REQ_Read_From_File(filename))
- {
- return false;
- }
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_BtCapId_To_File(char *filename)
- {
- if (!m_bt_info6601_ptr->REQ_Write_To_File(filename))
- {
- return false;
- }
- return true;
- }
- //===========================================================================
- bool CUPDATEPARAMETER::ImeiSectionExist( char *filename )
- {
- bool ok = MF_imei_ptr->ImeiSectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_IMEI_From_File( char *filename )
- {
- bool ok = MF_imei_ptr->REQ_Read_From_File(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_IMEI_To_File( char *filename )
- {
- bool ok = MF_imei_ptr->REQ_Write_To_File(filename);
- if( !ok ) return false;
- return true;
- }
- //===========================================================================
- bool CUPDATEPARAMETER::BarcodeSectionExist( char *filename )
- {
- bool ok = m_barcode_ptr->BarcodeSectionExist(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Read_Barcode_From_File( char *filename )
- {
- bool ok = m_barcode_ptr->REQ_Read_From_File(filename);
- if( !ok ) return false;
- return true;
- }
- //---------------------------------------------------------------------------
- bool CUPDATEPARAMETER::REQ_Write_Barcode_To_File( char *filename )
- {
- bool ok = m_barcode_ptr->REQ_Write_To_File(filename);
- if( !ok ) return false;
- return true;
- }
- //==============================================================================
- //===========================================================================
- ///////////////////////////// Query ///////////////////////////
- //===========================================================================
- bool CUPDATEPARAMETER::REQ_Query_ALC_Suppport_Start(void)
- {
- bool support = m_wifi_alc_ptr->REQ_Query_ALC_Suppport_Start();
- return support;
- }
- //===========================================================================
- //////////////////////////// Global information ///////////////////////////
- //===========================================================================
- E_METAAPP_RESULT_T CUPDATEPARAMETER::Get_ConfirmState(void)
- {
- return m_eConfirmState;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- //IMEISV_struct_T CUPDATEPARAMETER::Get_IMEISV( void )
- //{
- // return MF_imei_ptr->IMEISV;
- //}
- //---------------------------------------------------------------------------
- //void CUPDATEPARAMETER::Set_IMEISV( IMEISV_struct_T imeisv)
- //{
- // MF_imei_ptr->IMEISV = imeisv;
- //}
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- //char* CUPDATEPARAMETER::Get_IMEI( void )
- //{
- // return MF_imei_ptr->IMEISV.imei;
- //}
- //---------------------------------------------------------------------------
- //void CUPDATEPARAMETER::Set_IMEI( char* imei )
- //{
- // strcpy( MF_imei_ptr->IMEISV.imei, imei );
- //}