/*FILE HEADER**************************************************************
 *
 *  File name		: cld.c
 *  RCS Revision Number	: 
 *  Last Modified	: oct-10-1994 by s.coudray/MBARI-IFREMER
 *  Last Modified	: $Date: 94/10/28 09:23:28 $
 *  CSCI name		: Real-Time Graphics System - Applications Interface
 *  CSC name		: All functions
 *  Notes:
 *      This file contains code used to debug and test the SVME-770 RTGS.
 *      This code is provided as an example of how to call the RTGS functions
 *      from a host application.
 *  History		:
 *      Created 94/01/17 by Jeff Sanderson
 *	1994-Oct-10 - Sylvain Coudray
 *		Taking out all statements relative to CIT that is
 *		not provided with video card.
 *
 *END FILE HEADER*********************************************************/

#include "dy4std.h"
#include "es.h"
#include "css.h"

#include "rtgs_ai.h"
#include "video.h"
#include "colours.h"

#include "test.h"


void test_cld( void );
/*-----------------------------------------------------------------------*/

void test_cld( void )
{
    uint32 tmp1;
    uint32 tmp2;
    uint32 i;

    init( "CLD test" );

/*MBARI-IFREMER ### This part of software is not provided with our card
 *ENDMBARI-IFREMER*/

/*    Run_diagnostics( ); */
    
    do{
	tmp1 = FRAME_COUNT;
/*MBARI-IFREMER ### this function is not available with vxworks
 *	Wait( 20000 );      
 *ENDMBARI-IFREMER*/
	for (i=1;i<20000;i++) {
        } ;
	tmp2 = FRAME_COUNT;
    }while( tmp1 == tmp2 );
    
    if( *(uint8 *)(VME_ADDR(0xCC003010)) == 1 )
    {
        Printf("CLD Passed\n");
    }
    else
    {
        Printf("CLD Failed\n");
    }

    Key_wait();
}

/*-----------------------------------------------------------------------*/
