/****************************************************************************/
/* Copyright 1991 to 1995, MBARI                                            */
/****************************************************************************/
/* Summary  : Sensor Data Concetrator - Hardware Configuration File         */
/* Filename : sensor.h                                                      */
/* Author   : Andrew Pearce                                                 */
/* Project  : Tiburon                                                       */
/* Version  : 1.0                                                           */
/* Created  : 09/10/93                                                      */
/* Modified : 11/03/95                                                      */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/* $Header: /usr/tiburon/.cvsroot/micro/h/sensor.h,v 1.1.1.1 1997/05/02 17:15:41 pean Exp $
 * $Log: sensor.h,v $
 * Revision 1.1.1.1  1997/05/02 17:15:41  pean
 * Initial release of the microcontroller software after Tiburon
 * Moolpool Dive to test IView, Lapboxes, modified Power can
 * GF/5V using bus capacitance mode.
 *
 * Revision 1.2  96/02/06  11:50:38  11:50:38  pean (Andrew Pearce)
 * Fixed falmouth sensor sampling rate problem
 * Fixed clearing of Quad Serial Board UART overrun error reporting
 *
 * Revision 1.1  93/10/07  10:08:43  10:08:43  pean (Andrew Pearce)
 * Initial revision
 *
*/
/****************************************************************************/

                                        /* Sensor IBC A/D Channel Assignment*/
#define HUMIDITY_SENSOR_CHAN        0   /* Humidity Sensor Channel          */
#define HOUSING_WATER_ALARM_CHAN    1   /* Housing Water Alarm Channel      */
#define JBOX_WATER_ALARM_CHAN       2   /* J-Box Water Alarm Channel        */

                                        /* Quad Serial Board Channels       */
#define SPARE_SERIAL_CHAN           0   /* Spare Serial Channel             */
#define PRESSURE_SENSOR_CHAN        1   /* Pressure Sensor Serial Chan      */
#define TEMPERATURE_SENSOR_CHAN     2   /* Temperature Sensor Serial Chan   */
#define CONDUCTIVITY_SENSOR_CHAN    3   /* Conductivity Sensor Serial Chan  */

                                        /* Quad A/D Board Channels          */
#define TRANSMISSOMETER_CHAN        0   /* Transmissometer Sensor Chan      */
#define OXYGEN_SENSOR_CURRENT_CHAN  1   /* Oxygen Sensor Current Chan       */
#define OXYGEN_SENSOR_TEMP_CHAN     2   /* Oxygen Sensor Temperature Chan   */
#define SPARE_ATOD_CHAN             3   /* Spare A/D Channel                */


#define HOUSING_WATER_ALARM_BIT  0x01   /* Housing Water Alarm Status Bit   */
#define JBOX_WATER_ALARM_BIT     0x02   /* J-Box Water Alarm Status Bit     */

                                        /* Water Alarm Threshold is 0.5V    */
#define WATER_ALARM_THRESHOLD     103   /* 103 = 2^10 * 0.5/5.0             */
#define WATER_ALARM_HYSTERESIS     10   /* 10 counts = 0.049 volts          */

                                        /* ** Sensor IBC Serial Commands ** */
#define GET_WATER_ALARM          0x01   /* Get Water Alarm Status Word      */
#define GET_WATER_ALARM_THRESH   0x02   /* Get Water Alarm Threshold Value  */
#define SET_WATER_ALARM_THRESH   0x03   /* Set Water Alarm Threshold Value  */
#define GET_SENSOR_DATA          0x04   /* Get Sensor Measurements          */
#define GET_CTD_SENSOR_DATA      0x05   /* Get CTD Sensor Data              */
#define SETUP_CTD_SENSORS        0x06   /* Setup CTD Sensors                */

#define CAN_WATER_ALARM_ON_SRQ    APPLIC_SRQ_BASE | 0xC0
#define CAN_WATER_ALARM_OFF_SRQ   APPLIC_SRQ_BASE | 0xC1

#define JBOX_WATER_ALARM_ON_SRQ   APPLIC_SRQ_BASE | 0xC2
#define JBOX_WATER_ALARM_OFF_SRQ  APPLIC_SRQ_BASE | 0xC3






