diff options
author | davidn <davidn@FreeBSD.org> | 1996-12-18 16:42:06 +0000 |
---|---|---|
committer | davidn <davidn@FreeBSD.org> | 1996-12-18 16:42:06 +0000 |
commit | 7673f8f6a1d11b6a97e96048f8abb952b06653b0 (patch) | |
tree | 2df05a5b6d3c5e24f8efaefbe919110d4218c993 /sys/dev/dgb/dgreg.h | |
parent | 6d3eda06b506ba2ce09268f34b70b0fd454937a3 (diff) | |
download | FreeBSD-src-7673f8f6a1d11b6a97e96048f8abb952b06653b0.zip FreeBSD-src-7673f8f6a1d11b6a97e96048f8abb952b06653b0.tar.gz |
Much fixed & working digiboard driver.
Diffstat (limited to 'sys/dev/dgb/dgreg.h')
-rw-r--r-- | sys/dev/dgb/dgreg.h | 90 |
1 files changed, 77 insertions, 13 deletions
diff --git a/sys/dev/dgb/dgreg.h b/sys/dev/dgb/dgreg.h index 3864d07..4e5d27c 100644 --- a/sys/dev/dgb/dgreg.h +++ b/sys/dev/dgb/dgreg.h @@ -1,5 +1,5 @@ /*- - * dgreg.h $Id: dgreg.h,v 1.3 1995/12/22 16:08:15 bde Exp $ + * dgreg.h $Id: dgreg.h,v 1.4 1996/06/12 04:59:15 gpalmer Exp $ * * Digiboard driver. * @@ -16,8 +16,6 @@ * babkin@hq.icb.chel.su */ -#define DEBUG 1 - #define MAX_DGB_PORTS 32 /* digi.h */ @@ -343,18 +341,84 @@ struct channel { #define DGBFLAG_ALTPIN 0x0001 /* chande DCD and DCD */ #define DGBFLAG_NOWIN 0x0002 /* use windowed PC/Xe as non-windowed */ +#define DB_RD 0x0001 +#define DB_WR 0x0002 +#define DB_WIN 0x0004 +#define DB_INFO 0x0008 +#define DB_EXCEPT 0x0010 +#define DB_OPEN 0x0100 +#define DB_CLOSE 0x0200 +#define DB_DATA 0x0400 +#define DB_RXDATA 0x0401 +#define DB_TXDATA 0x0402 +#define DB_EVENT 0x0800 +#define DB_MODEM 0x1000 +#define DB_BREAK 0x2000 +#define DB_PARAM 0x4000 +#define DB_FEP 0x8000 + /* debugging printout */ #ifdef DEBUG -# define DPRINT1(a1) (dgbdebug ? printf(a1) : 0) -# define DPRINT2(a1,a2) (dgbdebug ? printf(a1,a2) : 0) -# define DPRINT3(a1,a2,a3) (dgbdebug ? printf(a1,a2,a3) : 0) -# define DPRINT4(a1,a2,a3,a4) (dgbdebug ? printf(a1,a2,a3,a4) : 0) -# define DPRINT5(a1,a2,a3,a4,a5) (dgbdebug ? printf(a1,a2,a3,a4,a5) : 0) +#define DPRINT1(l,a1) (dgbdebug&l ? printf(a1) : 0) +#define DPRINT2(l,a1,a2) (dgbdebug&l ? printf(a1,a2) : 0) +#define DPRINT3(l,a1,a2,a3) (dgbdebug&l ? printf(a1,a2,a3) : 0) +#define DPRINT4(l,a1,a2,a3,a4) (dgbdebug&l ? printf(a1,a2,a3,a4) : 0) +#define DPRINT5(l,a1,a2,a3,a4,a5) (dgbdebug&l ? printf(a1,a2,a3,a4,a5) : 0) +#define DPRINT6(l,a1,a2,a3,a4,a5,a6) (dgbdebug&l ? printf(a1,a2,a3,a4,a5,a6) : 0) +#define DPRINT7(l,a1,a2,a3,a4,a5,a6,a7) (dgbdebug&l ? printf(a1,a2,a3,a4,a5,a6,a7) : 0) #else -# define DPRINT1(a1) -# define DPRINT2(a1,a2) -# define DPRINT3(a1,a2,a3) -# define DPRINT4(a1,a2,a3,a4) -# define DPRINT5(a1,a2,a3,a4,a5) +#define DPRINT1(l,a1) +#define DPRINT2(l,a1,a2) +#define DPRINT3(l,a1,a2,a3) +#define DPRINT4(l,a1,a2,a3,a4) +#define DPRINT5(l,a1,a2,a3,a4,a5) +#define DPRINT6(l,a1,a2,a3,a4,a5,a6) +#define DPRINT7(l,a1,a2,a3,a4,a5,a6,a7) #endif + + + /* These are termios bits as the FEP understands them */ + +/* c_cflag bits */ +#define FEP_CBAUD 0x00000f +#define FEP_B0 0x000000 /* hang up */ +#define FEP_B50 0x000001 +#define FEP_B75 0x000002 +#define FEP_B110 0x000003 +#define FEP_B134 0x000004 +#define FEP_B150 0x000005 +#define FEP_B200 0x000006 +#define FEP_B300 0x000007 +#define FEP_B600 0x000008 +#define FEP_B1200 0x000009 +#define FEP_B1800 0x00000a +#define FEP_B2400 0x00000b +#define FEP_B4800 0x00000c +#define FEP_B9600 0x00000d +#define FEP_B19200 0x00000e +#define FEP_B38400 0x00000f +#define FEP_EXTA FEP_B19200 +#define FEP_EXTB FEP_B38400 +#define FEP_CSIZE 0x000030 +#define FEP_CS5 0x000000 +#define FEP_CS6 0x000010 +#define FEP_CS7 0x000020 +#define FEP_CS8 0x000030 +#define FEP_CSTOPB 0x000040 +#define FEP_CREAD 0x000080 +#define FEP_PARENB 0x000100 +#define FEP_PARODD 0x000200 +#define FEP_CLOCAL 0x000800 +#define FEP_FASTBAUD 0x000400 +/* c_iflag bits */ +#define FEP_IGNBRK 0000001 +#define FEP_BRKINT 0000002 +#define FEP_IGNPAR 0000004 +#define FEP_PARMRK 0000010 +#define FEP_INPCK 0000020 +#define FEP_ISTRIP 0000040 +#define FEP_IXON 0002000 +#define FEP_IXANY 0004000 +#define FEP_IXOFF 0010000 + |