ReactOS 0.4.15-dev-7931-gfd331f1
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 11 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 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

◆ 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 479 of file dma_slave.cpp.

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

Variable Documentation

◆ IID_IDmaChannelSlave

GUID IID_IDmaChannelSlave
extern

Definition at line 14 of file port_wavecyclic.cpp.