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

MTK

开发平台:

C++ Builder

  1. //---------------------------------------------------------------------------
  2. #ifndef _FORM_RFREG_H_
  3. #define _FORM_RFREG_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. #ifndef  _RF_REG_H_
  12. #include "rf_reg.h"
  13. #endif
  14. typedef struct
  15. {
  16.     TLabel *lblRFRegName;
  17.     TStaticText *stRFRegName;
  18.     TLabel *lblRFRegAddr;
  19.     TStaticText *stRFRegAddr;
  20.     //TLabel *lblRFRegValue0X;
  21.     TLabel *lblRFReadBsiData;
  22.     TEdit *edtRFReadBsiData;
  23.     TLabel *lblRFWriteBsiData;
  24.     TEdit *edtRFWriteBsiData;
  25.     TButton *btnRFRegRead;
  26.     TButton *btnRFRegWrite;
  27. }S_RF_REG_UI_T;
  28. //---------------------------------------------------------------------------
  29. class TfrmRFReg : public TForm
  30. {
  31. __published: // IDE-managed Components
  32.         TStatusBar *m_sbRfReg;
  33.         TStaticText *lblHint;
  34.         TTimer *HintTimer;
  35.         void __fastcall FormCreate(TObject *Sender);
  36.         void __fastcall FormActivate(TObject *Sender);
  37.         void __fastcall FormDestroy(TObject *Sender);
  38.         void __fastcall HintTimerTimer(TObject *Sender);
  39. private: // User declarations
  40.         bool    m_bInit;
  41.         unsigned int m_ui2GRfId;
  42.         int     m_iTag;
  43.         unsigned int m_uiBsiAddr;
  44.         unsigned int m_uiBsiData;
  45.         CRFREG m_cRF_REG_Obj;
  46.         vector<S_RF_REG_T> *m_pvRfReg;
  47.         vector<S_RF_REG_UI_T> *m_pvRfRegUI;
  48.         
  49. public: // User declarations
  50.         __fastcall TfrmRFReg(TComponent* Owner);
  51.         void Init(void);
  52.         void Display_RfRegister(void);
  53.         bool CheckFields(E_RF_REG_OP_T e_op, int tag);
  54.         void ReDrawFields(int tag);
  55.         void ShowHintLabel(TControl *sender, char* hint);
  56.         void __fastcall edtRfValueCheck(TObject *Sender);
  57.         void __fastcall btnRfRegReadClick(TObject *Sender);
  58.         void RF_ReadRegister_Done(void);
  59.         void __fastcall btnRfRegWriteClick(TObject *Sender);
  60.         void RF_WriteRegister_Done(void);
  61.         // vector
  62.         void  AllocateVector(void);
  63.         void  DeAllocateVector(void);
  64.         void  EraseVector(void);
  65. };
  66. //---------------------------------------------------------------------------
  67. extern PACKAGE TfrmRFReg *frmRFReg;
  68. //---------------------------------------------------------------------------
  69. #endif