What are TIOCM_OUT1 and TIOCM_OUT2 for?

termios.h defines:

 #define TIOCM_OUT1 0x2000 #define TIOCM_OUT2 0x4000 

But what are flags for?

+4
source share
2 answers
 TIOCM_OUT1 = Unassigned Programmable Output #1 TIOCM_OUT2 = Unassigned Programmable Output #2 

It looks like they can be used to set the OUT1 and OUT2 bits to the MCR.
But why do we need unassigned programmable results?
My best understanding is that they are used during loopback mode for interrupts and are better not used for anything (since they are intended for internal use).

+2
source

They are used as signal lines like DTR and others. They are not assigned and are therefore open to use. Therefore, theoretically, you can use them to signal some special condition out of range that may come in handy.

However, I would not use them for anything if you did not create your own hardware solution: the hardware of serial equipment often only supports the minimum requirements for the most common applications. Ie, it is often not compatible with the full RS-232 (or RS-XXX).

+2
source

All Articles