ReactOS  0.4.14-dev-50-g13bb5e2
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 302 of file dma_slave.cpp.

307 {
308  ULONG Length;
310 
311  Length = This->m_MapSize;
312  This->m_MapRegisterBase = MapRegisterBase;
313 
314  This->m_pAdapter->DmaOperations->MapTransfer(This->m_pAdapter,
315  This->m_Mdl,
317  (PVOID)((ULONG_PTR)This->m_Mdl->StartVa + This->m_Mdl->ByteOffset),
318  &Length,
319  This->m_WriteToDevice);
320 
321  if (Length == This->m_BufferSize)
322  {
323  This->m_DmaStarted = TRUE;
324  }
325 
326  return KeepObject;
327 }
#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 491 of file dma_slave.cpp.

497 {
500 
501  DPRINT("OutDmaChannel %p OuterUnknown %p PoolType %p DeviceDescription %p DeviceObject %p\n",
502  OutDmaChannel, OuterUnknown, PoolType, DeviceDescription, DeviceObject);
503 
504  This = new(PoolType, TAG_PORTCLASS)CDmaChannelInit(OuterUnknown);
505  if (!This)
507 
508  Status = This->QueryInterface(IID_IDmaChannel, (PVOID*)OutDmaChannel);
509 
510  if (!NT_SUCCESS(Status))
511  {
512  delete This;
513  return Status;
514  }
515 
517 
518  if (!NT_SUCCESS(Status))
519  {
520  delete This;
521  return Status;
522  }
523 
524  return Status;
525 }
#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.