form_RF8PskApcProfile.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:16k
源码类别:

MTK

开发平台:

C++ Builder

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright 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) 2005
  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.  * Filename:
  38.  * ---------
  39.  *   form_RF8PSKApcProfile.h
  40.  *
  41.  * Project:
  42.  * --------
  43.  *   Maui META APP
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *   RF 8PSK APC profile form header
  48.  *
  49.  * Author:
  50.  * -------
  51.  *  Andy Ueng (mtk00490)
  52.  *
  53.  *============================================================================
  54.  *             HISTORY
  55.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  56.  *------------------------------------------------------------------------------
  57.  * $Revision$
  58.  * $Modtime$
  59.  * $Log$
  60.  * 
  61.  *------------------------------------------------------------------------------
  62.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  63.  *============================================================================
  64.  ****************************************************************************/
  65. //---------------------------------------------------------------------------
  66. #ifndef _FORM_RF8PSKAPCPROFILE_H_
  67. #define _FORM_RF8PSKAPCPROFILE_H_
  68. //---------------------------------------------------------------------------
  69. #include <Classes.hpp>
  70. #include <Controls.hpp>
  71. #include <StdCtrls.hpp>
  72. #include <Forms.hpp>
  73. #include <Buttons.hpp>
  74. #include <ComCtrls.hpp>
  75. #include <ExtCtrls.hpp>
  76. #include <Dialogs.hpp>
  77. #include <ActnList.hpp>
  78. #ifndef  _RF_APC_H_
  79. #include "rf_apc.h"
  80. #endif
  81. #ifndef  _RF_APC_8PSK_H_
  82. #include "rf_apc_8psk.h"
  83. #endif
  84. #ifndef _RF_MULTISLOTTX_H_
  85. #include "rf_multislottx.h"
  86. #endif
  87. //---------------------------------------------------------------------------
  88. class Tfrm8PskApcProfile : public TForm
  89. {
  90. __published: // IDE-managed Components
  91.         TTabControl *tctlAPC;
  92.         TLabel *lblTestArfcn;
  93.         TLabel *Label7;
  94.         TLabel *Label9;
  95.         TLabel *Label40;
  96.         TLabel *Label43;
  97.         TLabel *Label42;
  98.         TPanel *m_pnlPCLDac;
  99.         TLabel *lblPclDac;
  100.         TLabel *lblPCL;
  101.         TButton *btnPCL00;
  102.         TButton *btnPCL01;
  103.         TButton *btnPCL02;
  104.         TButton *btnPCL03;
  105.         TButton *btnPCL04;
  106.         TButton *btnPCL05;
  107.         TButton *btnPCL06;
  108.         TButton *btnPCL07;
  109.         TButton *btnPCL08;
  110.         TButton *btnPCL09;
  111.         TButton *btnPCL10;
  112.         TButton *btnPCL11;
  113.         TButton *btnPCL12;
  114.         TButton *btnPCL13;
  115.         TButton *btnPCL14;
  116.         TButton *btnPCL15;
  117.         TEdit *edtPCLDAC00;
  118.         TEdit *edtPCLDAC01;
  119.         TEdit *edtPCLDAC02;
  120.         TEdit *edtPCLDAC03;
  121.         TEdit *edtPCLDAC04;
  122.         TEdit *edtPCLDAC05;
  123.         TEdit *edtPCLDAC06;
  124.         TEdit *edtPCLDAC07;
  125.         TEdit *edtPCLDAC08;
  126.         TEdit *edtPCLDAC09;
  127.         TEdit *edtPCLDAC10;
  128.         TEdit *edtPCLDAC11;
  129.         TEdit *edtPCLDAC12;
  130.         TEdit *edtPCLDAC13;
  131.         TEdit *edtPCLDAC14;
  132.         TEdit *edtPCLDAC15;
  133.         TPanel *pnlProfileTItle;
  134.         TPanel *pnlRamp;
  135.         TLabel *lblRampUp;
  136.         TLabel *lblRampDown;
  137.         TEdit *edtRampUp00;
  138.         TEdit *edtRampUp01;
  139.         TEdit *edtRampUp02;
  140.         TEdit *edtRampUp03;
  141.         TEdit *edtRampUp04;
  142.         TEdit *edtRampUp05;
  143.         TEdit *edtRampUp06;
  144.         TEdit *edtRampUp07;
  145.         TEdit *edtRampUp08;
  146.         TEdit *edtRampUp09;
  147.         TEdit *edtRampUp10;
  148.         TEdit *edtRampUp11;
  149.         TEdit *edtRampUp13;
  150.         TEdit *edtRampUp12;
  151.         TEdit *edtRampUp14;
  152.         TEdit *edtRampUp15;
  153.         TEdit *edtRampDn00;
  154.         TEdit *edtRampDn01;
  155.         TEdit *edtRampDn02;
  156.         TEdit *edtRampDn03;
  157.         TEdit *edtRampDn04;
  158.         TEdit *edtRampDn05;
  159.         TEdit *edtRampDn06;
  160.         TEdit *edtRampDn07;
  161.         TEdit *edtRampDn08;
  162.         TEdit *edtRampDn09;
  163.         TEdit *edtRampDn10;
  164.         TEdit *edtRampDn11;
  165.         TEdit *edtRampDn12;
  166.         TEdit *edtRampDn13;
  167.         TEdit *edtRampDn14;
  168.         TEdit *edtRampDn15;
  169.         TButton *btnUpLeft;
  170.         TButton *btnUpRight;
  171.         TButton *btnDnLeft;
  172.         TButton *btnDnRight;
  173.         TPanel *pnlWeightTitle;
  174.         TPanel *pnlWeight;
  175.         TLabel *lblMaxARFCN;
  176.         TLabel *lblMidPCL;
  177.         TLabel *lblHighWt;
  178.         TLabel *lblLowWt;
  179.         TEdit *edtWtARFCN00;
  180.         TEdit *edtWtARFCN01;
  181.         TEdit *edtWtARFCN02;
  182.         TEdit *edtWtARFCN03;
  183.         TEdit *edtWtARFCN04;
  184.         TEdit *edtWtARFCN05;
  185.         TEdit *edtWtARFCN06;
  186.         TEdit *edtWtARFCN07;
  187.         TEdit *edtWtARFCN08;
  188.         TEdit *edtWtARFCN09;
  189.         TEdit *edtWtARFCN10;
  190.         TEdit *edtWtPCL10;
  191.         TEdit *edtWtPCL09;
  192.         TEdit *edtWtPCL08;
  193.         TEdit *edtWtPCL07;
  194.         TEdit *edtWtPCL06;
  195.         TEdit *edtWtPCL05;
  196.         TEdit *edtWtPCL04;
  197.         TEdit *edtWtPCL03;
  198.         TEdit *edtWtPCL02;
  199.         TEdit *edtWtPCL01;
  200.         TEdit *edtWtPCL00;
  201.         TEdit *edtWtHigh00;
  202.         TEdit *edtWtHigh01;
  203.         TEdit *edtWtHigh02;
  204.         TEdit *edtWtHigh03;
  205.         TEdit *edtWtHigh04;
  206.         TEdit *edtWtHigh05;
  207.         TEdit *edtWtHigh06;
  208.         TEdit *edtWtHigh07;
  209.         TEdit *edtWtHigh08;
  210.         TEdit *edtWtHigh09;
  211.         TEdit *edtWtHigh10;
  212.         TEdit *edtWtLow00;
  213.         TEdit *edtWtLow01;
  214.         TEdit *edtWtLow02;
  215.         TEdit *edtWtLow03;
  216.         TEdit *edtWtLow04;
  217.         TEdit *edtWtLow05;
  218.         TEdit *edtWtLow06;
  219.         TEdit *edtWtLow07;
  220.         TEdit *edtWtLow08;
  221.         TEdit *edtWtLow09;
  222.         TEdit *edtWtLow10;
  223.         TBitBtn *btnTXStart;
  224.         TEdit *edtTestArfcn;
  225.         TPanel *pnlBatteryCompensateTitle;
  226.         TPanel *pnlBatteryCompensate;
  227.         TLabel *Label1;
  228.         TLabel *Label2;
  229.         TLabel *Label3;
  230.         TLabel *Label4;
  231.         TLabel *Label5;
  232.         TLabel *Label6;
  233.         TEdit *edtBatteryCompensate00;
  234.         TEdit *edtBatteryCompensate01;
  235.         TEdit *edtBatteryCompensate02;
  236.         TEdit *edtBatteryCompensate10;
  237.         TEdit *edtBatteryCompensate11;
  238.         TEdit *edtBatteryCompensate12;
  239.         TEdit *edtBatteryCompensate20;
  240.         TEdit *edtBatteryCompensate21;
  241.         TEdit *edtBatteryCompensate22;
  242.         TPanel *Panel1;
  243.         TPanel *Panel2;
  244.         TEdit *edtTxAfcOffset;
  245.         TBitBtn *btnTXStop;
  246.         TPanel *pnlCAL3Mode;
  247.         TLabel *Label10;
  248.         TLabel *Label11;
  249.         TLabel *Label12;
  250.         TLabel *Label13;
  251.         TLabel *lblBVReg;
  252.         TLabel *Label8;
  253.         TLabel *lblTN;
  254.         TLabel *lblTO;
  255.         TEdit *edtAP;
  256.         TEdit *edtAS;
  257.         TEdit *edtAO;
  258.         TEdit *edtBD;
  259.         TStaticText *stBvmode;
  260.         TCheckBox *cbC3ModeEnable;
  261.         TEdit *edtTN;
  262.         TEdit *edtTO;
  263.         TStaticText *stNVRAMDB;
  264.         TPanel *pnlCAL3ModeHeader;
  265.         TComboBox *cbCS;
  266.         TComboBox *cbTSC;
  267.         TEdit *edtTA;
  268.         TEdit *edtAFC;
  269.         TButton *btnUploadFromFlash;
  270.         TButton *btnDownloadToFlash;
  271.         TButton *btnChangeDB;
  272.         TButton *btnLoadFromFile;
  273.         TButton *btnSaveToFile;
  274.         TButton *btnSetCAL3ModeToRegister;
  275.         TStatusBar *sbAPCProfile;
  276.         TOpenDialog *OpenDialog;
  277.         TSaveDialog *SaveDialog;
  278.         TTimer *HintTimer;
  279.         TPanel *Panel3;
  280.         TPanel *Panel4;
  281.         TEdit *edtInterslotLowestDAC;
  282.         TPanel *m_pnlPCLDacTItle;
  283.         TPanel *m_pnlPAVbias;
  284.         TLabel *lblVbias;
  285.         TEdit *m_edtVbias0;
  286.         TEdit *m_edtVbias1;
  287.         TEdit *m_edtVbias2;
  288.         TEdit *m_edtVbias3;
  289.         TEdit *m_edtVbias4;
  290.         TEdit *m_edtVbias5;
  291.         TEdit *m_edtVbias6;
  292.         TEdit *m_edtVbias7;
  293.         TPanel *m_pnlPAVbiasTItle;
  294.         TLabel *Label14;
  295.         TEdit *m_edtVbiasPCL0;
  296.         TEdit *m_edtVbiasPCL1;
  297.         TEdit *m_edtVbiasPCL2;
  298.         TEdit *m_edtVbiasPCL3;
  299.         TEdit *m_edtVbiasPCL4;
  300.         TEdit *m_edtVbiasPCL5;
  301.         TEdit *m_edtVbiasPCL6;
  302.         TEdit *m_edtVbiasPCL7;
  303.         TActionList *actList;
  304.         TAction *ToggleHide;
  305.         TStaticText *lblHint;
  306.         TPanel *m_pnlAD6546TItle;
  307.         TPanel *m_pnlAD6546;
  308.         TLabel *Label15;
  309.         TEdit *m_edtSlopeSkew;
  310.         TLabel *Label16;
  311.         TEdit *m_edtAmFbDac;
  312.         void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  313.         void __fastcall FormCreate(TObject *Sender);
  314.         void __fastcall FormHide(TObject *Sender);
  315.         void __fastcall FormShow(TObject *Sender);
  316.         void __fastcall edtTACheck(TObject *Sender);
  317.         void __fastcall edtAfcDacCheck(TObject *Sender);
  318.         void __fastcall edtTestArfcnCheck(TObject *Sender);
  319.         void __fastcall btnTXStartClick(TObject *Sender);
  320.         void __fastcall btnTXStopClick(TObject *Sender);
  321.         void __fastcall edtPCLDACCheck(TObject *Sender);
  322.         void __fastcall OnBtnPclClick(TObject *Sender);
  323.         void __fastcall btnLeftClick(TObject *Sender);
  324.         void __fastcall btnUpRightClick(TObject *Sender);
  325.         void __fastcall btnDnLeftClick(TObject *Sender);
  326.         void __fastcall btnDnRightClick(TObject *Sender);
  327.         void __fastcall edtRampUpCheck(TObject *Sender);
  328.         void __fastcall edtRampDnCheck(TObject *Sender);
  329.         void __fastcall edtWtARFCNCheck(TObject *Sender);
  330.         void __fastcall edtWtPCLCheck(TObject *Sender);
  331.         void __fastcall edtWtHighCheck(TObject *Sender);
  332.         void __fastcall edtWtLowCheck(TObject *Sender);
  333.         void __fastcall edtBatteryCompensateCheck(TObject *Sender);
  334.         void __fastcall edtTxAfcOffsetCheck(TObject *Sender);
  335.         void __fastcall edtAPCheck(TObject *Sender);
  336.         void __fastcall edtASCheck(TObject *Sender);
  337.         void __fastcall edtAOCheck(TObject *Sender);
  338.         void __fastcall edtBDCheck(TObject *Sender);
  339.         void __fastcall cbC3ModeEnableClick(TObject *Sender);
  340.         void __fastcall edtTNCheck(TObject *Sender);
  341.         void __fastcall edtTOCheck(TObject *Sender);
  342.         void __fastcall UploadFromFlashStart(TObject *Sender);
  343.         void __fastcall btnDownloadToFlashClick(TObject *Sender);
  344.         void __fastcall btnChangeDBClick(TObject *Sender);
  345.         void __fastcall btnLoadFromFileClick(TObject *Sender);
  346.         void __fastcall btnSaveToFileClick(TObject *Sender);
  347.         void __fastcall btnSetCAL3ModeToRegisterClick(TObject *Sender);
  348.         void __fastcall HintTimerTimer(TObject *Sender);
  349.         void __fastcall tctlAPCChange(TObject *Sender);
  350.         void __fastcall edtInterslotLowestDACCheck(TObject *Sender);
  351.         void __fastcall edtVbiasCheck(TObject *Sender);
  352.         void __fastcall FormActivate(TObject *Sender);
  353.         void __fastcall m_edtVbiasPCLCheck(TObject *Sender);
  354.         void __fastcall ToggleHideExecute(TObject *Sender);
  355.         void __fastcall m_edtSlopeSkewCheck(TObject *Sender);
  356.         void __fastcall m_edtAmFbDacCheck(TObject *Sender);
  357. private: // User declarations
  358.         bool  m_bInit;
  359.         bool  m_bFirstFormShow;
  360.         bool  m_bMultiSlotTxExSupport;
  361.         
  362.         // common
  363.         AnsiString as_NVRAM_DB_File;
  364.         bool isSetCal3ModeTrigger;
  365.         TEdit   *edtPCLDAC[16];
  366.         TEdit   *m_edtVbias[MAX_PA_VBIAS_NUM];
  367.         TEdit   *m_edtVbiasPCL[MAX_PA_VBIAS_NUM];
  368.         TButton *btnPCL[16];
  369.         TEdit   *edtRampUp[16];
  370.         TEdit   *edtRampDn[16];
  371.         TEdit   *edtWtARFCN[12];
  372.         TEdit   *edtWtHigh[12];
  373.         TEdit   *edtWtLow[12];
  374.         TEdit   *edtWtPCL[12];
  375.         TEdit   *edtBatteryCompensateArray[3][3];
  376.         
  377.         E_BANDSEL m_eCurBand;
  378.         int  CurPCLIndex;
  379.         short m_sTestArfcn[MAX_SUPPORT_BAND_NUM];  // GSM900, DCS1800, PCS1900, GSM 850
  380.         int  HighApcDcOffset[MAX_SUPPORT_BAND_NUM];
  381.         int  LowApcDcOffset[MAX_SUPPORT_BAND_NUM];
  382.         int  ApcLowestPower[MAX_SUPPORT_BAND_NUM];
  383.         short tx_afc_offset[MAX_SUPPORT_BAND_NUM];
  384.         unsigned char m_ucInterslotLowestDAC[MAX_SUPPORT_BAND_NUM];
  385.         S_EPSK_RAMP_T  m_sEpskRamp;
  386.         // common
  387.         int lastTabIndex;
  388.         unsigned int  m_uiFinalRFID;
  389.         bool  isDownloadTrigger;
  390.         CRFAPC8PSK  *RF_APC_8PSK_Obj;
  391.         CRFMULTISLOTTX *RF_MULTI_SLOT_TX_Obj;
  392.         // band
  393.         RFBandSupport_S  band_support;
  394.         // Renesas
  395.  //  sC3    c3[MAX_SUPPORT_BAND_NUM];
  396.   // sBVW1  bvw1[MAX_SUPPORT_BAND_NUM];
  397.    RF_BRIGHT5P_Coef_T        b5p_coef;
  398.    sC3Mode    c3mode;
  399.   // sBVW0  bvw0[MAX_RENESAS_BV_WORD_NUM];
  400.    sBVW0  bvw640;
  401.    sBVW0  bvw650;
  402.    sBVW0  bvw660;
  403.    sBVW0  bvw670;
  404.    sBVW2  bvw2[MAX_RENESAS_BV_WORD_NUM];
  405. public: // User declarations
  406.         __fastcall Tfrm8PskApcProfile(TComponent* Owner);
  407.         void Init(void);
  408.    // UI
  409.    bool  read_db_file( AnsiString asFileName );
  410.    void  read_APC_files_setup( AnsiString asSetupFile, AnsiString asExeName );
  411.    void  read_APC_db_file( AnsiString asFileName );
  412.    void  write_APC_files_setup( AnsiString asSetupFile, AnsiString asExeName );
  413.    void  UpdateDBFileCaption(AnsiString asFileName);
  414.    void  CurrentPageLock( void );
  415.    void  CurrentPageReset( void );
  416.    void  ReDrawFields( int draw_mask );
  417.    bool  CheckFields( void );
  418.    void  ShowHintLabel( TControl *sender, char* hint );
  419.    void  ApplyHideProperty(void);
  420.    // Renesas
  421.    void Compose_C3Reg(int tn, int to, int pm, int &c3reg);
  422.     void DeCompose_C3Reg(int c3reg, int &tn, int &to, int &pm);
  423.     void Display_RenesasUI( int band_mode );
  424.     void Display_Word3( void );
  425.     void Display_Word6s( int band_mode );
  426.     void Display_C3WordEditor( void );
  427.     void Display_BVW64( void );
  428.     void Display_BVW65( void );
  429.     void Display_BVW66( void );
  430.     void Display_BVW67( void );
  431.     bool ComposeRenesasField( void );
  432.     bool DeComposeRenesasField( void );
  433.     void Get_CurrentWord6s( unsigned int &cur_w6s );
  434.         // call back
  435.    void  ConfirmCallback_TX( void );
  436.    void  ConfirmCallback_MultiSlotTX( void );
  437.    void  UploadApcFromFlashDone( void );
  438.    void  UploadB5PFromFlashDone( void );
  439.    void  DownloadApcToFlashDone( void );
  440.    void  DownloadB5PToFlashDone( void );
  441.    void  CNF_SetB5PToReg( void );
  442.    void  CNF_SetW6sImmediateBSI( void );
  443.     // global information
  444.     void  Set_RF_APC_8PSK_Obj( CRFAPC8PSK *rf_apc_8psk_obj );
  445.     void  Set_RF_MULTI_SLOT_TX_Obj( CRFMULTISLOTTX   *rf_multi_slot_tx_obj);
  446. };
  447. //---------------------------------------------------------------------------
  448. extern PACKAGE Tfrm8PskApcProfile *frm8PskApcProfile;
  449. //---------------------------------------------------------------------------
  450. #endif