mirror of
https://github.com/akuker/RASCSI.git
synced 2026-04-26 21:18:56 +00:00
Use a standard timer for the DaynaPort delay work-around (#1357)
* Do not use the proprietary system timer for the DaynaPort delay work-around
This commit is contained in:
+6
-3
@@ -15,7 +15,7 @@
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#ifdef __linux__
|
||||
#include <sys/epoll.h>
|
||||
#endif
|
||||
@@ -278,9 +278,12 @@ int GPIOBUS::SendHandShake(uint8_t *buf, int count, int delay_after_bytes)
|
||||
if (actmode == mode_e::TARGET) {
|
||||
for (i = 0; i < count; i++) {
|
||||
if (i == delay_after_bytes) {
|
||||
spdlog::trace("DELAYING for " + to_string(SCSI_DELAY_SEND_DATA_DAYNAPORT_US) + " us after " +
|
||||
spdlog::trace("DELAYING for " + to_string(SCSI_DELAY_SEND_DATA_DAYNAPORT_NS) + " ns after " +
|
||||
to_string(delay_after_bytes) + " bytes");
|
||||
SysTimer::SleepUsec(SCSI_DELAY_SEND_DATA_DAYNAPORT_US);
|
||||
EnableIRQ();
|
||||
const timespec ts = { .tv_sec = 0, .tv_nsec = SCSI_DELAY_SEND_DATA_DAYNAPORT_NS};
|
||||
nanosleep(&ts, nullptr);
|
||||
DisableIRQ();
|
||||
}
|
||||
|
||||
// Set the DATA signals
|
||||
|
||||
Reference in New Issue
Block a user