/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-*
 *									    *
 *	Copyright (C) 1987, 1991 by John E. Lloyd.			    *
 *									    *
 *	Information on copyright permissions, as well as a complete	    *
 *	disclaimer of warranty, is given in the file COPYRIGHT.		    *
 *									    *
 *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

#ifndef _PRIDRIVER_H_
#define _PRIDRIVER_H_

#define PRI_CSR0        0x0001  /* CSR bit 0 (to user dev) */
#define PRI_CSR1        0x0002  /* CSR bit 1 (to user dev) */
#define PRI_IEB         0x0020  /* INTER Enable B */
#define PRI_IEA         0x0040  /* INTER Enable A */
#define PRI_REQA        0x0080  /* REQ A line from user dev */
#define PRI_REQB        0x8000  /* REQ B line from user dev */

#define PRI_LISTEN		0x1234
#define PRI_READ_READY		0x1111
#define PRI_WRITE_READY		0x2222
#define PRI_SIGNAL_ACK		0x3333

#define PRI_SIGOUT		PRI_CSR1
#define PRI_SIGIN		PRI_REQB

#define PRI_DEFAULT_BLOCKTIME	100	/* 100 milliseconds */

struct prireg {
	unsigned short csr;
	unsigned short obuf;
	unsigned short ibuf;
};

extern priRead();
extern priTestRead();
extern priWrite();
extern priTestWrite();

extern priProbe();
extern priAttach();
extern priDetach();
extern priSignal();

extern priIoctl();

#endif
