src/serial.cpp
// Helper function checks if port is open,
// then flushes the serial line.
Helper function checks if port is open,
then flushes the serial line.
Helper function checks if port is open then flushes the serial line .
int Serial::setupRead()
{
	if (!isOpen) return -1;
	if (tcflush(dev_fd, TCIOFLUSH < 0)) {
			perror("Could not flush line: ");
			return -1;
	}
    else return 0;
}
int Serial :: setupRead ( ) { if ( ! isOpen ) return -1 ; if ( tcflush ( dev_fd , TCIOFLUSH < 0 ) ) { perror ( " " ) ; return -1 ; } else return 0 ; }
Helper function checks if port is open,
then flushes the serial line.
Helper function checks if port is open then flushes the serial line .