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

struct xyddevice {
	unsigned char moduleID[0x40];
	unsigned char unused1[0x40];
	unsigned char intrInputs;
	unsigned char csr;
	unsigned char intrPending;
	unsigned char intrMask;
	unsigned char intrClear;
	unsigned char intrVector;
	unsigned char outFlags;
	unsigned char portDirection;
	unsigned char port[8];
	unsigned char unused2[0x370];
  };

/* CSR flags and bits */

#define XYD_CSR_2		0x80
#define XYD_CSR_1		0x40
#define XYD_CSR_0		0x20
#define XYD_RESET		0x10
#define XYD_INTR_ENABLE		0x08
#define XYD_INTR_PENDING	0x04
#define XYD_GREEN_ON		0x02
#define XYD_RED_OFF		0x01
