scsi_accel_dma.h 621 B

12345678910111213141516171819202122
  1. // SCSI subroutines that use hardware DMA for transfer in the background.
  2. #pragma once
  3. #include <stdint.h>
  4. #include "AzulSCSI_platform.h"
  5. #ifdef SCSI_TIMER
  6. #define SCSI_ACCEL_DMA_AVAILABLE 1
  7. #endif
  8. void scsi_accel_dma_init();
  9. void scsi_accel_dma_startWrite(const uint8_t* data, uint32_t count, volatile int *resetFlag);
  10. void scsi_accel_dma_stopWrite();
  11. void scsi_accel_dma_finishWrite(volatile int *resetFlag);
  12. // Query whether the data at pointer has already been read, i.e. buffer can be reused.
  13. // If data is NULL, checks if all writes have completed.
  14. bool scsi_accel_dma_isWriteFinished(const uint8_t* data);