Skip to content

Commit e4be1c4

Browse files
committed
Removed tcdrain as it causes too slow connection speed
1 parent c9a74bf commit e4be1c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/serial/serial_linux.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ SerialHandle OpenSerial(const char* name, uint32_t baud)
130130
int SerialSend(SerialHandle hPort, const void *buf, int len)
131131
{
132132
int ret;
133-
if ( tcdrain( handleToFile(hPort) ) < 0 )
133+
/* if ( tcdrain( handleToFile(hPort) ) < 0 )
134134
{
135135
perror( "TCDRAIN" );
136-
}
136+
}*/
137137
struct pollfd fds = {
138138
.fd = handleToFile(hPort),
139139
.events = POLLOUT | POLLWRNORM
@@ -171,9 +171,9 @@ int SerialSend(SerialHandle hPort, const void *buf, int len)
171171
// syncfs( handleToFile(hPort) );
172172
// fsync( handleToFile(hPort) );
173173
// tcflush(handleToFile(hPort), TCOFLUSH);
174+
// tcdrain( handleToFile(hPort) );
174175
}
175176
// tcflush(handleToFile(hPort), TCOFLUSH);
176-
tcdrain( handleToFile(hPort) );
177177
return ret;
178178
}
179179

0 commit comments

Comments
 (0)