/****************************************************************************/
/* Copyright 2002 MBARI							*/
/****************************************************************************/
/* Summary  : Main Routine for OASIS Mooring Controller                     */
/* Filename : oasis.c                                                       */
/* Author   : Robert Herlien (rah)					    */
/* Project  : OASIS Mooring Replacement (OASIS3)			*/
/* Revision : 0.1							*/
/* Created  : 10/14/2002						*/
/*									    */
/* MBARI provides this documentation and code "as is", with no warranty,    */
/* express or implied, of its quality or consistency. It is provided without*/
/* support and without obligation on the part of the Monterey Bay Aquarium  */
/* Research Institute to assist in its use, correction, modification, or    */
/* enhancement. This information should not be published or distributed to  */
/* third parties without specific written permission from MBARI.            */
/*									    */
/****************************************************************************/
/* Modification History:						    */
/* 10oct2002 rah - created from OASIS oasis.c				*/
/****************************************************************************/

#include	<mbariTypes.h>		/* MBARI type definitions	    */
#include	<mbariConst.h>		/* MBARI constants		    */
#include	<cfxbios.h>		// Persistor BIOS and I/O Definitions
#include	<cfxpico.h>		// Persistor PicoDOS Definitions
#include	<oasis.h>		/* OASIS controller definitions	    */
#include	<io.h>			/* OASIS I/O definitions	    */
#include	<stdio.h>


/********************************/
/*	External Data		*/
/********************************/

Extern volatile Nat32	tick;		/* 10 ms ticker			    */
//Extern Reg TimeOfDay	tod;		/* Current time in TimeOfDay format */


/************************************************************************/
/* Function    : main							*/
/* Purpose     : Main entry point					*/
/* Inputs      : None							*/
/* Outputs     : None							*/
/* Comments    : Never returns						*/
/************************************************************************/
int main( int argc, char **argv)
{
#pragma unused (argc, argv)

  // Identify the progam and build
  printf("\nProgram: %s: %s %s \n", __FILE__, __DATE__, __TIME__);
  // Identify the device and its firmware
  printf("Persistor CF%d SN:%ld   BIOS:%d.%d   PicoDOS:%d.%d\n", CFX,
	 BIOSGVT.CFxSerNum, BIOSGVT.BIOSVersion, BIOSGVT.BIOSRelease, 
	 BIOSGVT.PICOVersion, BIOSGVT.PICORelease);
	
	
  printf("OASIS test program\n\n");
  io_init();			/* Initialize			   */

  do
  {
    printf("Tick = %lu.  Hit char to continue, ctrl-C to end\n", tick);

  } while(cgetc() != 3);

  printf("Got ctrl-C.  Goodbye\n");

// Various exit strategies
  BIOSReset();			// full hardware reset
  return(0);

}	//____ main() ____//

