R – Can XON and XOFF be equal


Can the application use set same char in the XON and XOFF? If yes, how my device driver should handle this situation

Best Solution

XON and XOFF are two distinct ASCII characters, so they can not be equal.

That said, using a toggle for XON/XOFF-style flow control is a bad idea because characters may be lost. I also don't see any advantage over using two characters.

Related Question