UpdateParameter.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:11k
- /*****************************************************************************
- * 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.h
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * RF and ADC calibration parameter update header
- *
- * 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!!
- *============================================================================
- ****************************************************************************/
- //---------------------------------------------------------------------------
- #ifndef _UPDATEPARAMETER_H_
- #define _UPDATEPARAMETER_H_
- // common
- #ifndef _METAAPP_COMMON_H_
- #include "metaapp_common.h"
- #endif
- #ifndef META_DLL_H
- #include "meta.h"
- #endif
- #ifndef _MAN_HANDLE_H_
- #include "man_handle.h"
- #endif
- // RF
- #ifndef _RF_AFC_H_
- #include "rf_afc.h"
- #endif
- #ifndef _CRYSTAL_AFC_H_
- #include "crystal_afc.h"
- #endif
- #ifndef _RF_AGC_H_
- #include "rf_agc.h"
- #endif
- #ifndef _RF_PM_H_
- #include "rf_pm.h"
- #endif
- #ifndef _RF_TXIQ_H_
- #include "rf_txiq.h"
- #endif
- #ifndef _RF_APC_H_
- #include "rf_apc.h"
- #endif
- #include "rf_apc_8psk.h"
- // baseband
- #ifndef _BB_ADC_H_
- #include "bb_adc.h"
- #endif
- // WiFi
- #ifndef _WIFI_TXDC_H_
- #include "wifi_txdc.h"
- #endif
- #ifndef _WIFI_APC_H_
- #include "wifi_apc.h"
- #endif
- #ifndef _WIFI_ALC_H_
- #include "wifi_alc.h"
- #endif
- // BT
- #ifndef _BT_INFO_MT6601_H_
- #include "bt_info_mt6601.h"
- #endif
- #ifndef _BT_INFO_MT6611_H_
- #include "bt_info_mt6611.h"
- #endif
- #ifndef _IMEI_DOWNLOAD_H_
- #include "IMEIDownload.h"
- #endif
- #ifndef _BARCODE_DOWNLOAD_H_
- #include "BarcodeDownload.h"
- #endif
- //---------------------------------------------------------------------------
- class CUPDATEPARAMETER
- {
- private:
- E_METAAPP_RESULT_T m_eConfirmState;
-
- CRFAGC* m_rf_agc_ptr;
- CRFAFC* m_rf_afc_ptr;
- CCRYSTALAFC* m_rf_crystal_afc_ptr;
- CRFPM* m_rf_ip2_ptr;
- CRFTXIQ* m_rf_txiq_ptr;
- CRFAPC* m_rf_apc_ptr;
- CRFAPC8PSK* m_rf_epsk_apc_ptr;
- CBBADC* m_bb_adc_ptr;
- CWIFITXDC* m_wifi_txdc_ptr;
- CWIFIAPC* m_wifi_apc_ptr;
- CWIFIALC* m_wifi_alc_ptr;
- CBTINFO6601* m_bt_info6601_ptr;
- CBTINFO6611* m_bt_info6611_ptr;
- CBARCODE* m_barcode_ptr;
- short m_sUPDATEID_PARAMETER;
- bool m_bCrystal_AFC_trigger;
- short m_sRFID_AFC;
- // META_RESULT MetaResult;
- RfAfc_Req *m_pRFReq_AFC;
- RfAfc_Cnf m_RFCnf_AFC;
- int m_iAfcBufSize;
- char *m_pcAfcBuf;
- protected:
- public:
- CIMEIDOWNLOAD* MF_imei_ptr;
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- // Public member
- CUPDATEPARAMETER( void );
- ~CUPDATEPARAMETER( );
- void Confirm(E_METAAPP_RESULT_T confirm_state );
- void REQ_Finish( void );
- void REQ_TimeOut( void );
- void (*ConfirmCallback)( void );
- //----------------------------------------------------------------
- void REQ_Read_AGC_From_NVRAM(void);
- void REQ_Read_AFC_From_NVRAM(void);
- void REQ_Read_Crystal_AFC_From_NVRAM(void);
- void REQ_Read_IP2_From_NVRAM(unsigned int rf_id);
- void REQ_Read_TxIq_From_NVRAM(unsigned int rf_id, E_BBTXCFG_VER_T bbtxcfg_ver);
- void REQ_Read_GMSK_APC_From_NVRAM(unsigned int rf_id, bool b_tado_support);
- void REQ_Read_EPSK_APC_From_NVRAM(unsigned int rf_id);
- void REQ_Read_ADC_From_NVRAM(void);
- void REQ_Read_WiFiTxDcOffset_From_NVRAM(void);
- void REQ_Read_WiFiTxPower_From_NVRAM(void);
- void REQ_Read_WiFiAlc_From_NVRAM(void);
- void REQ_Read_BtCapId_From_NVRAM(void);
- void REQ_Read_IMEI_From_NVRAM(void);
- void REQ_Read_Barcode_From_NVRAM(void);
- //----------------------------------------------------------------
- void REQ_Write_AGC_To_NVRAM(void);
- void REQ_Write_AFC_To_NVRAM(void);
- void REQ_Write_Crystal_AFC_To_NVRAM(void);
- void REQ_Write_IP2_To_NVRAM(unsigned int rfmod_id);
- void REQ_Write_TxIq_To_NVRAM(unsigned int rfmod_id, E_BBTXCFG_VER_T bbtxcfg_ver);
- void REQ_Write_GMSK_APC_To_NVRAM(unsigned int rf_id, bool b_tado_support);
- void REQ_Write_EPSK_APC_To_NVRAM(unsigned int rf_id);
- void REQ_Write_ADC_To_NVRAM(void);
- void REQ_Write_WiFiTxPower_To_NVRAM(void);
- void REQ_Write_WiFiTxDcOffset_To_NVRAM(void);
- void REQ_Write_WiFiAlc_To_NVRAM(void);
- void REQ_Write_BtCapId_To_NVRAM(void);
- void REQ_Write_IMEI_To_NVRAM(bool check_checksum);
- void REQ_Write_Barcode_To_NVRAM(void);
- //----------------------------------------------------------------
- void CNF_ReadAGCFromNVRAM(void);
- void CNF_ReadAFCFromNVRAM(void);
- void CNF_ReadCrystalAFCFromNVRAM(void);
- void CNF_ReadIP2FromNVRAM(void);
- void CNF_ReadTxIqFromNVRAM(void);
- void CNF_ReadGmskAPCFromNVRAM(void);
- void CNF_ReadEpskAPCFromNVRAM(void);
- void CNF_ReadADCFromNVRAM(void);
- void CNF_ReadWiFiTxDcOffsetFromNVRAM(void);
- void CNF_ReadWiFiTxPowerFromNVRAM(void);
- void CNF_ReadWiFiAlcFromNVRAM(void);
- void CNF_ReadBtCapIdFromNVRAM(void);
- void CNF_ReadIMEIFromNVRAM(void);
- void CNF_ReadBarcodeFromNVRAM(void);
- //----------------------------------------------------------------
- void CNF_WriteAGCToNVRAM(void);
- void CNF_WriteAFCToNVRAM(void);
- void CNF_WriteCrystalAFCToNVRAM(void);
- void CNF_WriteIP2ToNVRAM(void);
- void CNF_WriteTxIqToNVRAM(void);
- void CNF_WriteGmskAPCToNVRAM(void);
- void CNF_WriteEpskAPCToNVRAM(void);
- void CNF_WriteADCToNVRAM(void);
- void CNF_WriteWiFiTxDcOffsetToNVRAM(void);
- void CNF_WriteWiFiTxPowerToNVRAM(void);
- void CNF_WriteWiFiAlcToNVRAM(void);
- void CNF_WriteBtCapIdToNVRAM(void);
- void CNF_WriteIMEIToNVRAM(void);
- void CNF_WriteBarcodeToNVRAM(void);
- //-----------------------------------------------------------------------
- // AFC
- bool AfcSectionExist(char *filename);
- bool REQ_Read_AFC_From_File(char *filename);
- bool CrystalAfcSectionExist(char *filename);
- bool REQ_Read_Crystal_AFC_From_File(char *filename);
- bool REQ_Write_AFC_To_File(char *filename);
- bool REQ_Write_Crystal_AFC_To_File(char *filename);
- // RX path loss
- bool AnyRxLossSectionExist(char *filename);
- bool REQ_Read_AGC_From_File(char *filename);
- bool REQ_Write_AGC_To_File(char *filename);
- // IP2
- bool AnyIP2SectionExist(char *filename);
- bool REQ_Read_IP2_From_File(char *filename, unsigned int rfmod_id);
- bool REQ_Write_IP2_To_File(char *filename, unsigned int rfmod_id);
- // TX IQ
- bool TxIqSectionExist(char *filename);
- bool REQ_Read_TxIq_From_File(char *filename, unsigned int rfmod_id, E_BBTXCFG_VER_T bbtxcfg_ver);
- bool REQ_Write_TxIq_To_File(char *filename, unsigned int rfmod_id, E_BBTXCFG_VER_T bbtxcfg_ver);
- // GMSK APC
- bool AnyGmskApcSectionExist( char *filename );
- bool REQ_Read_GMSK_APC_From_File(char *filename, unsigned int rf_id, bool b_tado_support);
- bool REQ_Write_GMSK_APC_To_File(char *filename, unsigned int rf_id, bool b_tado_support);
- // EPSK APC
- bool AnyEpskApcSectionExist( char *filename );
- bool REQ_Read_EPSK_APC_From_File(char *filename, unsigned int rf_id);
- bool REQ_Write_EPSK_APC_To_File(char *filename, unsigned int rf_id);
- // ADC
- bool AdcSectionExist(char *filename);
- bool REQ_Read_ADC_From_File(char *filename);
- bool REQ_Write_ADC_To_File(char *filename);
- // WiFi TX DC offset
- bool WiFiTxDcOffsetSectionExist(char *filename);
- bool REQ_Read_WiFiTxDcOffset_From_File(char *filename);
- bool REQ_Write_WiFiTxDcOffset_To_File(char *filename);
- // WiFi TX power
- bool WiFiTxPowerSectionExist(char *filename);
- bool REQ_Read_WiFiTxPower_From_File(char *filename);
- bool REQ_Write_WiFiTxPower_To_File(char *filename);
- bool WiFiAlcSectionExist(char *filename);
- bool REQ_Read_WiFiAlc_From_File(char *filename);
- bool REQ_Write_WiFiAlc_To_File(char *filename);
- // BT CAP ID
- bool BtCapIdSectionExist(char *filename);
- bool REQ_Read_BtCapId_From_File(char *filename);
- bool REQ_Write_BtCapId_To_File(char *filename);
- // IMEI
- bool ImeiSectionExist(char *filename);
- bool REQ_Read_IMEI_From_File(char *filename);
- bool REQ_Write_IMEI_To_File(char *filename);
- // Barcode
- bool BarcodeSectionExist(char *filename);
- bool REQ_Read_Barcode_From_File(char *filename);
- bool REQ_Write_Barcode_To_File(char *filename);
- // Query
- bool REQ_Query_ALC_Suppport_Start(void);
- // Global information
- E_METAAPP_RESULT_T Get_ConfirmState(void);
- //IMEISV_struct_T Get_IMEISV(void);
- //void Set_IMEISV(IMEISV_struct_T);
- //char* Get_IMEI(void);
- //void Set_IMEI(char* imei);
- };
- #endif