Annotation of Gnu-Mach/include/device/tty_status.h, revision 1.1.1.3

1.1       root        1: /* 
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1991,1990 Carnegie Mellon University
                      4:  * All Rights Reserved.
                      5:  * 
                      6:  * Permission to use, copy, modify and distribute this software and its
                      7:  * documentation is hereby granted, provided that both the copyright
                      8:  * notice and this permission notice appear in all copies of the
                      9:  * software, derivative works or modified versions, and any portions
                     10:  * thereof, and that both notices appear in supporting documentation.
                     11:  * 
                     12:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     13:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     14:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     15:  * 
                     16:  * Carnegie Mellon requests users of this software to return to
                     17:  * 
                     18:  *  Software Distribution Coordinator  or  [email protected]
                     19:  *  School of Computer Science
                     20:  *  Carnegie Mellon University
                     21:  *  Pittsburgh PA 15213-3890
                     22:  * 
                     23:  * any improvements or extensions that they make and grant Carnegie Mellon
                     24:  * the rights to redistribute these changes.
                     25:  */
                     26: /*
                     27:  *     Author: David B. Golub, Carnegie Mellon University
                     28:  *     Date:   ll/90
                     29:  *
                     30:  *     Status information for tty.
                     31:  */
                     32: 
1.1.1.3 ! root       33: #ifndef _DEVICE_TTY_STATUS_H_
        !            34: #define _DEVICE_TTY_STATUS_H_
        !            35: 
1.1       root       36: struct tty_status {
                     37:        int     tt_ispeed;              /* input speed */
                     38:        int     tt_ospeed;              /* output speed */
                     39:        int     tt_breakc;              /* character to deliver when break
                     40:                                           detected on line */
                     41:        int     tt_flags;               /* mode flags */
                     42: };
                     43: #define        TTY_STATUS_COUNT        (sizeof(struct tty_status)/sizeof(int))
                     44: #define        TTY_STATUS              (dev_flavor_t)(('t'<<16) + 1)
                     45: 
                     46: /*
                     47:  * Speeds
                     48:  */
                     49: #define B0     0
                     50: #define B50    1
                     51: #define B75    2
                     52: #define B110   3
                     53: #define B134   4
                     54: #define B150   5
                     55: #define B200   6
                     56: #define B300   7
                     57: #define B600   8
                     58: #define B1200  9
                     59: #define        B1800   10
                     60: #define B2400  11
                     61: #define B4800  12
                     62: #define B9600  13
                     63: #define EXTA   14 /* XX can we just get rid of EXTA and EXTB? */
                     64: #define EXTB   15
                     65: #define B19200 EXTA
                     66: #define B38400  EXTB
1.1.1.2   root       67: #define B57600 16
                     68: #define B115200        17
1.1       root       69: 
1.1.1.2   root       70: #define        NSPEEDS 18
1.1       root       71: 
                     72: /*
                     73:  * Flags
                     74:  */
                     75: #define        TF_TANDEM       0x00000001      /* send stop character when input
                     76:                                           queue full */
                     77: #define        TF_ODDP         0x00000002      /* get/send odd parity */
                     78: #define        TF_EVENP        0x00000004      /* get/send even parity */
                     79: #define        TF_ANYP         (TF_ODDP|TF_EVENP)
                     80:                                        /* get any parity/send none */
                     81: #define        TF_LITOUT       0x00000008      /* output all 8 bits
                     82:                                           otherwise, characters >= 0x80
                     83:                                           are time delays      XXX */
                     84: #define        TF_MDMBUF       0x00000010      /* start/stop output on carrier
                     85:                                           interrupt
                     86:                                           otherwise, dropping carrier
                     87:                                           hangs up line */
                     88: #define        TF_NOHANG       0x00000020      /* no hangup signal on carrier drop */
                     89: #define        TF_HUPCLS       0x00000040      /* hang up (outgoing) on last close */
                     90: 
                     91: /*
                     92:  * Read-only flags - information about device
                     93:  */
                     94: #define        TF_ECHO         0x00000080      /* device wants user to echo input */
                     95: #define        TF_CRMOD        0x00000100      /* device wants \r\n, not \n */
                     96: #define        TF_XTABS        0x00000200      /* device does not understand tabs */
                     97: 
                     98: /*
                     99:  * Modem control
                    100:  */
                    101: #define        TTY_MODEM_COUNT         (1)     /* one integer */
                    102: #define        TTY_MODEM               (dev_flavor_t)(('t'<<16) + 2)
                    103: 
                    104: #define        TM_LE           0x0001          /* line enable */
                    105: #define        TM_DTR          0x0002          /* data terminal ready */
                    106: #define        TM_RTS          0x0004          /* request to send */
                    107: #define        TM_ST           0x0008          /* secondary transmit */
                    108: #define        TM_SR           0x0010          /* secondary receive */
                    109: #define        TM_CTS          0x0020          /* clear to send */
                    110: #define        TM_CAR          0x0040          /* carrier detect */
                    111: #define        TM_RNG          0x0080          /* ring */
                    112: #define        TM_DSR          0x0100          /* data set ready */
                    113: 
                    114: #define        TM_BRK          0x0200          /* set line break (internal) */
                    115: #define        TM_HUP          0x0000          /* close line (internal) */
                    116: 
                    117: /*
                    118:  * Other controls
                    119:  */
                    120: #define        TTY_FLUSH_COUNT         (1)     /* one integer - D_READ|D_WRITE */
                    121: #define        TTY_FLUSH               (dev_flavor_t)(('t'<<16) + 3)
                    122:                                        /* flush input or output */
                    123: #define        TTY_STOP                (dev_flavor_t)(('t'<<16) + 4)
                    124:                                        /* stop output */
                    125: #define        TTY_START               (dev_flavor_t)(('t'<<16) + 5)
                    126:                                        /* start output */
                    127: #define        TTY_SET_BREAK           (dev_flavor_t)(('t'<<16) + 6)
                    128:                                        /* set break condition */
                    129: #define        TTY_CLEAR_BREAK         (dev_flavor_t)(('t'<<16) + 7)
                    130:                                        /* clear break condition */
                    131: #define TTY_SET_TRANSLATION    (dev_flavor_t)(('t'<<16) + 8)
                    132:                                        /* set translation table */
1.1.1.3 ! root      133: 
        !           134: #endif /* _DEVICE_TTY_STATUS_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.