From deb25b1cc222a9f96d04b2c3ef34bc86efc4366b Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 8 Dec 2010 00:11:01 +0000 Subject: [PATCH] Add a few commonly used macros for line state setting/getting. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39759 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/termios.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/headers/posix/termios.h b/headers/posix/termios.h index 5ff46290a5..5d01343d46 100644 --- a/headers/posix/termios.h +++ b/headers/posix/termios.h @@ -181,6 +181,10 @@ struct termios { #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,6 +206,14 @@ struct winsize { #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" {