blob: b285dd0a62c245de00e6192ed304034ebc0c86ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
From 0fd3078b4863002e5d384d7e453d668841414abe Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Wed, 13 Jan 2021 01:34:08 +0100
Subject: [PATCH] PosixSerialPort: Call tcdrain() to write serial data
GithubPR: 150
---
src/PosixSerialPort.cpp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/src/PosixSerialPort.cpp
+++ b/src/PosixSerialPort.cpp
@@ -290,10 +290,7 @@ PosixSerialPort::put(int c)
void
PosixSerialPort::flush()
{
- // There isn't a reliable way to flush on a file descriptor
- // so we just wait it out. One millisecond is the USB poll
- // interval so that should cover it.
- usleep(1000);
+ tcdrain(_devfd);
}
bool
|