#ifndef KERNEL
#include "/usr/sys/h/ioctl.h"
#endif

/* Control bit definitions */

#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 */

struct pridevice {
  unsigned short int csr;
  unsigned short int obuf;
  unsigned short int ibuf; };

#define PRIVEC1 0300

/* IOCTLS for the PRI device */

#define PRIIOCF_READ	_IOWR(l, 100, struct priblock)
#define PRIIOCF_WRITE	_IOWR(l, 200, struct priblock)

struct priblock {
	int writeWord;
	int writeValue;
	int csr;
	int obuf;
	int ibuf;
};
