📄 pctestview.cpp
字号:
// pctestView.cpp : implementation of the CPctestView class
//
#include "stdafx.h"
#include "pctest.h"
#include "ledloop.h"
#include "8255_J.h"
#include "pctestDoc.h"
#include "Ram.h"
#include "logic.h"
#include "pctestView.h"
#include "keyled.h"
#include "mty.h"
#include "readkey.h"
#include "ADdc.h"
#include "Key.h"
#include "serkey.h"
#include "frequd.h"
#include "pcout.h"
#include "mos.h"
#include "pci.h"
#include "buj.h"
#include "wen.h"
#include "Dcmot.h"
#include "dian.h"
#include "32bitout.h"
#include "dma.h"
//#include "pccontrol.h"
#include "pcoutdata.h"
#include "8255_J.h"
//#include "8253_J.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPctestView
HANDLE hDevice;
HANDLE hDevice2;
IMPLEMENT_DYNCREATE(CPctestView, CView)
BEGIN_MESSAGE_MAP(CPctestView, CView)
//{{AFX_MSG_MAP(CPctestView)
ON_COMMAND(IDC_ONE, OnOne)
ON_COMMAND(IDC_TWO, OnTwo)
ON_COMMAND(IDC_8255, On8255)
ON_COMMAND(IDC_8255_LED, On8255Led)
ON_COMMAND(IDC_FOUR, OnFour)
ON_COMMAND(IDC_PCKEY, OnPckey)
ON_COMMAND(IDC_DISPLAY_KEY, OnDisplayKey)
ON_COMMAND(IDC_8253, On8253)
ON_COMMAND(IDC_WAVE, OnWave)
ON_COMMAND(IDC_RAM, OnRam)
ON_COMMAND(IDC_INT, OnInt)
ON_COMMAND(IDC_8250, On8250)
ON_COMMAND(IDC_8255_KEYBOARD, On8255Keyboard)
ON_COMMAND(IDC_8259, On8259)
ON_COMMAND(IDC_0832, On0832)
ON_COMMAND(IDC_PCI, OnPci)
ON_COMMAND(ID_Bujin, OnBujin)
ON_COMMAND(ID_Cewen, OnCewen)
ON_COMMAND(ID_Dcmotor, OnDcmotor)
ON_COMMAND(ID_Dianzhen, OnDianzhen)
ON_COMMAND(ID_32BIT, On32bit)
ON_COMMAND(ID_DMA, OnDma)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPctestView construction/destruction
CPctestView::CPctestView()
{
// TODO: add construction code here
hDevice=NULL;
}
CPctestView::~CPctestView()
{
}
BOOL CPctestView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CPctestView drawing
void CPctestView::OnDraw(CDC* pDC)
{
CPctestDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CPctestView printing
BOOL CPctestView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CPctestView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CPctestView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CPctestView diagnostics
#ifdef _DEBUG
void CPctestView::AssertValid() const
{
CView::AssertValid();
}
void CPctestView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CPctestDoc* CPctestView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPctestDoc)));
return (CPctestDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CPctestView message handlers
void CPctestView::OnOne()
{
// TODO: Add your command handler code here
// CPCICONFI m_pic;
/// m_pic.m_buffers="0000";
// m_pic.m_IO1 ="0";
// m_pic.m_IO2="0";
// m_pic.m_IRQ=0;
// m_pic.DoModal();
}
void CPctestView::OnTwo()
{
// TODO: Add your command handler code here
//AfxInitRichEdit();
// CMaster m_mast;
// m_mast.m_select_way =0;
// int a=m_mast.DoModal ();
}
void CPctestView::On8255()
{
// TODO: Add your command handler code here
Clogic m_logic;
m_logic.DoModal ();
}
void CPctestView::On8255Led()
{
// TODO: Add your command handler code here
Cledloop m_led;
m_led.DoModal ();
}
void CPctestView::OnFour()
{
// TODO: Add your command handler code here
AfxInitRichEdit();
CADdc m_dc;
m_dc.m_ad=TRUE;
m_dc.DoModal ();
}
void CPctestView::OnPckey()
{
// TODO: Add your command handler code here
// CKey m_key;
// m_key.DoModal ();
}
void CPctestView::OnDisplayKey()
{
// TODO: Add your command handler code here
// Cserkey m_serkey;
// m_serkey.DoModal ();
}
void CPctestView::On8253()
{
// TODO: Add your command handler code here
Cfrequd m_duty;
m_duty.DoModal ();
}
void CPctestView::OnWave()
{
// TODO: Add your command handler code here
// Cwaveform m_wave;
// m_wave.DoModal ();
}
void CPctestView::OnRam()
{
// TODO: Add your command handler code here
CRam m_ram;
m_ram.DoModal ();
}
void CPctestView::OnInt()
{
// TODO: Add your command handler code here
AfxInitRichEdit();
CADdc m_dc;
m_dc.m_ad=FALSE;
m_dc.DoModal ();
}
void CPctestView::On8250()
{
// TODO: Add your command handler code here
Cpcoutdata m1;
m1.DoModal ();
}
void CPctestView::On8255Keyboard()
{
// TODO: Add your command handler code here
Creadkey m_readkey;
m_readkey.DoModal();
}
void CPctestView::On8259()
{
// TODO: Add your command handler code here
Cmty m;
m.DoModal();
}
void CPctestView::On0832()
{
// TODO: Add your command handler code here
Cmos ms;
ms.DoModal();
}
void CPctestView::OnPci()
{
// TODO: Add your command handler code here
Cpci n;
n.DoModal();
}
void CPctestView::OnBujin()
{
// TODO: Add your command handler code here
Cbuj bujin1;
bujin1.DoModal();
}
void CPctestView::OnCewen()
{
// TODO: Add your command handler code here
Cwen wendu1;
wendu1.DoModal();
}
void CPctestView::OnDcmotor()
{
// TODO: Add your command handler code here
Dcmot dcm1;
dcm1.DoModal();
}
void CPctestView::OnDianzhen()
{
// TODO: Add your command handler code here
Cdian dianzhen1;
dianzhen1.DoModal();
}
void CPctestView::On32bit()
{
// TODO: Add your command handler code here
C32bitout dlg;
dlg.DoModal();
}
void CPctestView::OnDma()
{
// TODO: Add your command handler code here
CDMA dlg;
dlg.DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -