Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
876 B

  1. typedef struct _DMA_UTIL {
  2. NDIS_HANDLE NdisDmaHandle;
  3. PNDIS_BUFFER Buffer;
  4. ULONG Offset;
  5. ULONG Length;
  6. BOOLEAN Direction;
  7. } DMA_UTIL, *PDMA_UTIL;
  8. VOID
  9. InitializeDmaUtil(
  10. PDMA_UTIL DmaUtil,
  11. NDIS_HANDLE DmaHandle
  12. );
  13. NTSTATUS
  14. StartDmaTransfer(
  15. PDMA_UTIL DmaUtil,
  16. PNDIS_BUFFER Buffer,
  17. ULONG Offset,
  18. ULONG Length,
  19. BOOLEAN ToDevice
  20. );
  21. NTSTATUS
  22. CompleteDmaTransfer(
  23. PDMA_UTIL DmaUtil,
  24. BOOLEAN ToDevice
  25. );
  26. #define StartDmaTransferToDevice(_h,_b,_o,_l) StartDmaTransfer(_h,_b,_o,_l,TRUE)
  27. #define StartDmaTransferFromDevice(_h,_b,_o,_l) StartDmaTransfer(_h,_b,_o,_l,FALSE)
  28. #define CompleteDmaTransferToDevice(_h) CompleteDmaTransfer(_h,TRUE)
  29. #define CompleteDmaTransferFromDevice(_h) CompleteDmaTransfer(_h,FALSE)