ReactOS  0.4.15-dev-4574-g434cf85
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 297 of file dma_slave.cpp.

302 {
303  ULONG Length;
305 
306  Length = This->m_MapSize;
307  This->m_MapRegisterBase = MapRegisterBase;
308 
309  This->m_pAdapter->DmaOperations->MapTransfer(This->m_pAdapter,
310  This->m_Mdl,
312  (PVOID)((ULONG_PTR)This->m_Mdl->StartVa + This->m_Mdl->ByteOffset),
313  &Length,
314  This->m_WriteToDevice);
315 
316  if (Length == This->m_BufferSize)
317  {
318  This->m_DmaStarted = TRUE;
319  }
320 
321  return KeepObject;
322 }
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define TRUE
Definition: types.h:120
uint32_t ULONG_PTR
Definition: typedefs.h:65
_Inout_ struct _IRP _In_ PVOID MapRegisterBase
Definition: iotypes.h:212
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 486 of file dma_slave.cpp.

492 {
495 
496  DPRINT("OutDmaChannel %p OuterUnknown %p PoolType %p DeviceDescription %p DeviceObject %p\n",
497  OutDmaChannel, OuterUnknown, PoolType, DeviceDescription, DeviceObject);
498 
499  This = new(PoolType, TAG_PORTCLASS)CDmaChannelInit(OuterUnknown);
500  if (!This)
502 
503  Status = This->QueryInterface(IID_IDmaChannel, (PVOID*)OutDmaChannel);
504 
505  if (!NT_SUCCESS(Status))
506  {
507  delete This;
508  return Status;
509  }
510 
512 
513  if (!NT_SUCCESS(Status))
514  {
515  delete This;
516  return Status;
517  }
518 
519  return Status;
520 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define TAG_PORTCLASS
Definition: private.hpp:24
LONG NTSTATUS
Definition: precomp.h:26
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceDescription
Definition: wdfpdo.h:430
Status
Definition: gdiplustypes.h:24
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3810
#define DPRINT
Definition: sndvol32.h:71

Variable Documentation

◆ IID_IDmaChannelSlave

GUID IID_IDmaChannelSlave

Definition at line 17 of file port_wavecyclic.cpp.