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

MTK

开发平台:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #ifndef _FORM_WIFIMCR_H_
  3. #define _FORM_WIFIMCR_H_
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <ComCtrls.hpp>
  10. #include <ExtCtrls.hpp>
  11. #include <Dialogs.hpp>
  12. #ifndef  _WIFI_MAC_H_
  13. #include "wifi_mac.h"
  14. #endif
  15. //---------------------------------------------------------------------------
  16. class TfrmWiFiMCR : public TForm
  17. {
  18. __published: // IDE-managed Components
  19.         TPageControl *PageControl1;
  20.         TTabSheet *TabSheet1;
  21.         TTabSheet *TabSheet2;
  22.         TPanel *pnlSC;
  23.         TPanel *Panel2;
  24.         TPanel *Panel3;
  25.         TLabel *lblSC0;
  26.         TLabel *lblSC1;
  27.         TLabel *lblSC2;
  28.         TLabel *lblSC3;
  29.         TEdit *edtSC0;
  30.         TEdit *edtSC1;
  31.         TEdit *edtSC2;
  32.         TEdit *edtSC3;
  33.         TPanel *pnlMDP;
  34.         TPanel *Panel5;
  35.         TLabel *lblMDP00;
  36.         TLabel *lblMDP01;
  37.         TLabel *lblMDP02;
  38.         TLabel *lblMDP03;
  39.         TEdit *edtMDP00;
  40.         TEdit *edtMDP01;
  41.         TEdit *edtMDP02;
  42.         TEdit *edtMDP03;
  43.         TLabel *lblMDP04;
  44.         TEdit *edtMDP04;
  45.         TLabel *lblMDP05;
  46.         TEdit *edtMDP05;
  47.         TLabel *lblMDP06;
  48.         TEdit *edtMDP06;
  49.         TLabel *lblMDP07;
  50.         TEdit *edtMDP07;
  51.         TLabel *lblMDP08;
  52.         TEdit *edtMDP08;
  53.         TLabel *lblMDP09;
  54.         TEdit *edtMDP09;
  55.         TLabel *lblMDP10;
  56.         TEdit *edtMDP10;
  57.         TLabel *lblMDP11;
  58.         TEdit *edtMDP11;
  59.         TLabel *lblMDP12;
  60.         TEdit *edtMDP12;
  61.         TLabel *lblMDP13;
  62.         TEdit *edtMDP13;
  63.         TPanel *pnlPLCI;
  64.         TPanel *Panel7;
  65.         TPanel *Panel8;
  66.         TLabel *lblPLCI00;
  67.         TEdit *edtPLCI00;
  68.         TLabel *lblPLCI01;
  69.         TEdit *edtPLCI01;
  70.         TLabel *lblPLCI02;
  71.         TEdit *edtPLCI02;
  72.         TLabel *lblPLCI03;
  73.         TEdit *edtPLCI03;
  74.         TLabel *lblPLCI04;
  75.         TEdit *edtPLCI04;
  76.         TLabel *lblPLCI05;
  77.         TEdit *edtPLCI05;
  78.         TLabel *lblPLCI06;
  79.         TEdit *edtPLCI06;
  80.         TLabel *lblPLCI07;
  81.         TEdit *edtPLCI07;
  82.         TLabel *lblPLCI08;
  83.         TEdit *edtPLCI08;
  84.         TLabel *lblPLCI09;
  85.         TEdit *edtPLCI09;
  86.         TLabel *lblPLCI10;
  87.         TEdit *edtPLCI10;
  88.         TLabel *lblPLCI11;
  89.         TEdit *edtPLCI11;
  90.         TPanel *pnlMPTC;
  91.         TPanel *Panel10;
  92.         TLabel *lblMPTC00;
  93.         TEdit *edtMPTC00;
  94.         TEdit *edtMPTC01;
  95.         TEdit *edtMPTC02;
  96.         TEdit *edtMPTC03;
  97.         TEdit *edtMPTC04;
  98.         TEdit *edtMPTC05;
  99.         TLabel *lblMPTC01;
  100.         TLabel *lblMPTC02;
  101.         TLabel *lblMPTC03;
  102.         TLabel *lblMPTC04;
  103.         TLabel *lblMPTC05;
  104.         TLabel *lblMPTC06;
  105.         TLabel *lblMPTC07;
  106.         TEdit *edtMPTC06;
  107.         TEdit *edtMPTC07;
  108.         TLabel *lblMPTC08;
  109.         TShape *Shape1;
  110.         TLabel *Label40;
  111.         TLabel *Label41;
  112.         TEdit *edtMPTC08;
  113.         TEdit *edtMPTC09;
  114.         TEdit *edtMPTC10;
  115.         TEdit *edtMPTC11;
  116.         TEdit *edtMPTC12;
  117.         TLabel *lblMPTC09;
  118.         TLabel *lblMPTC10;
  119.         TLabel *lblMPTC11;
  120.         TLabel *lblMPTC12;
  121.         TLabel *lblMPTC13;
  122.         TEdit *edtMPTC13;
  123.         TEdit *edtMPTC14;
  124.         TLabel *lblMPTC14;
  125.         TLabel *lblMPTC15;
  126.         TEdit *edtMPTC15;
  127.         TLabel *lblMPTC16;
  128.         TEdit *edtMPTC16;
  129.         TEdit *edtMPTC17;
  130.         TLabel *lblMPTC17;
  131.         TPanel *pnlNC;
  132.         TPanel *Panel12;
  133.         TLabel *lblNC0;
  134.         TLabel *lblNC1;
  135.         TLabel *lblNC2;
  136.         TLabel *lblNC3;
  137.         TEdit *edtNC0;
  138.         TEdit *edtNC1;
  139.         TEdit *edtNC2;
  140.         TEdit *edtNC3;
  141.         TLabel *lblMDP14;
  142.         TEdit *edtMDP14;
  143.         TLabel *lblMDP15;
  144.         TEdit *edtMDP15;
  145.         TLabel *lblMDP16;
  146.         TEdit *edtMDP16;
  147.         TShape *Shape3;
  148.         TPanel *pnlBG;
  149.         TPanel *Panel14;
  150.         TLabel *lblBG0;
  151.         TLabel *lblBG1;
  152.         TLabel *lblBG2;
  153.         TLabel *lblBG3;
  154.         TLabel *lblBG4;
  155.         TLabel *lblBG5;
  156.         TLabel *lblBG6;
  157.         TLabel *lblBG7;
  158.         TEdit *edtBG0;
  159.         TEdit *edtBG1;
  160.         TEdit *edtBG2;
  161.         TEdit *edtBG3;
  162.         TEdit *edtBG4;
  163.         TEdit *edtBG5;
  164.         TEdit *edtBG6;
  165.         TEdit *edtBG7;
  166.         TPanel *pnlSE;
  167.         TPanel *Panel16;
  168.         TLabel *lblSE00;
  169.         TEdit *edtSE00;
  170.         TLabel *lblSE01;
  171.         TLabel *lblSE02;
  172.         TLabel *lblSE03;
  173.         TLabel *lblSE04;
  174.         TLabel *lblSE05;
  175.         TLabel *lblSE06;
  176.         TLabel *lblSE07;
  177.         TLabel *lblSE08;
  178.         TLabel *lblSE09;
  179.         TLabel *lblSE10;
  180.         TEdit *edtSE01;
  181.         TEdit *edtSE02;
  182.         TEdit *edtSE03;
  183.         TEdit *edtSE04;
  184.         TEdit *edtSE05;
  185.         TEdit *edtSE06;
  186.         TEdit *edtSE07;
  187.         TEdit *edtSE08;
  188.         TEdit *edtSE09;
  189.         TEdit *edtSE10;
  190.         TPanel *pnlTC;
  191.         TPanel *Panel18;
  192.         TLabel *lblTC00;
  193.         TLabel *lblTC01;
  194.         TLabel *lblTC02;
  195.         TLabel *lblTC03;
  196.         TLabel *lblTC04;
  197.         TLabel *lblTC05;
  198.         TLabel *lblTC06;
  199.         TLabel *lblTC07;
  200.         TLabel *lblTC08;
  201.         TLabel *lblTC09;
  202.         TLabel *lblTC10;
  203.         TLabel *lblTC11;
  204.         TEdit *edtTC00;
  205.         TEdit *edtTC01;
  206.         TEdit *edtTC02;
  207.         TEdit *edtTC03;
  208.         TEdit *edtTC04;
  209.         TEdit *edtTC05;
  210.         TEdit *edtTC06;
  211.         TEdit *edtTC07;
  212.         TEdit *edtTC08;
  213.         TEdit *edtTC09;
  214.         TEdit *edtTC10;
  215.         TEdit *edtTC11;
  216.         TPanel *pnlRC;
  217.         TPanel *Panel20;
  218.         TLabel *lblRC00;
  219.         TLabel *lblRC01;
  220.         TLabel *lblRC02;
  221.         TLabel *lblRC03;
  222.         TLabel *lblRC04;
  223.         TLabel *lblRC05;
  224.         TLabel *lblRC06;
  225.         TLabel *lblRC07;
  226.         TLabel *lblRC08;
  227.         TLabel *lblRC09;
  228.         TEdit *edtRC00;
  229.         TEdit *edtRC01;
  230.         TEdit *edtRC02;
  231.         TEdit *edtRC03;
  232.         TEdit *edtRC04;
  233.         TEdit *edtRC05;
  234.         TEdit *edtRC06;
  235.         TEdit *edtRC07;
  236.         TEdit *edtRC08;
  237.         TEdit *edtRC09;
  238.         TEdit *edtRC10;
  239.         TEdit *edtRC11;
  240.         TLabel *lblRC10;
  241.         TLabel *lblRC11;
  242.         TLabel *lblRC12;
  243.         TLabel *lblRC13;
  244.         TEdit *edtRC12;
  245.         TEdit *edtRC13;
  246.         TEdit *edtRC14;
  247.         TLabel *lblRC14;
  248.         TPanel *pnlHIFHeader;
  249.         TPanel *Panel22;
  250.         TLabel *lblHIF0;
  251.         TLabel *lblHIF1;
  252.         TLabel *lblHIF2;
  253.         TEdit *edtHIF0;
  254.         TEdit *edtHIF1;
  255.         TEdit *edtHIF2;
  256.         TLabel *lblHIF3;
  257.         TEdit *edtHIF3;
  258.         TEdit *edtHIF4;
  259.         TEdit *edtHIF5;
  260.         TEdit *edtHIF6;
  261.         TEdit *edtHIF7;
  262.         TLabel *lblHIF4;
  263.         TLabel *lblHIF5;
  264.         TLabel *lblHIF6;
  265.         TLabel *lblHIF7;
  266.         TButton *btnReadFromRegister;
  267.         TButton *btnWriteToRegister;
  268.         TButton *btnLoadFromFile;
  269.         TButton *btnSaveToFile;
  270.         TStatusBar *sbWiFiMCR;
  271.         TLabel *lblMDP17;
  272.         TEdit *edtMDP17;
  273.         TButton *btnSYSMACMCRData;
  274.         TButton *btnTRXMACMCRData;
  275.         TTimer *HintTimer;
  276.         TSaveDialog *SaveDialog;
  277.         TOpenDialog *OpenDialog;
  278.         TStaticText *lblHint;
  279.         TCheckBox *cbSCHeader;
  280.         TCheckBox *cbMDPHeader;
  281.         TCheckBox *cbSC0;
  282.         TCheckBox *cbSC1;
  283.         TCheckBox *cbSC2;
  284.         TCheckBox *cbSC3;
  285.         TCheckBox *cbMDP00;
  286.         TCheckBox *cbMDP01;
  287.         TCheckBox *cbMDP02;
  288.         TCheckBox *cbMDP03;
  289.         TCheckBox *cbMDP04;
  290.         TCheckBox *cbMDP05;
  291.         TCheckBox *cbMDP06;
  292.         TCheckBox *cbMDP07;
  293.         TCheckBox *cbMDP08;
  294.         TCheckBox *cbMDP09;
  295.         TCheckBox *cbMDP10;
  296.         TCheckBox *cbMDP11;
  297.         TCheckBox *cbMDP12;
  298.         TCheckBox *cbMDP13;
  299.         TCheckBox *cbMDP14;
  300.         TCheckBox *cbMDP15;
  301.         TCheckBox *cbMDP16;
  302.         TCheckBox *cbMDP17;
  303.         TCheckBox *cbPLCIHeader;
  304.         TCheckBox *cbPLCI00;
  305.         TCheckBox *cbPLCI01;
  306.         TCheckBox *cbPLCI02;
  307.         TCheckBox *cbPLCI03;
  308.         TCheckBox *cbPLCI04;
  309.         TCheckBox *cbPLCI05;
  310.         TCheckBox *cbPLCI06;
  311.         TCheckBox *cbPLCI07;
  312.         TCheckBox *cbPLCI08;
  313.         TCheckBox *cbPLCI09;
  314.         TCheckBox *cbPLCI10;
  315.         TCheckBox *cbPLCI11;
  316.         TCheckBox *cbMPTCHeader;
  317.         TCheckBox *cbMPTC00;
  318.         TCheckBox *cbMPTC01;
  319.         TCheckBox *cbMPTC02;
  320.         TCheckBox *cbMPTC03;
  321.         TCheckBox *CheckBox42;
  322.         TCheckBox *CheckBox43;
  323.         TCheckBox *cbMPTC06;
  324.         TCheckBox *cbMPTC07;
  325.         TCheckBox *cbMPTC08;
  326.         TCheckBox *cbMPTC09;
  327.         TCheckBox *cbMPTC10;
  328.         TCheckBox *cbMPTC11;
  329.         TCheckBox *cbNCHeader;
  330.         TCheckBox *cbBGHeader;
  331.         TCheckBox *cbMPTC12;
  332.         TCheckBox *cbMPTC13;
  333.         TCheckBox *cbMPTC14;
  334.         TCheckBox *cbMPTC15;
  335.         TCheckBox *cbMPTC04;
  336.         TCheckBox *cbMPTC05;
  337.         TCheckBox *cbNC0;
  338.         TCheckBox *cbNC1;
  339.         TCheckBox *cbNC2;
  340.         TCheckBox *cbNC3;
  341.         TCheckBox *cbBG0;
  342.         TCheckBox *cbBG1;
  343.         TCheckBox *cbBG2;
  344.         TCheckBox *cbBG3;
  345.         TCheckBox *cbBG4;
  346.         TCheckBox *cbBG5;
  347.         TCheckBox *cbBG6;
  348.         TCheckBox *cbBG7;
  349.         TCheckBox *cbSEHeader;
  350.         TCheckBox *cbTCHeader;
  351.         TCheckBox *cbRCHeader;
  352.         TCheckBox *cbHIFHeader;
  353.         TCheckBox *cbTC00;
  354.         TCheckBox *cbTC11;
  355.         TCheckBox *cbTC10;
  356.         TCheckBox *cbTC09;
  357.         TCheckBox *cbTC08;
  358.         TCheckBox *cbTC07;
  359.         TCheckBox *cbTC06;
  360.         TCheckBox *cbTC05;
  361.         TCheckBox *cbTC04;
  362.         TCheckBox *cbTC03;
  363.         TCheckBox *cbTC02;
  364.         TCheckBox *cbTC01;
  365.         TCheckBox *cbSE00;
  366.         TCheckBox *cbSE01;
  367.         TCheckBox *cbSE02;
  368.         TCheckBox *cbSE03;
  369.         TCheckBox *cbSE04;
  370.         TCheckBox *cbSE05;
  371.         TCheckBox *cbSE06;
  372.         TCheckBox *cbSE07;
  373.         TCheckBox *cbSE08;
  374.         TCheckBox *cbSE09;
  375.         TCheckBox *cbSE10;
  376.         TCheckBox *cbRC00;
  377.         TCheckBox *cbRC01;
  378.         TCheckBox *cbRC02;
  379.         TCheckBox *cbRC03;
  380.         TCheckBox *cbRC04;
  381.         TCheckBox *cbRC05;
  382.         TCheckBox *cbRC06;
  383.         TCheckBox *cbRC07;
  384.         TCheckBox *cbRC08;
  385.         TCheckBox *cbRC09;
  386.         TCheckBox *cbRC10;
  387.         TCheckBox *cbRC11;
  388.         TCheckBox *cbRC12;
  389.         TCheckBox *cbRC13;
  390.         TCheckBox *cbRC14;
  391.         TCheckBox *cbHIF0;
  392.         TCheckBox *cbHIF1;
  393.         TCheckBox *cbHIF2;
  394.         TCheckBox *cbHIF3;
  395.         TCheckBox *cbHIF4;
  396.         TCheckBox *cbHIF5;
  397.         TCheckBox *cbHIF6;
  398.         TCheckBox *cbHIF7;
  399.         TCheckBox *cbMPTC16;
  400.         TCheckBox *cbMPTC17;
  401.         TLabel *Label1;
  402.         TLabel *Label2;
  403.         TShape *Shape4;
  404.         TLabel *Label3;
  405.         void __fastcall edtSCCheck(TObject *Sender);
  406.         void __fastcall edtMDPCheck(TObject *Sender);
  407.         void __fastcall edtPLCICheck(TObject *Sender);
  408.         void __fastcall edtMPTCCheck(TObject *Sender);
  409.         void __fastcall edtNCCheck(TObject *Sender);
  410.         void __fastcall edtBGCheck(TObject *Sender);
  411.         void __fastcall edtSECheck(TObject *Sender);
  412.         void __fastcall edtTCCheck(TObject *Sender);
  413.         void __fastcall edtRCCheck(TObject *Sender);
  414.         void __fastcall edtHIFCheck(TObject *Sender);
  415.         void __fastcall HintTimerTimer(TObject *Sender);
  416.         void __fastcall btnSaveToFileClick(TObject *Sender);
  417.         void __fastcall cbSCHeaderClick(TObject *Sender);
  418.         void __fastcall cbMDPHeaderClick(TObject *Sender);
  419.         void __fastcall cbPLCIHeaderClick(TObject *Sender);
  420.         void __fastcall cbMPTCHeaderClick(TObject *Sender);
  421.         void __fastcall cbNCHeaderClick(TObject *Sender);
  422.         void __fastcall cbBGHeaderClick(TObject *Sender);
  423.         void __fastcall cbSEHeaderClick(TObject *Sender);
  424.         void __fastcall cbTCHeaderClick(TObject *Sender);
  425.         void __fastcall cbRCHeaderClick(TObject *Sender);
  426.         void __fastcall cbHIFHeaderClick(TObject *Sender);
  427.         void __fastcall btnSYSMACMCRDataClick(TObject *Sender);
  428.         void __fastcall btnTRXMACMCRDataClick(TObject *Sender);
  429.         void __fastcall btnLoadFromFileClick(TObject *Sender);
  430.         void __fastcall btnWriteToRegisterClick(TObject *Sender);
  431.         void __fastcall btnReadFromRegisterClick(TObject *Sender);
  432.         void __fastcall FormShow(TObject *Sender);
  433. private: // User declarations
  434.         // UI
  435.         TLabel *lblSC[WIFI_SC_NUM];
  436.         TLabel *lblMDP[WIFI_MDP_NUM];
  437.         TLabel *lblPLCI[WIFI_PLCI_NUM];
  438.         TLabel *lblMPTC[WIFI_MPTC_NUM];
  439.         TLabel *lblNC[WIFI_NC_NUM];
  440.         TLabel *lblBG[WIFI_BG_NUM];
  441.         TLabel *lblSE[WIFI_SE_NUM];
  442.         TLabel *lblTC[WIFI_TC_NUM];
  443.         TLabel *lblRC[WIFI_RC_NUM];
  444.         TLabel *lblHIF[WIFI_HIF_MAX_NUM];
  445.         TEdit  *edtSC[WIFI_SC_NUM];
  446.         TEdit  *edtMDP[WIFI_MDP_NUM];
  447.         TEdit  *edtPLCI[WIFI_PLCI_NUM];
  448.         TEdit  *edtMPTC[WIFI_MPTC_NUM];
  449.         TEdit  *edtNC[WIFI_NC_NUM];
  450.         TEdit  *edtBG[WIFI_BG_NUM];
  451.         TEdit  *edtSE[WIFI_SE_NUM];
  452.         TEdit  *edtTC[WIFI_TC_NUM];
  453.         TEdit  *edtRC[WIFI_RC_NUM];
  454.         TEdit  *edtHIF[WIFI_HIF_MAX_NUM];
  455.         TCheckBox *cbSC[WIFI_SC_NUM];
  456.         TCheckBox *cbMDP[WIFI_MDP_NUM];
  457.         TCheckBox *cbPLCI[WIFI_PLCI_NUM];
  458.         TCheckBox *cbMPTC[WIFI_MPTC_NUM];
  459.         TCheckBox *cbNC[WIFI_NC_NUM];
  460.         TCheckBox *cbBG[WIFI_BG_NUM];
  461.         TCheckBox *cbSE[WIFI_SE_NUM];
  462.         TCheckBox *cbTC[WIFI_TC_NUM];
  463.         TCheckBox *cbRC[WIFI_RC_NUM];
  464.         TCheckBox *cbHIF[WIFI_HIF_MAX_NUM];
  465.         bool m_bInit;
  466.         int   m_final_WiFiId;
  467.         WiFi_ChipCapability_S m_sWiFiCap;
  468.         S_WiFi_MCR  m_sMCR;
  469.         S_WiFi_MCR16  m_sMCR16;
  470.         S_WIFI_MCR_SETTING  m_sMCR_Setting[WIFI_MCR_TYPE_NUM][WIFI_MCR_MAX_NUM];
  471.         S_WIFI_MCR16_SETTING  m_sMCR16_Setting[WIFI_MCR16_TYPE_NUM][WIFI_MCR16_MAX_NUM];
  472.         CWIFIMAC   m_WIFI_MAC_Obj;
  473.         // HIP
  474.         int  m_iCount;
  475. public: // User declarations
  476.         __fastcall TfrmWiFiMCR(TComponent* Owner);
  477.         void Init( void );
  478.         // UI
  479.         void  ReDrawFields( int idx );
  480.         bool  CheckFields( void );
  481.         void  ShowHintLabel( TControl *sender, char* hint );
  482.         void  CurrentPageLock( void );
  483.         void  CurrentPageReset( void );
  484.         void  DisplayHIF( void );
  485.         // MCR read/write
  486.         void  Compose_MCR_Parameter( void );
  487.         void  Compose_MCR_Data( void );
  488.         void  DeCompose_MCR_Data( void );
  489.         // HPI read/write
  490.         void  Compose_SDIO_Parameter( E_WIFI_HIF_SDIO hif_sdio );
  491.         void  Compose_SDIO_Data( E_WIFI_HIF_SDIO hif_sdio );
  492.         void  DeCompose_SDIO_Data( E_WIFI_HIF_SDIO hif_sdio );
  493.         void  Compose_HPI_Parameter( E_WIFI_HIF_HPI hif_hpi );
  494.         void  Compose_HPI_Data( E_WIFI_HIF_HPI hif_hpi );
  495.         void  DeCompose_HPI_Data( E_WIFI_HIF_HPI hif_hpi );
  496.         void  Compose_SPI_Parameter( E_WIFI_HIF_SPI hif_spi );
  497.         void  Compose_SPI_Data( E_WIFI_HIF_SPI hif_spi );
  498.         void  DeCompose_SPI_Data( E_WIFI_HIF_SPI hif_spi );
  499.         // call back
  500.         void  ConfirmCallback_ReadReg( void );
  501.         void  ConfirmCallback_ReadHIF( void );
  502.         void  ConfirmCallback_WriteReg( void );
  503.         void  ConfirmCallback_WriteHIF( void );
  504. };
  505. //---------------------------------------------------------------------------
  506. extern PACKAGE TfrmWiFiMCR *frmWiFiMCR;
  507. //---------------------------------------------------------------------------
  508. #endif