summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'serial.c')
-rw-r--r--serial.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/serial.c b/serial.c
index 5f7548c..82a5abd 100644
--- a/serial.c
+++ b/serial.c
@@ -206,6 +206,9 @@ read_buf(int fd, size_t len, void *_buf)
} else {
write_ack(fd, NACK);
}
+
+ /* Wait 2 ms between attempts */
+ usleep(2000);
}
err = ERR_NACK;
@@ -249,6 +252,9 @@ write_buf(int fd, size_t len, const void *_buf)
if (err != NACK)
goto error;
+
+ /* Wait 2 ms between attempts */
+ usleep(2000);
}
error: