form_RF8PskApcProfile.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:16k
- /*****************************************************************************
- * 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:
- * ---------
- * form_RF8PSKApcProfile.h
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * RF 8PSK APC profile form 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 _FORM_RF8PSKAPCPROFILE_H_
- #define _FORM_RF8PSKAPCPROFILE_H_
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Forms.hpp>
- #include <Buttons.hpp>
- #include <ComCtrls.hpp>
- #include <ExtCtrls.hpp>
- #include <Dialogs.hpp>
- #include <ActnList.hpp>
- #ifndef _RF_APC_H_
- #include "rf_apc.h"
- #endif
- #ifndef _RF_APC_8PSK_H_
- #include "rf_apc_8psk.h"
- #endif
- #ifndef _RF_MULTISLOTTX_H_
- #include "rf_multislottx.h"
- #endif
- //---------------------------------------------------------------------------
- class Tfrm8PskApcProfile : public TForm
- {
- __published: // IDE-managed Components
- TTabControl *tctlAPC;
- TLabel *lblTestArfcn;
- TLabel *Label7;
- TLabel *Label9;
- TLabel *Label40;
- TLabel *Label43;
- TLabel *Label42;
- TPanel *m_pnlPCLDac;
- TLabel *lblPclDac;
- TLabel *lblPCL;
- TButton *btnPCL00;
- TButton *btnPCL01;
- TButton *btnPCL02;
- TButton *btnPCL03;
- TButton *btnPCL04;
- TButton *btnPCL05;
- TButton *btnPCL06;
- TButton *btnPCL07;
- TButton *btnPCL08;
- TButton *btnPCL09;
- TButton *btnPCL10;
- TButton *btnPCL11;
- TButton *btnPCL12;
- TButton *btnPCL13;
- TButton *btnPCL14;
- TButton *btnPCL15;
- TEdit *edtPCLDAC00;
- TEdit *edtPCLDAC01;
- TEdit *edtPCLDAC02;
- TEdit *edtPCLDAC03;
- TEdit *edtPCLDAC04;
- TEdit *edtPCLDAC05;
- TEdit *edtPCLDAC06;
- TEdit *edtPCLDAC07;
- TEdit *edtPCLDAC08;
- TEdit *edtPCLDAC09;
- TEdit *edtPCLDAC10;
- TEdit *edtPCLDAC11;
- TEdit *edtPCLDAC12;
- TEdit *edtPCLDAC13;
- TEdit *edtPCLDAC14;
- TEdit *edtPCLDAC15;
- TPanel *pnlProfileTItle;
- TPanel *pnlRamp;
- TLabel *lblRampUp;
- TLabel *lblRampDown;
- TEdit *edtRampUp00;
- TEdit *edtRampUp01;
- TEdit *edtRampUp02;
- TEdit *edtRampUp03;
- TEdit *edtRampUp04;
- TEdit *edtRampUp05;
- TEdit *edtRampUp06;
- TEdit *edtRampUp07;
- TEdit *edtRampUp08;
- TEdit *edtRampUp09;
- TEdit *edtRampUp10;
- TEdit *edtRampUp11;
- TEdit *edtRampUp13;
- TEdit *edtRampUp12;
- TEdit *edtRampUp14;
- TEdit *edtRampUp15;
- TEdit *edtRampDn00;
- TEdit *edtRampDn01;
- TEdit *edtRampDn02;
- TEdit *edtRampDn03;
- TEdit *edtRampDn04;
- TEdit *edtRampDn05;
- TEdit *edtRampDn06;
- TEdit *edtRampDn07;
- TEdit *edtRampDn08;
- TEdit *edtRampDn09;
- TEdit *edtRampDn10;
- TEdit *edtRampDn11;
- TEdit *edtRampDn12;
- TEdit *edtRampDn13;
- TEdit *edtRampDn14;
- TEdit *edtRampDn15;
- TButton *btnUpLeft;
- TButton *btnUpRight;
- TButton *btnDnLeft;
- TButton *btnDnRight;
- TPanel *pnlWeightTitle;
- TPanel *pnlWeight;
- TLabel *lblMaxARFCN;
- TLabel *lblMidPCL;
- TLabel *lblHighWt;
- TLabel *lblLowWt;
- TEdit *edtWtARFCN00;
- TEdit *edtWtARFCN01;
- TEdit *edtWtARFCN02;
- TEdit *edtWtARFCN03;
- TEdit *edtWtARFCN04;
- TEdit *edtWtARFCN05;
- TEdit *edtWtARFCN06;
- TEdit *edtWtARFCN07;
- TEdit *edtWtARFCN08;
- TEdit *edtWtARFCN09;
- TEdit *edtWtARFCN10;
- TEdit *edtWtPCL10;
- TEdit *edtWtPCL09;
- TEdit *edtWtPCL08;
- TEdit *edtWtPCL07;
- TEdit *edtWtPCL06;
- TEdit *edtWtPCL05;
- TEdit *edtWtPCL04;
- TEdit *edtWtPCL03;
- TEdit *edtWtPCL02;
- TEdit *edtWtPCL01;
- TEdit *edtWtPCL00;
- TEdit *edtWtHigh00;
- TEdit *edtWtHigh01;
- TEdit *edtWtHigh02;
- TEdit *edtWtHigh03;
- TEdit *edtWtHigh04;
- TEdit *edtWtHigh05;
- TEdit *edtWtHigh06;
- TEdit *edtWtHigh07;
- TEdit *edtWtHigh08;
- TEdit *edtWtHigh09;
- TEdit *edtWtHigh10;
- TEdit *edtWtLow00;
- TEdit *edtWtLow01;
- TEdit *edtWtLow02;
- TEdit *edtWtLow03;
- TEdit *edtWtLow04;
- TEdit *edtWtLow05;
- TEdit *edtWtLow06;
- TEdit *edtWtLow07;
- TEdit *edtWtLow08;
- TEdit *edtWtLow09;
- TEdit *edtWtLow10;
- TBitBtn *btnTXStart;
- TEdit *edtTestArfcn;
- TPanel *pnlBatteryCompensateTitle;
- TPanel *pnlBatteryCompensate;
- TLabel *Label1;
- TLabel *Label2;
- TLabel *Label3;
- TLabel *Label4;
- TLabel *Label5;
- TLabel *Label6;
- TEdit *edtBatteryCompensate00;
- TEdit *edtBatteryCompensate01;
- TEdit *edtBatteryCompensate02;
- TEdit *edtBatteryCompensate10;
- TEdit *edtBatteryCompensate11;
- TEdit *edtBatteryCompensate12;
- TEdit *edtBatteryCompensate20;
- TEdit *edtBatteryCompensate21;
- TEdit *edtBatteryCompensate22;
- TPanel *Panel1;
- TPanel *Panel2;
- TEdit *edtTxAfcOffset;
- TBitBtn *btnTXStop;
- TPanel *pnlCAL3Mode;
- TLabel *Label10;
- TLabel *Label11;
- TLabel *Label12;
- TLabel *Label13;
- TLabel *lblBVReg;
- TLabel *Label8;
- TLabel *lblTN;
- TLabel *lblTO;
- TEdit *edtAP;
- TEdit *edtAS;
- TEdit *edtAO;
- TEdit *edtBD;
- TStaticText *stBvmode;
- TCheckBox *cbC3ModeEnable;
- TEdit *edtTN;
- TEdit *edtTO;
- TStaticText *stNVRAMDB;
- TPanel *pnlCAL3ModeHeader;
- TComboBox *cbCS;
- TComboBox *cbTSC;
- TEdit *edtTA;
- TEdit *edtAFC;
- TButton *btnUploadFromFlash;
- TButton *btnDownloadToFlash;
- TButton *btnChangeDB;
- TButton *btnLoadFromFile;
- TButton *btnSaveToFile;
- TButton *btnSetCAL3ModeToRegister;
- TStatusBar *sbAPCProfile;
- TOpenDialog *OpenDialog;
- TSaveDialog *SaveDialog;
- TTimer *HintTimer;
- TPanel *Panel3;
- TPanel *Panel4;
- TEdit *edtInterslotLowestDAC;
- TPanel *m_pnlPCLDacTItle;
- TPanel *m_pnlPAVbias;
- TLabel *lblVbias;
- TEdit *m_edtVbias0;
- TEdit *m_edtVbias1;
- TEdit *m_edtVbias2;
- TEdit *m_edtVbias3;
- TEdit *m_edtVbias4;
- TEdit *m_edtVbias5;
- TEdit *m_edtVbias6;
- TEdit *m_edtVbias7;
- TPanel *m_pnlPAVbiasTItle;
- TLabel *Label14;
- TEdit *m_edtVbiasPCL0;
- TEdit *m_edtVbiasPCL1;
- TEdit *m_edtVbiasPCL2;
- TEdit *m_edtVbiasPCL3;
- TEdit *m_edtVbiasPCL4;
- TEdit *m_edtVbiasPCL5;
- TEdit *m_edtVbiasPCL6;
- TEdit *m_edtVbiasPCL7;
- TActionList *actList;
- TAction *ToggleHide;
- TStaticText *lblHint;
- TPanel *m_pnlAD6546TItle;
- TPanel *m_pnlAD6546;
- TLabel *Label15;
- TEdit *m_edtSlopeSkew;
- TLabel *Label16;
- TEdit *m_edtAmFbDac;
- void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
- void __fastcall FormCreate(TObject *Sender);
- void __fastcall FormHide(TObject *Sender);
- void __fastcall FormShow(TObject *Sender);
- void __fastcall edtTACheck(TObject *Sender);
- void __fastcall edtAfcDacCheck(TObject *Sender);
- void __fastcall edtTestArfcnCheck(TObject *Sender);
- void __fastcall btnTXStartClick(TObject *Sender);
- void __fastcall btnTXStopClick(TObject *Sender);
- void __fastcall edtPCLDACCheck(TObject *Sender);
- void __fastcall OnBtnPclClick(TObject *Sender);
- void __fastcall btnLeftClick(TObject *Sender);
- void __fastcall btnUpRightClick(TObject *Sender);
- void __fastcall btnDnLeftClick(TObject *Sender);
- void __fastcall btnDnRightClick(TObject *Sender);
- void __fastcall edtRampUpCheck(TObject *Sender);
- void __fastcall edtRampDnCheck(TObject *Sender);
- void __fastcall edtWtARFCNCheck(TObject *Sender);
- void __fastcall edtWtPCLCheck(TObject *Sender);
- void __fastcall edtWtHighCheck(TObject *Sender);
- void __fastcall edtWtLowCheck(TObject *Sender);
- void __fastcall edtBatteryCompensateCheck(TObject *Sender);
- void __fastcall edtTxAfcOffsetCheck(TObject *Sender);
- void __fastcall edtAPCheck(TObject *Sender);
- void __fastcall edtASCheck(TObject *Sender);
- void __fastcall edtAOCheck(TObject *Sender);
- void __fastcall edtBDCheck(TObject *Sender);
- void __fastcall cbC3ModeEnableClick(TObject *Sender);
- void __fastcall edtTNCheck(TObject *Sender);
- void __fastcall edtTOCheck(TObject *Sender);
- void __fastcall UploadFromFlashStart(TObject *Sender);
- void __fastcall btnDownloadToFlashClick(TObject *Sender);
- void __fastcall btnChangeDBClick(TObject *Sender);
- void __fastcall btnLoadFromFileClick(TObject *Sender);
- void __fastcall btnSaveToFileClick(TObject *Sender);
- void __fastcall btnSetCAL3ModeToRegisterClick(TObject *Sender);
- void __fastcall HintTimerTimer(TObject *Sender);
- void __fastcall tctlAPCChange(TObject *Sender);
- void __fastcall edtInterslotLowestDACCheck(TObject *Sender);
- void __fastcall edtVbiasCheck(TObject *Sender);
- void __fastcall FormActivate(TObject *Sender);
- void __fastcall m_edtVbiasPCLCheck(TObject *Sender);
- void __fastcall ToggleHideExecute(TObject *Sender);
- void __fastcall m_edtSlopeSkewCheck(TObject *Sender);
- void __fastcall m_edtAmFbDacCheck(TObject *Sender);
- private: // User declarations
- bool m_bInit;
- bool m_bFirstFormShow;
- bool m_bMultiSlotTxExSupport;
-
- // common
- AnsiString as_NVRAM_DB_File;
- bool isSetCal3ModeTrigger;
- TEdit *edtPCLDAC[16];
- TEdit *m_edtVbias[MAX_PA_VBIAS_NUM];
- TEdit *m_edtVbiasPCL[MAX_PA_VBIAS_NUM];
- TButton *btnPCL[16];
- TEdit *edtRampUp[16];
- TEdit *edtRampDn[16];
- TEdit *edtWtARFCN[12];
- TEdit *edtWtHigh[12];
- TEdit *edtWtLow[12];
- TEdit *edtWtPCL[12];
- TEdit *edtBatteryCompensateArray[3][3];
-
- E_BANDSEL m_eCurBand;
- int CurPCLIndex;
- short m_sTestArfcn[MAX_SUPPORT_BAND_NUM]; // GSM900, DCS1800, PCS1900, GSM 850
- int HighApcDcOffset[MAX_SUPPORT_BAND_NUM];
- int LowApcDcOffset[MAX_SUPPORT_BAND_NUM];
- int ApcLowestPower[MAX_SUPPORT_BAND_NUM];
- short tx_afc_offset[MAX_SUPPORT_BAND_NUM];
- unsigned char m_ucInterslotLowestDAC[MAX_SUPPORT_BAND_NUM];
- S_EPSK_RAMP_T m_sEpskRamp;
- // common
- int lastTabIndex;
- unsigned int m_uiFinalRFID;
- bool isDownloadTrigger;
- CRFAPC8PSK *RF_APC_8PSK_Obj;
- CRFMULTISLOTTX *RF_MULTI_SLOT_TX_Obj;
- // band
- RFBandSupport_S band_support;
- // Renesas
- // sC3 c3[MAX_SUPPORT_BAND_NUM];
- // sBVW1 bvw1[MAX_SUPPORT_BAND_NUM];
- RF_BRIGHT5P_Coef_T b5p_coef;
- sC3Mode c3mode;
- // sBVW0 bvw0[MAX_RENESAS_BV_WORD_NUM];
- sBVW0 bvw640;
- sBVW0 bvw650;
- sBVW0 bvw660;
- sBVW0 bvw670;
- sBVW2 bvw2[MAX_RENESAS_BV_WORD_NUM];
- public: // User declarations
- __fastcall Tfrm8PskApcProfile(TComponent* Owner);
- void Init(void);
- // UI
- bool read_db_file( AnsiString asFileName );
- void read_APC_files_setup( AnsiString asSetupFile, AnsiString asExeName );
- void read_APC_db_file( AnsiString asFileName );
- void write_APC_files_setup( AnsiString asSetupFile, AnsiString asExeName );
- void UpdateDBFileCaption(AnsiString asFileName);
- void CurrentPageLock( void );
- void CurrentPageReset( void );
- void ReDrawFields( int draw_mask );
- bool CheckFields( void );
- void ShowHintLabel( TControl *sender, char* hint );
- void ApplyHideProperty(void);
- // Renesas
- void Compose_C3Reg(int tn, int to, int pm, int &c3reg);
- void DeCompose_C3Reg(int c3reg, int &tn, int &to, int &pm);
- void Display_RenesasUI( int band_mode );
- void Display_Word3( void );
- void Display_Word6s( int band_mode );
- void Display_C3WordEditor( void );
- void Display_BVW64( void );
- void Display_BVW65( void );
- void Display_BVW66( void );
- void Display_BVW67( void );
- bool ComposeRenesasField( void );
- bool DeComposeRenesasField( void );
- void Get_CurrentWord6s( unsigned int &cur_w6s );
- // call back
- void ConfirmCallback_TX( void );
- void ConfirmCallback_MultiSlotTX( void );
- void UploadApcFromFlashDone( void );
- void UploadB5PFromFlashDone( void );
- void DownloadApcToFlashDone( void );
- void DownloadB5PToFlashDone( void );
- void CNF_SetB5PToReg( void );
- void CNF_SetW6sImmediateBSI( void );
- // global information
- void Set_RF_APC_8PSK_Obj( CRFAPC8PSK *rf_apc_8psk_obj );
- void Set_RF_MULTI_SLOT_TX_Obj( CRFMULTISLOTTX *rf_multi_slot_tx_obj);
- };
- //---------------------------------------------------------------------------
- extern PACKAGE Tfrm8PskApcProfile *frm8PskApcProfile;
- //---------------------------------------------------------------------------
- #endif