#ifndef __dockpay_H
#define __dockpay_H

/* PIC 18C452 Docking Payload library header*/





/************* I/O Port A Functions***********/
/* RA0 - RA3 are Analog Inputs*/
/*RA4*/ 
#define  FanOn PORTAbits.RA4
#define on 1
#define off 0
#define yes 1
#define no 0

/*RA6 NA */ 

/************* I/O Port B Functions***********/
/*RB0/INT0 is the RTC interrupt*/
#define RTC_INT PORTBbits.RB0
/*RB1/INT1 is the RS232 interrupt*/
#define RS232_INT PORTBbits.RB1
/*RB2 is RS232_CTR0 "See RS232 control nib" */
#define RS232_CTR0 PORTBbits.RB2
/*RB3 is PGM Program and Debug pin */
/*RB4 is SPI_DAC_CS_L*/
#define DAC_CS_L PORTBbits.RB4
/*RB5 is RS232CTR1 "See RS232 control nib" */
#define RS232_CTR1 PORTBbits.RB5
/*RB6 is PGC Program and Debug pin */
/*RB7 is PGD Program and Debug pin */

/************* I/O Port C Functions***********/
/*RC0 is RTC_CS */
#define RTC_CS PORTCbits.RC0 
/*RC1 is RS232CTR2 "See RS232 control nib" */
#define RS232CTR2 PORTCbits.RC1
/*RC2 is RS232CTR3 "See RS232 control nib" */
#define RS232CTR3 PORTCbits.RC2
/*RC3 - RC7 are SPI and USART Ports*/

/************* I/O Port D Functions***********/
/*RD0 is PC104_ON */
#define PC104_ON PORTDbits.RD0

/*RD1 is RF_ETHERNET_ON */
#define RF_ETHERNET_ON PORTDbits.RD1

/*RD2 is MOD_USBL_ON */
#define MOD_USBL_ON PORTDbits.RD2

/*RD3 is RESOLVER_ON */
#define RESOLVER_ON PORTDbits.RD3

/*RD4 is SPARE2 */
/*RD5 is SPARE1 */

/*RD6 is PWROUT */
#define PWROUT PORTDbits.RD6

/*RD7 is PWROUT_L */
#define PWROUT_L PORTDbits.RD7

/************* I/O Port E Functions***********/
/*RE0-2 are analog inputs */


/*************  RS232 control nib "See Excel Table for details" ***********/
/* 0000 = AUV Mission */
/* 0001 = AUV Homing */
/* 0010 = AUV Docking */
/* 0011 = AUV Docking not charging */
/* 0100 = AUV Docking charging */
/* 1000 = Ext DB9 connected to PIC for Testing only */
/* 1001 = Ext DB( connected to PC104 for Testing only */






#endif /* __dockpay_H */
