add flush functions for serial helpers
This commit is contained in:
@ -161,3 +161,7 @@ void uart::setStopbits(struct termios& options, StopBits bits) {
|
||||
options.c_cflag &= ~CSTOPB;
|
||||
}
|
||||
}
|
||||
|
||||
void uart::flushRxBuf(int fd) { tcflush(fd, TCIFLUSH); }
|
||||
|
||||
void uart::flushTxRxBuf(int fd) { tcflush(fd, TCIOFLUSH); }
|
||||
|
Reference in New Issue
Block a user