/************************************************************************/
/* Copyright 1988 MBARI                                                 */
/************************************************************************/
/* Summary  : General Type Definitions                                  */
/* Filename : TYPES.H                                                   */
/* Author   : Daniel Davis, Gregg Morris                                */
/* Project  :                                                           */
/* Version  : Version 1.0                                               */
/* Created  : 03/05/88                                                  */
/* Modified : 03/02/89                                                  */
/* Archived :                                                           */
/************************************************************************/
/* Modification History:                                                    */
/* $Header: /usr/tiburon/.cvsroot/micro/h/types.h,v 1.1.1.1 1997/05/02 17:15:42 pean Exp $
 * $Log: types.h,v $
 * Revision 1.1.1.1  1997/05/02 17:15:42  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  92/05/14  09:17:54  09:17:54  pean (Andrew Pearce 408-647-3746)
 * Initial revision
 *
*/
/****************************************************************************/

#ifndef TYPES_H
#define TYPES_H


#ifndef UNIX
#define UNIX    1
#endif
#ifndef DOS
#define DOS     0
#endif

#define Extern      extern
#define MLocal      static
#define Global      /**/

#ifndef MBool
#define MBool Boolean
#endif

/*
*   Basic types:
*/

#define Reg     register
                /* No value returned type       */
#define Void        void
                /* Boolean, i.e. TRUE or FALSE      */
typedef int     Boolean;
                /* Ternean, i.e. LEFT, RIGHT, STOP, etc.*/
typedef int     Ternean;
                /* character, whatever that is - here   */
                /* it is 8-bit ASCII            */
typedef unsigned char   Char;
                /* Byte - i.e. 8 bit vector, cannot add */
                /* or subtract, multiply or divide, but */
                /* can perform bit vector operations,   */
                /* such as OR, XOR, AND, NOT, EQUAL */
typedef unsigned char   Byte;
                /* word - i.e. 16 bit vector        */
typedef unsigned short  Word;
                /* double word - i.e. 32 bit vector */
typedef unsigned long   DWord;

typedef signed char     Int8;   /* integer, 7 bits of precision with    */
                /* a sign, for arithmetic operations    */

                /* integer, 15 bits of precision with   */
                /* a sign, for arithmetic operations    */
#if UNIX
typedef short   Int16;
#endif
#if DOS
typedef int     Int16;
#endif
                /* integer, 31 bits of precision with   */
                /* a sign, for arithmetic operations    */
typedef long        Int32;
                /* natural number, 16 bits of precision */
                /* for indexing and positive offsets    */
typedef unsigned short  Nat16;
                /* natural number, 32 bits of precision */
                /* for indexing and positive offsets    */
typedef unsigned long   Nat32;
                /* floating point number, 32 total bits */
typedef float       Flt32;
                /* floating point number, 64 total bits */
typedef double      Flt64;
                /* Window handle            */
typedef unsigned int    WHandle;

/*
*   Compound types:
*/
                /* index for return message     */
typedef Int16       RetCode;
                /* Addr address             */
typedef Int32       Addr;
                /* MS-DOS serial port address       */
typedef unsigned short  PortAddr;

#endif
