/****************************************************************************/
/* Copyright 1991 to 1993, MBARI                                            */
/****************************************************************************/
/* Summary  : IBC CPU196 Microcontroller Board - Hardware Support Functions */
/* Filename : cpu196.h                                                      */
/* Author   : Andrew Pearce                                                 */
/* Project  : New ROV IBC CPU Board Rev 1.0                                 */
/* Version  : 1.0                                                           */
/* Created  : 10/01/91                                                      */
/* Modified : 09/11/92                                                      */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/* $Header: /usr/tiburon/.cvsroot/micro/h/cpu196.h,v 1.1.1.1 1997/05/02 17:15:37 pean Exp $
 * $Log: cpu196.h,v $
 * Revision 1.1.1.1  1997/05/02 17:15:37  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.1  93/07/02  09:22:25  09:22:25  pean (Andrew Pearce)
 * Initial revision
 *
 * Initial revision
 *
*/
/*********************** IBC CPU Board Memory Map ***************************/

#define PIC_BASE_ADDR       0x1000      /* 82C59A Interrupt Controller      */
#define PIC_NEXT_ADDR       0x1001      /* 82C59A Interrupt Controller      */
#define PIC_INT_ACK_ADDR    0x1200      /* 82C59A Interrupt Acknowledge     */

#define IBC_BUS_ADDR_BASE   0x1800      /* IBC Bus base address             */
#define EEPROM_BASE_ADDR    0x6000      /* EEPROM base address              */

#define EEPROM_SIZE         0x8000      /* EEPROM size 32K Bytes            */
#define EEPROM_PAGE_SIZE    64          /* EEPROM Page size is 64 Bytes     */
#define EEPROM_WRITE_TIME   2           /* EEPROM write takes 20 msec       */

/****************************************************************************/

#define HUMIDITY_WARN_THRESH      10    /* Set humidity warning to 10% RH   */
#define HUMIDITY_ALARM_THRESH     20    /* Set humidity alarm to 20% RH     */
#define HUMIDITY_HYSTERESIS        2    /* Humidity sensor hysteresis 2%    */

#define IBC_RESET_BIT       0x01        /* IBC Bus Reset Control Bit        */

#ifdef __STDC__

Void ibcBusReset( Void );

Int16 cpu196_BoardInit( IBC_BoardEntry *IBC_CardTable[], Int16 maxCards );

Void cpu196_initIbcInterrupts( Void );
Void cpu196_enableIbcIntr( Void );

Void cpu196_BoardFunctions( IBC_BoardEntry *CPU196_Board );

Void IBC_BoardFindIntrLevel( IBC_BoardEntry *IBC_Board,
         Void (*boardIntrOn) (), Void (*boardIntrOff) () );

#endif
