📄 mmdevice.h
字号:
// mmdevice.h - include file for example driver, device class
//=============================================================================
//
// Compuware Corporation
// NuMega Lab
// 9 Townsend West
// Nashua, NH 03060 USA
//
// Copyright (c) 1998 Compuware Corporation. All Rights Reserved.
// Unpublished - rights reserved under the Copyright laws of the
// United States.
//
//=============================================================================
#include "genport.h"
class MapMemDevice : public KDevice
{
SAFE_DESTRUCTORS
public:
MapMemDevice(void);
~MapMemDevice(void);
DEVMEMBER_DISPATCHERS
//KResourceRequest ResReq; // (Isa,0,0);
MEMBER_ISR (MapMemDevice, Isr)
MEMBER_DPC (MapMemDevice, Dpc)
DEVMEMBER_SYNCHCRITSECTION (MapMemDevice, TestAndClearNotifyApp)
DEVMEMBER_SYNCHCRITSECTION (MapMemDevice, ReadTimeFifo)
MEMBER_ISR (MapMemDevice, Isr1)
MEMBER_DPC (MapMemDevice, Dpc1)
DEVMEMBER_SYNCHCRITSECTION (MapMemDevice, TestAndClearNotifyApp1)
DEVMEMBER_SYNCHCRITSECTION (MapMemDevice, ReadTimeFifo1)
#ifdef __COMMENT_ONLY
// The following member functions are actually defined by the
// a DEVMEMBER_XXX macro (such as DEVMEMBER_DISPATCHERS).
// The macro __COMMENT_ONLY never gets defined. These comment-only
// definitions simply allow easy navigation to the functions within
// the Developer Studio using the class browser.
BOOLEAN Isr(void); // COMMENT_ONLY
VOID Dpc(PVOID Arg1, PVOID Arg2); // COMMENT_ONLY
BOOLEAN TestAndClearNotifyApp(PVOID pIrp); // COMMENT_ONLY
BOOLEAN ReadTimeFifo(PVOID pIrp); // COMMENT_ONLY
BOOLEAN Isr1(void); // COMMENT_ONLY0
VOID Dpc1(PVOID Arg1, PVOID Arg2); // COMMENT_ONLY
BOOLEAN TestAndClearNotifyApp1(PVOID pIrp); // COMMENT_ONLY
BOOLEAN ReadTimeFifo1(PVOID pIrp); // COMMENT_ONLY
virtual NTSTATUS CleanUp(KIrp I); // COMMENT_ONLY
virtual NTSTATUS Create(KIrp I); // COMMENT_ONLY
virtual NTSTATUS Close(KIrp I); // COMMENT_ONLY
virtual NTSTATUS DeviceControl(KIrp I); // COMMENT_ONLY
#endif
protected:
KInterrupt m_Interrupt;
PFILE_OBJECT m_File;
KEvent* m_pEvent;
KDeferredCall m_Dpc;
KFifo<TIMESTAMP> m_TimeStampFifo;
BOOLEAN m_bNotifyApp;
ULONG m_InterruptCount;
KInterrupt m_Interrupt1;
PFILE_OBJECT m_File1;
KEvent* m_pEvent1;
KDeferredCall m_Dpc1;
KFifo<TIMESTAMP> m_TimeStampFifo1;
BOOLEAN m_bNotifyApp1;
ULONG m_InterruptCount1;
KEvent m_Exclusive;
PHYSICAL_ADDRESS m_BusPhysicalAddress; // address of device
ULONG m_WindowSize; // size of device memory window
BOOLEAN PortInList(GenericPort* pPort);
KList<GenericPort> m_PortList;
};
#define CAN2_IRQ 11
#define CAN1_IRQ 7
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -