/* * Copyright 2009 by Spectrum Digital Incorporated. * All rights reserved. Property of Spectrum Digital Incorporated. */ #include "stdio.h" #include "usbstk5505.h" /* ------------------------------------------------------------------------ * * * * Testing Function * * * * ------------------------------------------------------------------------ */ void TEST_execute( Int16 ( *funchandle )( ), char *testname, Int16 testid ) { Int16 status; /* Display test ID */ printf( "%02d Testing %s...\n", testid, testname ); /* Call test function */ status = funchandle( ); /* Check for test fail */ if ( status != 0 ) { /* Print error message */ printf( " FAIL... error code %d... quitting\n", status ); /* Software Breakpoint to Code Composer */ SW_BREAKPOINT; } else { /* Print error message */ printf( " PASS\n" ); } } extern Int16 aic3204_test( ); /* ------------------------------------------------------------------------ * * * * main( ) * * * * ------------------------------------------------------------------------ */ void main( void ) { /* Initialize BSL */ USBSTK5505_init( ); printf("EXBUSSEL = %02x\n", SYS_EXBUSSEL); TEST_execute( aic3204_test, "AIC3204", 1 ); printf( "\n***ALL Tests Passed***\n" ); SW_BREAKPOINT; }