[haiku-commits] r39759 - haiku/trunk/headers/posix

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 8 Dec 2010 01:11:01 +0100 (CET)

Author: mmlr
Date: 2010-12-08 01:11:01 +0100 (Wed, 08 Dec 2010)
New Revision: 39759
Changeset: http://dev.haiku-os.org/changeset/39759

Modified:
   haiku/trunk/headers/posix/termios.h
Log:
Add a few commonly used macros for line state setting/getting.


Modified: haiku/trunk/headers/posix/termios.h
===================================================================
--- haiku/trunk/headers/posix/termios.h 2010-12-07 23:44:51 UTC (rev 39758)
+++ haiku/trunk/headers/posix/termios.h 2010-12-08 00:11:01 UTC (rev 39759)
@@ -181,6 +181,10 @@
 #define TIOCGPGRP                      (TCGETA + 15)   /* Gets the process 
group ID of the TTY device */
 #define TIOCSPGRP                      (TCGETA + 16)   /* Sets the process 
group ID ('pgid' in BeOS) */
 #define TIOCSCTTY                      (TCGETA + 17)   /* Become controlling 
TTY */
+#define TIOCMGET                       (TCGETA + 18)   /* get line state, like 
TCGETBITS */
+#define TIOCMSET                       (TCGETA + 19)   /* does 
TCSETDTR/TCSETRTS */
+#define TIOCSBRK                       (TCGETA + 20)   /* set txd pin */
+#define TIOCCBRK                       (TCGETA + 21)   /* both are a frontend 
to TCSBRK */
 
 /* Event codes.  Returned from TCWAITEVENT */
 #define EV_RING                        0x0001
@@ -202,7 +206,15 @@
 #define TCGB_RI                        0x04
 #define TCGB_DCD               0x08
 
+/* Bits for the TIOCMGET / TIOCMSET control */
+#define TIOCM_CTS              TCGB_CTS        /* clear to send */
+#define TIOCM_CD               TCGB_DCD        /* carrier detect */
+#define TIOCM_RI               TCGB_RI         /* ring indicator */
+#define TIOCM_DSR              TCGB_DSR        /* dataset ready */
+#define TIOCM_DTR              0x10            /* data terminal ready */
+#define TIOCM_RTS              0x20            /* request to send */
 
+
 #ifdef __cplusplus
 extern "C" {
 #endif


Other related posts:

  • » [haiku-commits] r39759 - haiku/trunk/headers/posix - mmlr