Make the relationship between modem control bits and their delta cousins
public.
This commit is contained in:
parent
4550ad5b99
commit
f1cd2fdf61
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131097
@ -38,7 +38,7 @@
|
|||||||
* Indentification of modem control signals. These definitions match
|
* Indentification of modem control signals. These definitions match
|
||||||
* the TIOCMGET definitions in <sys/ttycom.h> shifted a bit down, and
|
* the TIOCMGET definitions in <sys/ttycom.h> shifted a bit down, and
|
||||||
* that identity is enforced with CTASSERT at the bottom of kern/tty.c
|
* that identity is enforced with CTASSERT at the bottom of kern/tty.c
|
||||||
* Both the modem bits and delta bits must fit in 16 bit!
|
* Both the modem bits and delta bits must fit in 16 bit.
|
||||||
*/
|
*/
|
||||||
#define SER_DTR 0x0001 /* data terminal ready */
|
#define SER_DTR 0x0001 /* data terminal ready */
|
||||||
#define SER_RTS 0x0002 /* request to send */
|
#define SER_RTS 0x0002 /* request to send */
|
||||||
@ -50,13 +50,15 @@
|
|||||||
#define SER_DSR 0x0080 /* data set ready */
|
#define SER_DSR 0x0080 /* data set ready */
|
||||||
|
|
||||||
/* Delta bits, used to indicate which signals should/was affected */
|
/* Delta bits, used to indicate which signals should/was affected */
|
||||||
#define SER_DDTR (SER_DTR << 8)
|
#define SER_DELTA(x) ((x) << 8)
|
||||||
#define SER_DRTS (SER_RTS << 8)
|
|
||||||
#define SER_DSTX (SER_STX << 8)
|
#define SER_DDTR SER_DELTA(SER_DTR)
|
||||||
#define SER_DSRX (SER_SRX << 8)
|
#define SER_DRTS SER_DELTA(SER_RTS)
|
||||||
#define SER_DCTS (SER_CTS << 8)
|
#define SER_DSTX SER_DELTA(SER_STX)
|
||||||
#define SER_DDCD (SER_DCD << 8)
|
#define SER_DSRX SER_DELTA(SER_SRX)
|
||||||
#define SER_DRI (SER_RI << 8)
|
#define SER_DCTS SER_DELTA(SER_CTS)
|
||||||
#define SER_DDSR (SER_DSR << 8)
|
#define SER_DDCD SER_DELTA(SER_DCD)
|
||||||
|
#define SER_DRI SER_DELTA(SER_RI)
|
||||||
|
#define SER_DDSR SER_DELTA(SER_DSR)
|
||||||
|
|
||||||
#endif /* !_SYS_SERIAL_H_ */
|
#endif /* !_SYS_SERIAL_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user