head 1.1; access ; symbols ; locks oasisa:1.1; strict; comment @ * @; 1.1 date 2001.10.17.10.27.17; author oasisa; state Exp; branches ; next ; desc @common CTD functions @ 1.1 log @Initial revision @ text @/****************************************************************************/ /* Copyright 2001 MBARI */ /****************************************************************************/ /* $Header $*/ /* Summary : Shared Driver Routines CTD, Tstring on OASIS mooring */ /* Filename : ctdcommon.c */ /* Author : Kent Headley (klh) */ /* Project : OASIS Mooring */ /* $Revision $ */ /* Created : 08/03/2001 from ctd.c */ /* */ /* 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: */ /* 03Aug2001 klh - created from ctd.c */ /* $Log:$ */ /****************************************************************************/ #include /* MBARI type definitions */ #include /* MBARI constants */ #include /* OASIS controller definitions */ #include /* OASIS I/O definitions */ #include /* CTD_TS definition */ #include <80C196.h> /* 80196 Register mapping */ #include /* Standard I/O functions */ /********************************/ /* External Functions */ /********************************/ Extern Int16 xgetc_tmout( Nat16 tmout ); /************************************************************************/ /* Function : getCtdPrompt */ /* Purpose : Look for CTD prompt */ /* Inputs : Timeout in seconds */ /* Outputs : OK or ERROR */ /************************************************************************/ Int16 getCtdPrompt( Nat16 timeout ) { Reg Int16 c; Int16 i; for (i = 10; i && ((c = xgetc_tmout(timeout)) != ERROR); i--) if ( c == '>' ) /* Look for prompt */ return( OK ); /* If got it, return OK */ return( ERROR ); /* If timed out, return ERROR */ } /* getCtdPrompt() */ @