📄 fengdlg.h
字号:
// FengDlg.h : header file
//
#if !defined(AFX_FENGDLG_H__D0CD2CCB_C0D4_4F70_84A2_0AF2CD37B926__INCLUDED_)
#define AFX_FENGDLG_H__D0CD2CCB_C0D4_4F70_84A2_0AF2CD37B926__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#ifdef __cplusplus
extern "C"
{
#endif
BOOL VirtualCopy( LPVOID, LPVOID, DWORD, DWORD );
//CMAMADEDlg ABC;
#ifdef __cplusplus
}
#endif
#define ADC_BASE 0xB1800000 // 0x58000000
typedef struct {
unsigned int rADCCON;
unsigned int rADCTSC;
unsigned int rADCDLY;
unsigned int rADCDAT0;
unsigned int rADCDAT1;
}ADCreg ;
typedef struct info{
HWND hwnd;//窗口句柄
int speed;//小球运动速度
int X;//小球X轴坐标
int Y;//小球Y轴坐标
int radium;//小球半径
CRect rect;//小球所在区域,便于重绘
}Ballinfo,*LPINFO;//小球属性结构
#define PWM_BASE 0xB1100000 // 0x51000000
typedef struct {
unsigned int rTCFG0;//00
unsigned int rTCFG1;//04
unsigned int rTCON;//08
unsigned int rTCNTB0;//0C
unsigned int rTCMPB0;//10
unsigned int rTCNTO0;//14
unsigned int rTCNTB1;
unsigned int rTCMPB1;
unsigned int rTCNTO1;
unsigned int rTCNTB2;
unsigned int rTCMPB2;
unsigned int rTCNTO2;
unsigned int rTCNTB3;
unsigned int rTCMPB3;
unsigned int rTCNTO3;
unsigned int rTCNTB4;
unsigned int rTCNTO4;
}PWMreg ;
#define IOP_BASE 0xB1600000 // 0x56000000
typedef struct {
unsigned int rGPACON; // 00
unsigned int rGPADAT;
unsigned int rPAD1[2];
unsigned int rGPBCON; // 10
unsigned int rGPBDAT;
unsigned int rGPBUP;
unsigned int rPAD2;
unsigned int rGPCCON; // 20
unsigned int rGPCDAT;
unsigned int rGPCUP;
unsigned int rPAD3;
unsigned int rGPDCON; // 30
unsigned int rGPDDAT;
unsigned int rGPDUP;
unsigned int rPAD4;
unsigned int rGPECON; // 40
unsigned int rGPEDAT;
unsigned int rGPEUP;
unsigned int rPAD5;
unsigned int rGPFCON; // 50
unsigned int rGPFDAT;
unsigned int rGPFUP;
unsigned int rPAD6;
unsigned int rGPGCON; // 60
unsigned int rGPGDAT;
unsigned int rGPGUP;
unsigned int rPAD7;
unsigned int rGPHCON; // 70
unsigned int rGPHDAT;
unsigned int rGPHUP;
unsigned int rPAD8;
unsigned int rMISCCR; // 80
unsigned int rDCKCON;
unsigned int rEXTINT0;
unsigned int rEXTINT1;
unsigned int rEXTINT2; // 90
unsigned int rEINTFLT0;
unsigned int rEINTFLT1;
unsigned int rEINTFLT2;
unsigned int rEINTFLT3; // A0
unsigned int rEINTMASK;
unsigned int rEINTPEND;
unsigned int rGSTATUS0; // AC
unsigned int rGSTATUS1; // B0
unsigned int rGSTATUS2; // B4
unsigned int rGSTATUS3; // B8
unsigned int rGSTATUS4; // BC
}IOPreg;
#define CLKPWR_BASE 0xB0C00000 // 0x4C000000
typedef struct {
unsigned long rLOCKTIME;//00
unsigned long rMPLLCON;//04
unsigned long rUPLLCON;//08
unsigned long rCLKCON;//0C
unsigned long rCLKSLOW;//10
unsigned long rCLKDIVN;//14
}CLKPWRreg;
/////////////////////////////////////////////////////////////////////////////
// CFengDlg dialog
class CFengDlg : public CDialog
{
// Construction
public:
CFengDlg(CWnd* pParent = NULL); // standard constructor
volatile ADCreg *v_pADCRegs;
unsigned int usConData;
volatile CLKPWRreg *v_pCLKPWRegs;
volatile IOPreg *v_pIOPRegs;
volatile PWMreg *v_pPWMRegs;
// Dialog Data
//{{AFX_DATA(CFengDlg)
enum { IDD = IDD_FENG_DIALOG };
// CStatic m_MoveFrame;
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFengDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
Ballinfo Blueball;//定义蓝色小球
Ballinfo Redball;
Ballinfo Watchball;
HANDLE BlueThread;
HANDLE RedThread;
HANDLE WatchThread;
// BOOL ISBLUE;//蓝色小球判断
// BOOL ISRED;
// CRect MoveRect;
// Generated message map functions
//{{AFX_MSG(CFengDlg)
virtual BOOL OnInitDialog();
afx_msg void OnButton1();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FENGDLG_H__D0CD2CCB_C0D4_4F70_84A2_0AF2CD37B926__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -