ReactOS  0.4.13-dev-544-gede3fdd
dma_slave.cpp File Reference
#include "private.hpp"
#include <debug.h>
Include dependency graph for dma_slave.cpp:

Go to the source code of this file.

Classes

class  CDmaChannelInit
 

Macros

#define NDEBUG
 

Functions

IO_ALLOCATION_ACTION NTAPI AdapterControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID MapRegisterBase, IN PVOID Context)
 
NTSTATUS NTAPI PcNewDmaChannel (OUT PDMACHANNEL *OutDmaChannel, IN PUNKNOWN OuterUnknown OPTIONAL, IN POOL_TYPE PoolType, IN PDEVICE_DESCRIPTION DeviceDescription, IN PDEVICE_OBJECT DeviceObject)
 

Variables

GUID IID_IDmaChannelSlave
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file dma_slave.cpp.

Function Documentation

◆ AdapterControl()

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

Definition at line 289 of file dma_slave.cpp.

294 {
295  ULONG Length;
297 
298  Length = This->m_MapSize;
299  This->m_MapRegisterBase = MapRegisterBase;
300 
301  This->m_pAdapter->DmaOperations->MapTransfer(This->m_pAdapter,
302  This->m_Mdl,
304  (PVOID)((ULONG_PTR)This->m_Mdl->StartVa + This->m_Mdl->ByteOffset),
305  &Length,
306  This->m_WriteToDevice);
307 
308  if (Length == This->m_BufferSize)
309  {
310  This->m_DmaStarted = TRUE;
311  }
312 
313  return KeepObject;
314 }
#define TRUE
Definition: types.h:120
uint32_t ULONG_PTR
Definition: typedefs.h:63
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_Inout_ struct _IRP _In_ PVOID MapRegisterBase
Definition: iotypes.h:189
unsigned int ULONG
Definition: retypes.h:1

◆ PcNewDmaChannel()

NTSTATUS NTAPI PcNewDmaChannel ( OUT PDMACHANNEL OutDmaChannel,
IN PUNKNOWN OuterUnknown  OPTIONAL,
IN POOL_TYPE  PoolType,
IN PDEVICE_DESCRIPTION  DeviceDescription,
IN PDEVICE_OBJECT  DeviceObject 
)

Definition at line 478 of file dma_slave.cpp.

484 {
487 
488  DPRINT("OutDmaChannel %p OuterUnknown %p PoolType %p DeviceDescription %p DeviceObject %p\n",
489  OutDmaChannel, OuterUnknown, PoolType, DeviceDescription, DeviceObject);
490 
491  This = new(PoolType, TAG_PORTCLASS)CDmaChannelInit(OuterUnknown);
492  if (!This)
494 
495  Status = This->QueryInterface(IID_IDmaChannel, (PVOID*)OutDmaChannel);
496 
497  if (!NT_SUCCESS(Status))
498  {
499  delete This;
500  return Status;
501  }
502 
504 
505  if (!NT_SUCCESS(Status))
506  {
507  delete This;
508  return Status;
509  }
510 
511  return Status;
512 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define TAG_PORTCLASS
Definition: private.hpp:24
LONG NTSTATUS
Definition: precomp.h:26
void DPRINT(...)
Definition: polytest.cpp:61
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION DeviceDescription
Definition: iofuncs.h:1015
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444

Variable Documentation

◆ IID_IDmaChannelSlave

GUID IID_IDmaChannelSlave

Definition at line 17 of file port_wavecyclic.cpp.