form_PMICReg.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:2k
- //---------------------------------------------------------------------------
- #ifndef _FORM_PMICREG_H_
- #define _FORM_PMICREG_H_
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Forms.hpp>
- #include <ComCtrls.hpp>
- #include <ExtCtrls.hpp>
- #ifndef _BB_PMIC_REG_H_
- #include "bb_pmic_reg.h"
- #endif
- typedef struct
- {
- TLabel *lblPMICRegName;
- TStaticText *stPMICRegName;
- TLabel *lblPMICRegAddr;
- TStaticText *stPMICRegAddr;
- TLabel *lblPMICRegValue0X;
- TLabel *lblPMICRegValue;
- TEdit *edtPMICValue;
- TButton *btnPMICRegRead;
- TButton *btnPMICRegWrite;
- }S_PMIC_REG_UI_T;
- //---------------------------------------------------------------------------
- class TfrmPMICReg : public TForm
- {
- __published: // IDE-managed Components
- TStatusBar *sbPMICReg;
- TTimer *HintTimer;
- TStaticText *lblHint;
- void __fastcall FormActivate(TObject *Sender);
- void __fastcall FormCreate(TObject *Sender);
- void __fastcall HintTimerTimer(TObject *Sender);
- void __fastcall FormDestroy(TObject *Sender);
-
- private: // User declarations
- bool m_bInit;
- PMIC_ID m_sPmicId;
- int m_iTag;
- unsigned int m_uiPMICRegAddr;
- unsigned short m_usPMICRegValue;
- CBBPMICREG m_cBB_PMIC_REG_Obj;
- vector<S_BB_PMIC_REG_T> *m_pvPmicReg;
- vector<S_PMIC_REG_UI_T> *m_pvPmicRegUI;
-
- public: // User declarations
- __fastcall TfrmPMICReg(TComponent* Owner);
- void Init(void);
- void Display_PMICRegister(void);
- bool CheckFields(int tag);
- void ReDrawFields(int tag);
- void ShowHintLabel(TControl *sender, char* hint);
- void __fastcall edtPMICValueCheck(TObject *Sender);
- void __fastcall btnPMICRegReadClick(TObject *Sender);
- void PMIC_ReadRegister_Done(void);
- void __fastcall btnPMICRegWriteClick(TObject *Sender);
- void PMIC_WriteRegister_Done(void);
- // vector
- void AllocateVector(void);
- void DeAllocateVector(void);
- void EraseVector(void);
- };
- //---------------------------------------------------------------------------
- extern PACKAGE TfrmPMICReg *frmPMICReg;
- //---------------------------------------------------------------------------
- #endif