
/*	kiwi.h	*/

#define RIGHT	1
#define LEFT	0

#define $RDRB	1
#define $WRRB	2
#define $RDLB	3
#define $WRLB	4
#define $RDUDC	5
#define $WRUDC	6
#define $TEST3	7
#define $TEST4	8
#define $TEST5	9
#define $RDVAL	0x0b
#define $WRVAL	0x0a

#ifdef MOTO
	
/* structure for the KIWI I/O registers - MOTOROLA byte convention */
struct kiwidev {
	union {
		unsigned short w[8];	/* register array, words */
		unsigned char b[16];	/* register array. bytes */
	} ra;
	char dsp;		/* front hex DiSPlay */
	char mc;		/* Master Control register */
	char dummy1;
	char obus;		/* Offline BUS register */
	char dummy2;
	char otag;		/* Offline TAG register */
	union {
		unsigned short w; 	/* DoWnLoaD register, word */
		char b[2];	 	/* download register, byte */
	} dwld;
	char dummy3;
	char pic1;		/* Programmable Interrupt Controller */
	char dummy4;
	char pic2;
};

#else
	
/* structure for the KIWI I/O registers - INTEL byte convention */
struct kiwidev {
	union {
		unsigned short w[8];	/* register array, words */
		unsigned char b[16];	/* register array. bytes */
	} ra;
	char mc;		/* Master Control register */
	char dsp;		/* front hex DiSPlay */
	char obus;		/* Offline BUS register */
	char dummy1;
	char otag;		/* Offline TAG register */
	char dummy2;
	union {
		unsigned short w; 	/* DoWnLoaD register, word */
		char b[2];	 	/* download register, byte */
	} dwld;
	char pic1;		/* Programmable Interrupt Controller */
	char dummy3;
	char pic2;
};

#endif

/*  */           