flush the serial buffer
I want to flush the serial buffer before I read from it (monitor it for the next transmission). Is this possible?
|
If you initialize and configure the serial device with tcsetattr() you can flush the serial buffer by setting the new tio with the TCSAFLUSH Parameter:
Code:
tcsetattr(fileDescriptor, TCSAFLUSH, &myNewTTYoptions); PS: I made this tardy replay, since this post shows up as result number one while googeling for "flush serial buffer". |
All times are GMT -5. The time now is 04:32 PM. |