/* TT7RMLIB, Tattletale Model 7 ROM Library Header */

#define		CLEARBIT	0
#define		SETBIT		1


/* Power Relay Board Definitions */

#define 	MOT1A	0x1   /* Sets pin 1 of output port */
#define		MOT1B	0x2
#define 	MOT2A	0x4
#define		MOT2B	0x8
#define 	AUX1	0x10
#define		AUX2	0x20
#define 	AUX3	0x40  /* Sets pin 7 of output port */


/* Power Control Board Definitions */

#define		POWER1		0x1
#define		POWER2   	0x2
#define		POWER3		0x4
#define		POWER4 		0x8
#define		POWER5  	0x10
#define		POWER6  	0x20
#define		POWER7 		0x40
#define		POWER8 		0x80


/* Input Port Definitions */

#define		RACKUP		0x1
#define		LIMITPAD1	0x2
#define		LIMITPAD2	0x4
#define		LIMITUP		0x8
#define		LIMITDWN	0x10
#define		CMLIMIT 	0x20
#define		CMROTOR		0x40


/* Function Prototypes */

int tt7init(void);
void outport(short port, short setclear, unsigned short outdata);
int inport(unsigned short portbit);
int tt7init(void);
void reset(void);
float battvoltage(void);
float gfvoltage(void);
float syscurrent(void);
float tilt_x(void);
float tilt_y(void);
int heading(void);
float speed(void);
setcomchan(int channel);