/* $Id: hpsdrconf.h,v 2.5 91/10/23 10:24:48 annette Exp $ */
/****************************************************************/
/* hpsdrconf.h													*/
/****************************************************************/
/*																*/
/*                 Confidential Information                     */
/*      Limited Distribution to Authorized Persons Only         */
/*     Created 1988 and Protected as an Unpublished Work        */
/*          Under the U.S. Copyright Act of 1976.               */
/*         Copyright (c) 1986,'88, Systech Corporation          */
/*                  All Rights Reserved                         */
/*																*/
/*	THIS SOFTWARE IS LICENSED BY AND IS THE	CONFIDENTIAL AND 	*/
/*	PROPRIETARY PROPERTY OF SYSTECH COMPUTER CORPORATION AND 	*/
/*	MAY NOT, WITHOUT THE PRIOR WRITTEN CONSENT OF SYSTECH 		*/
/*	COMPUTER CORPORATION, BE REPRODUCED, USED OR DISCLOSED 		*/
/*	EXCEPT IN ACCORDANCE WITH A SYSTECH COMPUTER CORPORATION 	*/
/*	SOFTWARE LICENSE AGREEMENT.									*/
/****************************************************************/

#ifdef EISA
#define NHPSCTRL 16		/* max number of HPS controllers */
#else
#define NHPSCTRL 2		/* max number of HPS controllers */
#endif

#ifdef HPSIANDD
#define NUMIOCBS 19		/* number of IOCBs allocated by raw driver	*/
#define NUMEXTRA 10		/* number of IOCBs used by tty driver		*/
#else
#define NUMIOCBS 24		/* number of IOCBs allocated by raw driver	*/
#define NUMEXTRA 15		/* number of IOCBs used by tty driver		*/
#endif

/*
 *	Timeout value for write IOCB delay (1 tick = 1/HZ sec).
 */
#ifdef STEPUP
#define HTYTO	 2
#else
#define HTYTO	 5
#endif

/*
 *	Size (in shorts) of the buffers allocated for IOCB/DATA pairs.
 */
#define BUFSIZE	360

/*
 *	The data size available in the above buffers with an asynch IOCB.
 */
#define BUFSPACE (((BUFSIZE-1)*2)-sizeof(A_IOCB))

#ifdef EISA
#define MWBUFSIZE	(MW_BUFSIZE+2)	/* add 2 for hps_itab info */
#define RDBUFSIZE	(RD_BUFSIZE+2)	/* add 2 for hps_itab info */
#ifdef HPS_ALIGN
#define HPSPOOLSIZE (NUMIOCBS*BUFSIZE*2 + sizeof(A_IOCB)+MWBUFSIZE+2\
				+ sizeof(A_IOCB)+RDBUFSIZE)
#else
#define HPSPOOLSIZE (NUMIOCBS*BUFSIZE*2 + sizeof(A_IOCB)+MWBUFSIZE\
				+ sizeof(A_IOCB)+RDBUFSIZE)
#endif
#endif

/*
 *	The asynch IOCB/DATA structure used in the hty driver.
 */
typedef struct
{
	A_IOCB	iocb;
	char	buffer[BUFSPACE];
} IOCB_BUF;

/*
 *	Data structure used in hty driver to map minor dev to controller/channel.
 */
typedef struct
{
	short	hctrl;	/* controller ID */
	short	hchan;	/* hps channel number */
} H_CONF;

#define FALSE	 0
#define TRUE     (~FALSE)

/*
 * MODIFICATION HISTORY:
 *
 * $Log:	hpsdrconf.h,v $
 * Revision 1.1.2.1  92/06/24  13:53:38  marker
 * Branch RISCOS_5_01_2_FIXES off of trunk.
 * 
 * Revision 2.5  91/10/23  10:24:48  annette
 * Moved definition of DNL_CONF from here to hps.ioctl.h.
 * INTERNAL
 * 
 * Revision 2.4  91/09/03  17:31:25  annette
 * Added DNL_CONF structure for downloadable configuration.  Added NHPSCTRL
 * define for EISA.
 * ENHANCEMENT
 * 
 * Revision 2.3  91/07/24  11:27:40  annette
 * Changed NHPSCTRL from 3 to 2
 * SPR=588, SPR=697
 * Changed BUFSIZE from 350 to 360
 * SPR=665, SPR=734
 * 
 * Revision 2.2  91/01/10  20:40:01  dave
 * Update header.
 * COSMETIC
 * 
 */
