ReactOS 0.4.15-dev-7934-g1dc8d80
CDmaChannelInit Class Reference
Inheritance diagram for CDmaChannelInit:
Collaboration diagram for CDmaChannelInit:

Public Member Functions

PVOID operator new (size_t Size, POOL_TYPE PoolType, ULONG Tag)
 
STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 CDmaChannelInit (IUnknown *OuterUnknown)
 
virtual ~CDmaChannelInit ()
 
- Public Member Functions inherited from CUnknownImpl< IDmaChannelInit >
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 

Public Attributes

 IMP_IDmaChannelInit
 

Protected Attributes

PDEVICE_OBJECT m_pDeviceObject
 
PDMA_ADAPTER m_pAdapter
 
BOOL m_DmaStarted
 
ULONG m_MapSize
 
PVOID m_MapRegisterBase
 
ULONG m_LastTransferCount
 
ULONG m_MaximumBufferSize
 
ULONG m_MaxMapRegisters
 
ULONG m_AllocatedBufferSize
 
ULONG m_BufferSize
 
PHYSICAL_ADDRESS m_Address
 
PVOID m_Buffer
 
PMDL m_Mdl
 
BOOLEAN m_WriteToDevice
 

Friends

IO_ALLOCATION_ACTION NTAPI AdapterControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID MapRegisterBase, IN PVOID Context)
 

Additional Inherited Members

- Protected Member Functions inherited from CUnknownImpl< IDmaChannelInit >
 CUnknownImpl ()
 
virtual ~CUnknownImpl ()
 

Detailed Description

Definition at line 14 of file dma_slave.cpp.

Constructor & Destructor Documentation

◆ CDmaChannelInit()

CDmaChannelInit::CDmaChannelInit ( IUnknown OuterUnknown)
inline

Definition at line 30 of file dma_slave.cpp.

30 :
31 m_pDeviceObject(nullptr),
32 m_pAdapter(nullptr),
34 m_MapSize(0),
35 m_MapRegisterBase(nullptr),
40 m_BufferSize(0),
41 m_Address({0}),
42 m_Buffer(nullptr),
43 m_Mdl(nullptr),
45 {
46 }
PVOID m_MapRegisterBase
Definition: dma_slave.cpp:57
ULONG m_LastTransferCount
Definition: dma_slave.cpp:59
PHYSICAL_ADDRESS m_Address
Definition: dma_slave.cpp:66
PDEVICE_OBJECT m_pDeviceObject
Definition: dma_slave.cpp:51
PDMA_ADAPTER m_pAdapter
Definition: dma_slave.cpp:52
ULONG m_BufferSize
Definition: dma_slave.cpp:64
ULONG m_MaxMapRegisters
Definition: dma_slave.cpp:62
ULONG m_AllocatedBufferSize
Definition: dma_slave.cpp:63
BOOLEAN m_WriteToDevice
Definition: dma_slave.cpp:69
ULONG m_MaximumBufferSize
Definition: dma_slave.cpp:61
#define FALSE
Definition: types.h:117

◆ ~CDmaChannelInit()

virtual CDmaChannelInit::~CDmaChannelInit ( )
inlinevirtual

Definition at line 47 of file dma_slave.cpp.

47{}

Member Function Documentation

◆ operator new()

PVOID CDmaChannelInit::operator new ( size_t  Size,
POOL_TYPE  PoolType,
ULONG  Tag 
)
inline

Definition at line 19 of file dma_slave.cpp.

23 {
25 }
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

◆ QueryInterface()

NTSTATUS NTAPI CDmaChannelInit::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

Definition at line 82 of file dma_slave.cpp.

85{
86 if (IsEqualGUIDAligned(refiid, IID_IUnknown) ||
87 IsEqualGUIDAligned(refiid, IID_IDmaChannel))
88 //IsEqualGUIDAligned(refiid, IID_IDmaChannelSlave)) // HACK
89 {
90 *Output = PVOID(PUNKNOWN(this));
91 PUNKNOWN(*Output)->AddRef();
92 return STATUS_SUCCESS;
93 }
94 DPRINT("No interface!!!\n");
96}
const GUID IID_IUnknown
IUnknown * PUNKNOWN
Definition: com_apitest.h:45
ULONG AddRef()
@ Output
Definition: arc.h:85
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:71
void * PVOID
Definition: typedefs.h:50
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:235

Friends And Related Function Documentation

◆ AdapterControl

IO_ALLOCATION_ACTION NTAPI AdapterControl ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp,
IN PVOID  MapRegisterBase,
IN PVOID  Context 
)
friend

Definition at line 290 of file dma_slave.cpp.

295{
298
299 Length = This->m_MapSize;
300 This->m_MapRegisterBase = MapRegisterBase;
301
302 This->m_pAdapter->DmaOperations->MapTransfer(This->m_pAdapter,
303 This->m_Mdl,
305 (PVOID)((ULONG_PTR)This->m_Mdl->StartVa + This->m_Mdl->ByteOffset),
306 &Length,
307 This->m_WriteToDevice);
308
309 if (Length == This->m_BufferSize)
310 {
311 This->m_DmaStarted = TRUE;
312 }
313
314 return KeepObject;
315}
#define TRUE
Definition: types.h:120
#define ULONG_PTR
Definition: config.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
uint32_t ULONG
Definition: typedefs.h:59
_Inout_ struct _IRP _In_ PVOID MapRegisterBase
Definition: iotypes.h:213
@ KeepObject
Definition: iotypes.h:202

Member Data Documentation

◆ IMP_IDmaChannelInit

CDmaChannelInit::IMP_IDmaChannelInit

Definition at line 29 of file dma_slave.cpp.

◆ m_Address

PHYSICAL_ADDRESS CDmaChannelInit::m_Address
protected

Definition at line 66 of file dma_slave.cpp.

◆ m_AllocatedBufferSize

ULONG CDmaChannelInit::m_AllocatedBufferSize
protected

Definition at line 63 of file dma_slave.cpp.

◆ m_Buffer

PVOID CDmaChannelInit::m_Buffer
protected

Definition at line 67 of file dma_slave.cpp.

◆ m_BufferSize

ULONG CDmaChannelInit::m_BufferSize
protected

Definition at line 64 of file dma_slave.cpp.

◆ m_DmaStarted

BOOL CDmaChannelInit::m_DmaStarted
protected

Definition at line 54 of file dma_slave.cpp.

◆ m_LastTransferCount

ULONG CDmaChannelInit::m_LastTransferCount
protected

Definition at line 59 of file dma_slave.cpp.

◆ m_MapRegisterBase

PVOID CDmaChannelInit::m_MapRegisterBase
protected

Definition at line 57 of file dma_slave.cpp.

◆ m_MapSize

ULONG CDmaChannelInit::m_MapSize
protected

Definition at line 56 of file dma_slave.cpp.

◆ m_MaximumBufferSize

ULONG CDmaChannelInit::m_MaximumBufferSize
protected

Definition at line 61 of file dma_slave.cpp.

◆ m_MaxMapRegisters

ULONG CDmaChannelInit::m_MaxMapRegisters
protected

Definition at line 62 of file dma_slave.cpp.

◆ m_Mdl

PMDL CDmaChannelInit::m_Mdl
protected

Definition at line 68 of file dma_slave.cpp.

◆ m_pAdapter

PDMA_ADAPTER CDmaChannelInit::m_pAdapter
protected

Definition at line 52 of file dma_slave.cpp.

◆ m_pDeviceObject

PDEVICE_OBJECT CDmaChannelInit::m_pDeviceObject
protected

Definition at line 51 of file dma_slave.cpp.

◆ m_WriteToDevice

BOOLEAN CDmaChannelInit::m_WriteToDevice
protected

Definition at line 69 of file dma_slave.cpp.


The documentation for this class was generated from the following file: