/****************************************************************************/
/* Copyright 1995-2010 MBARI												*/
/****************************************************************************/
/* $Header: /home/cvs/oasis4/src/controller/drivers/li820.h,v 1.1 2011/10/25 22:39:21 bobh Exp $			*/
/* Summary	: Driver Routines for LiCor pCO2 Analyzer on OASIS mooring		*/
/* Filename : licor.c														*/
/* Author	: Robert Herlien (rah)											*/
/* Project	: OASIS Mooring													*/
/* $Revision: 1.1 $															*/
/* Created	: 17may2010 from SOON version of li820.h						*/
/*																			*/
/* 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:													*/
/* 17may2010 rah - created from SOON version of li820.h						*/
/* $Log: li820.h,v $
/* Revision 1.1	 2011/10/25 22:39:21  bobh
/* Initial oasis4 revision
/*
/* Revision 1.2	 2011/02/24 00:00:11  bobh
/* Changes to: support calling drivers from scripts, better diagnostics for scripts, driver mods
/*
/* Revision 1.1	 2010/05/20 18:27:28  bobh
/* Added Licor820 driver for Gernot
/*
 */
/****************************************************************************/

#ifndef INCLI820h
#define INCLI820h		1

#define LI_BUFSIZE		256

#define VALVE_TIME		(TICKS_PER_SECOND/10)  /* Pulse valves for 100 ms	*/
#define VALVE_A1(n)		(n)				/* Offset from start of valve bits	*/
#define VALVE_A2(n)		(n+1)
#define VALVE_B1(n)		(n+2)
#define VALVE_B2(n)		(n+3)
#define VALVE_C1(n)		(n+4)
#define VALVE_C2(n)		(n+5)
#define VALVE_D1(n)		(n+6)
#define VALVE_D2(n)		(n+7)

#define INIT_LI_TIME	(licorDebug ? 20 : 240) /* Init time pump is on before LI820	*/
#define LI_TIME			(licorDebug ? 20 : 60)	/* Time LI820 is on before sampling		*/
#define PUMP_OFF_TIME	 10						/* Time pump is off before sampling		*/


/****************************************/
/*		Prototype Function Declarations */
/****************************************/
MBool	li820_wake(Driver *dp, MBool on);
Void	li820_drv(Driver *dp);
Void	li820_single_drv(Driver *dp);

#endif /* INCLI820h */
