/*
**    $Id: dcb.h,v 1.1 1993/06/28 01:19:42 pjs Exp $
**    Copyright (C) 1993  Patrick Sweeney
**
**    This program is free software; you can redistribute it and/or modify
**    it under the terms of the GNU General Public License as published by
**    the Free Software Foundation; either version 2 of the License, or
**    any later version.
**
**    This program is distributed in the hope that it will be useful,
**    but WITHOUT ANY WARRANTY; without even the implied warranty of
**    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
**    GNU General Public License for more details.
**
**    You should have received a copy of the GNU General Public License
**    along with this program; if not, write to the Free Software
**    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _DCB_H_
#define _DCB_H_

#include "windows.h"

#define NOPARITY            0
#define ODDPARITY           1
#define EVENPARITY          2
#define MARKPARITY          3
#define SPACEPARITY         4

#define ONESTOPBIT          0
#define ONE5STOPBITS        1
#define TWOSTOPBITS         2

typedef struct tagDCB
{
	BYTE id;
	WORD BaudRate;
	BYTE ByteSize;
	BYTE Parity;
	BYTE StopBits;
	WORD RlsTimeout;
	WORD CtsTimeout;
	WORD DsrTimeout;
	
	BYTE fBinary : 1;
	BYTE fRtsDisable : 1;
	BYTE fParity : 1;
	BYTE fOutxCtsFlow : 1;
	BYTE fOutxDstFlow : 1;
	BYTE fDummy : 2;
	BYTE fDtrDisable : 1;
	
	BYTE fOutX : 1;
	BYTE fInX : 1;
	BYTE fPeChar : 1;
	BYTE fNull : 1;
	BYTE fChEvt : 1;
	BYTE fDtrFlow : 1;
	BYTE fRtsFlow : 1;
	BYTE fDummy2 : 1;

	char XonChar;
	char XoffChar;
	WORD XonLim;
	WORD XoffLim;
	char PeChar;
	char EofChar;
	char EvtChar;
	WORD TxDelay;
} DCB, *LPDCB;

#endif /* _DCB_H_ */
