/* Copyright 1987 by the Massachusetts Institute of Technology */

/* Common definitions for async lines. */
/*
 *------------------------------------------------------------------
 * $Source: /mit/cgw/src/gw/dev.vax/RCS/async.h,v $
 * $Revision: 1.1 $
 * $Date: 88/06/05 22:49:58 $
 * $Author: jon $
 *------------------------------------------------------------------
 */

/* A structure pointed to by d_dev3 of async devices.  Used primarily
 * for deciding how to initialize the device.
 * Needs to have stuff added for flow control and auto-bauding.
 */

struct async_conf {
    unsigned parity:3;		/* type of parity */
    unsigned clen:2;		/* character length */
    unsigned stop:1;		/* number of stop bits */
    unsigned modem:1;		/* enable modem control lines */
    unsigned rx_speed:4;	/* receive speed */
    unsigned tx_speed:4;	/* transmit speed */
    unsigned flow_control:2;	/* type of flow control */
};

#define PARITY_OFF 0
#define PARITY_ODD 1
#define PARITY_EVEN 2
#define PARITY_MARK 3
#define PARITY_SPACE 4
#define CHAR_LEN_5 0
#define CHAR_LEN_6 1
#define CHAR_LEN_7 2
#define CHAR_LEN_8 3
#define STOP1 0
#define STOP2 1
#define NO_MODEM 0
#define MODEM 1
#define FC_NONE 0		/* no flow control */
#define FC_CTS 1		/* CTS flow control */

/* Baud rates */
#define BAUD_50		0
#define BAUD_75		1
#define BAUD_110	2
#define BAUD_134	3
#define BAUD_150	4
#define BAUD_300	5
#define BAUD_600	6
#define BAUD_1200	7
#define BAUD_1800	8
#define BAUD_2000	9
#define BAUD_2400	10
#define BAUD_4800	11
#define BAUD_7200	12
#define BAUD_9600	13
#define BAUD_19200	14
#define BAUD_38400	15
