📄 ezmrview.h
字号:
////////////////////////////////////////////////////////////////////////////////
// EzMrView.h : interface of the CEzMrView class
// $Header: /USB/Util/EzMr/EzMrView.h 10 3/07/02 11:18p Tpm $
// Copyright (c) 2000 Cypress Semiconductor. May not be reproduced without permission.
// See the EzUsb Developer's Kit license agreement for more details.
////////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_EZMRVIEW_H__48EF15AF_65B1_11D1_8E2A_0060089D04CA__INCLUDED_)
#define AFX_EZMRVIEW_H__48EF15AF_65B1_11D1_8E2A_0060089D04CA__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
class CEzMrCntrItem;
//#define MAX_INTEL_HEX_RECORD_LENGTH 16
#define MAX_INTEL_HEX_RECORD_LENGTH 4096
typedef struct _INTEL_HEX_RECORD
{
WORD Length;
WORD Address;
BYTE Type;
BYTE Data[MAX_INTEL_HEX_RECORD_LENGTH];
} INTEL_HEX_RECORD, *PINTEL_HEX_RECORD;
class CEzMrView : public CRichEditView
{
protected: // create from serialization only
CEzMrView();
DECLARE_DYNCREATE(CEzMrView)
CFont m_CFont;
LOGFONT m_lf;
// Attributes
public:
CEzMrDoc* GetDocument();
char* GetDrv(){return((LPTSTR)(LPCTSTR)((CEzMrFrame*)GetParentFrame())->m_strDrv[((CEzMrFrame*)GetParentFrame())->m_SelDrv]);}
void SetDrv(int nSelDrv){((CEzMrFrame*)GetParentFrame())->m_SelDrv=nSelDrv;((CEzMrFrame*)GetParentFrame())->m_CBoxDrv.SetCurSel(nSelDrv);
GetDocument()->SetTitle(GetDrv()); Invalidate(TRUE);}
void UpdDrv();
void SendOp(int OpNum);
int bMainDlgProcThread(char* pcDriverName, CRichEditCtrl* hOutputBox, HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
void LoadLoopTest();
int LoadEEPROM();
void AbortPendingOps(void);
void LoopOut();
void LoopIn();
char* GetBlkBuf();
int m_nLoopTimerID;
CString m_strDldFile;
DWORD m_dldOffset;
CString m_strTransFile;
void LoadFile(CString strDldFile);
int intel_in(FILE *fpIn, TMemCache* pMemCache, DWORD &ioOffset, char endianFlags, BOOLEAN spaces);
int m_DldLen;
void Ezusb_DownloadIntelHex(PINTEL_HEX_RECORD pHexRecord);
CString m_strLastLoadedFile;
int m_nOpsPending;
int m_nOpsCount;
CThreadInfo* m_pTh[MAX_OPS_PENDING];
// Operations
public:
int m_nLooping;
int m_nGotPipeInfo;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CEzMrView)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CEzMrView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
DWORD timerID;
HWND m_hMain;
// Generated message map functions
//protected:
public:
//{{AFX_MSG(CEzMrView)
afx_msg void OnDestroy();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnIDC_RELOAD();
afx_msg void OnUpdateIDC_RELOAD(CCmdUI* pCmdUI);
afx_msg void OnUpdateTargetSel(CCmdUI* pCmdUI);
//}}AFX_MSG
protected:
afx_msg void OnOpsSend(); //TPMDo: Add ToolBar manually
afx_msg void OnOpsClear();
afx_msg void On_8051_HOLD();
afx_msg void On_8051_RUN();
afx_msg void On_LOAD_MON();
afx_msg void OnStatTextButton(); //TPMDo: Add ToolBar manually
afx_msg void OnIDC_EZ_LOOP();
afx_msg void OnUpdateIDC_EZ_LOOP(CCmdUI* pCmdUI);
afx_msg void OnIDC_EPROM_LD();
afx_msg void OnIDC_GET_DD();
afx_msg void OnIDC_GET_CD();
afx_msg void OnIDC_GET_PI();
afx_msg void OnIDC_DOWN_LOAD();
afx_msg void OnID_BBLK_LBL();
afx_msg void OnID_BVEN_LBL();
afx_msg void OnID_BISO_LBL();
afx_msg void OnID_BRES_LBL();
afx_msg void OnID_BCFG_LBL();
afx_msg void OnIDC_RESET_PIPE();
afx_msg void OnIDC_ABORT_PIPE();
afx_msg void OnIDC_FILE_TRANS();
afx_msg void OnIDC_ABORT_ALL();
afx_msg void OnIDC_GET_URB_STAT();
afx_msg void OnIDC_GET_SD();
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in EzMrView.cpp
inline CEzMrDoc* CEzMrView::GetDocument()
{ return (CEzMrDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_EZMRVIEW_H__48EF15AF_65B1_11D1_8E2A_0060089D04CA__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -