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

MTK

开发平台:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #ifndef _FORM_WIFIEEPROM_H_
  3. #define _FORM_WIFIEEPROM_H_
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <ExtCtrls.hpp>
  10. #include <ComCtrls.hpp>
  11. #include <Dialogs.hpp>
  12. #ifndef META_DLL_H
  13. #include "meta.h"
  14. #endif
  15. #ifndef  _WIFI_COMMON_H_
  16. #include "wifi_common.h"
  17. #endif
  18. #ifndef  _WIFI_EE_H_
  19. #include "wifi_ee.h"
  20. #endif
  21. //---------------------------------------------------------------------------
  22. class TfrmWiFiEEPROM : public TForm
  23. {
  24. __published: // IDE-managed Components
  25.         TPanel *pnlPCL;
  26.         TLabel *Label13;
  27.         TLabel *Label14;
  28.         TLabel *Label15;
  29.         TLabel *Label16;
  30.         TLabel *Label17;
  31.         TLabel *Label18;
  32.         TLabel *Label19;
  33.         TLabel *Label20;
  34.         TLabel *Label21;
  35.         TLabel *Label22;
  36.         TLabel *Label23;
  37.         TLabel *Label24;
  38.         TLabel *Label25;
  39.         TLabel *Label26;
  40.         TLabel *Label28;
  41.         TEdit *edtCCKCHDAC00;
  42.         TEdit *edtCCKCHDAC01;
  43.         TEdit *edtCCKCHDAC02;
  44.         TEdit *edtCCKCHDAC03;
  45.         TEdit *edtCCKCHDAC04;
  46.         TEdit *edtCCKCHDAC05;
  47.         TEdit *edtCCKCHDAC06;
  48.         TEdit *edtCCKCHDAC07;
  49.         TEdit *edtCCKCHDAC08;
  50.         TEdit *edtCCKCHDAC09;
  51.         TEdit *edtCCKCHDAC0A;
  52.         TEdit *edtCCKCHDAC0B;
  53.         TEdit *edtOFDMCHDAC01;
  54.         TEdit *edtOFDMCHDAC02;
  55.         TEdit *edtOFDMCHDAC03;
  56.         TEdit *edtOFDMCHDAC04;
  57.         TEdit *edtOFDMCHDAC05;
  58.         TEdit *edtOFDMCHDAC06;
  59.         TEdit *edtOFDMCHDAC07;
  60.         TEdit *edtOFDMCHDAC08;
  61.         TEdit *edtOFDMCHDAC09;
  62.         TEdit *edtOFDMCHDAC0A;
  63.         TEdit *edtOFDMCHDAC0B;
  64.         TEdit *edtOFDMCHDAC00;
  65.         TPanel *pnl2400MTXP;
  66.         TPanel *Panel2;
  67.         TPanel *pnlWGI;
  68.         TLabel *lblBBChipID;
  69.         TEdit *edtBBChipID;
  70.         TLabel *lblRFChipID;
  71.         TEdit *edtRFChipID;
  72.         TLabel *lblSN;
  73.         TEdit *edtSN;
  74.         TLabel *lblMACAddr;
  75.         TEdit *edtMACAddr5;
  76.         TPanel *pnlTXDC;
  77.         TPanel *Panel3;
  78.         TLabel *lblTXIDC0x;
  79.         TEdit *edtTXIDC;
  80.         TEdit *edtTXQDC;
  81.         TLabel *lblTXQDC0x;
  82.         TLabel *Label29;
  83.         TLabel *Label30;
  84.         TButton *btnWGI;
  85.         TButton *btnTXDC;
  86.         TButton *btn2400MTXP;
  87.         TLabel *lblBBChipID0x;
  88.         TLabel *lblRFChipID0x;
  89.         TLabel *lblSN0x;
  90.         TLabel *lblMACAddr0x;
  91.         TShape *Shape1;
  92.         TLabel *Label40;
  93.         TButton *btnUploadFromEEPROM;
  94.         TButton *btnDownloadToEEPROM;
  95.         TStatusBar *sbWiFiEEPROM;
  96.         TButton *btnSaveToFile;
  97.         TButton *btnLoadFromFile;
  98.         TStaticText *lblHint;
  99.         TTimer *HintTimer;
  100.         TSaveDialog *SaveDialog;
  101.         TOpenDialog *OpenDialog;
  102.         TEdit *edtMACAddr4;
  103.         TEdit *edtMACAddr3;
  104.         TEdit *edtMACAddr2;
  105.         TEdit *edtMACAddr1;
  106.         TEdit *edtMACAddr0;
  107.         TPanel *Panel1;
  108.         TPanel *Panel4;
  109.         TLabel *lblChecksum;
  110.         TEdit *edtChecksum;
  111.         TLabel *lblChecksum0x;
  112.         TEdit *edtCCKCHDAC0C;
  113.         TEdit *edtCCKCHDAC0D;
  114.         TLabel *Label1;
  115.         TLabel *Label2;
  116.         TEdit *edtOFDMCHDAC0C;
  117.         TEdit *edtOFDMCHDAC0D;
  118.         void __fastcall btnWGIClick(TObject *Sender);
  119.         void __fastcall btnTXDCClick(TObject *Sender);
  120.         void __fastcall btn2400MTXPClick(TObject *Sender);
  121.         void __fastcall edtRFChipIDCheck(TObject *Sender);
  122.         void __fastcall edtSNCheck(TObject *Sender);
  123.         void __fastcall edtBBChipIDCheck(TObject *Sender);
  124.         void __fastcall edtMACAddrCheck(TObject *Sender);
  125.         void __fastcall btnSaveToFileClick(TObject *Sender);
  126.         void __fastcall btnUploadFromEEPROMClick(TObject *Sender);
  127.         void __fastcall btnDownloadToEEPROMClick(TObject *Sender);
  128.         void __fastcall btnLoadFromFileClick(TObject *Sender);
  129.         void __fastcall FormShow(TObject *Sender);
  130.         void __fastcall HintTimerTimer(TObject *Sender);
  131. private: // User declarations
  132.         // common
  133.         bool    m_bInit;
  134.         WiFi_ChipCapability_S m_sWiFiCap;
  135.         CWIFIEE   m_WIFI_EE_Obj;
  136.         S_WIFI_EEPROM  m_sEE;
  137.         S_WIFI_EE_GENERAL    m_sEEGeneral;
  138.         WiFi_TxPower_2400M_S  m_sTxPwr2400M;
  139.         WiFi_TxPower_5000M_S  m_sTxPwr5000M;
  140.         unsigned short        m_usReserved3;
  141.        // WiFi_DAC_DC_Offset_S  m_sTxDcOffset;
  142.        // unsigned short m_usChecksum;
  143.         // UI
  144.         TEdit   *edtMACAddr[6];
  145.         TEdit   *edtCCKCHDAC[NUM_TX_POWER_2400M_CH];
  146.         TEdit   *edtOFDMCHDAC[NUM_TX_POWER_2400M_CH];
  147.         
  148. public: // User declarations
  149.         __fastcall TfrmWiFiEEPROM(TComponent* Owner);
  150.         void Init( void );
  151.         // UI
  152.         void  ReDrawFields( int idx );
  153.         bool  CheckFields( void );
  154.         void  CurrentPageReset( void );
  155.         void  CurrentPageLock( void );
  156.         void  ShowHintLabel( TControl *sender, char* hint );
  157.         // EEPROM read/write
  158.         void Compose_EEPROM_Data( void );
  159.         void DeCompose_EEPROM_Data( void );
  160.         // callback
  161.         void  ConfirmCallback_ReadEE( void );
  162.         void  ConfirmCallback_WriteEE( void );
  163. };
  164. //---------------------------------------------------------------------------
  165. extern PACKAGE TfrmWiFiEEPROM *frmWiFiEEPROM;
  166. //---------------------------------------------------------------------------
  167. #endif