scsi_accel_dma.h 733 B

1234567891011121314151617181920212223
  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. // TODO: This works, but without external logic does not improve performance compared
  7. // to software bitbang.
  8. // #define SCSI_ACCEL_DMA_AVAILABLE 1
  9. void scsi_accel_dma_init();
  10. void scsi_accel_dma_startWrite(const uint8_t* data, uint32_t count, volatile int *resetFlag);
  11. void scsi_accel_dma_stopWrite();
  12. void scsi_accel_dma_finishWrite(volatile int *resetFlag);
  13. // Query whether the data at pointer has already been read, i.e. buffer can be reused.
  14. // If data is NULL, checks if all writes have completed.
  15. bool scsi_accel_dma_isWriteFinished(const uint8_t* data);
  16. #endif