/*
* Copyright 2008 by Spectrum Digital Incorporated.
* All rights reserved. Property of Spectrum Digital Incorporated.
*/
/*
* EVMOMAPL137 Test Suite
*
*/
#include "stdio.h"
#include "evmomapl137.h"
/* ------------------------------------------------------------------------ *
* *
* Testing Function *
* *
* ------------------------------------------------------------------------ */
void TEST_execute( Int16 ( *funchandle )( ), char *testname, Int16 testid )
{
Int16 status;
/* Display test ID */
printf( "\n%02d Testing %s...\n", testid, testname );
/* Call test function */
status = funchandle(testid);
/* 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 uart_test();
/* ------------------------------------------------------------------------ *
* *
* main( ) *
* *
* ------------------------------------------------------------------------ */
void main( void )
{
/* Initialize OMAPL137 */
EVMOMAPL137_init( );
/* Initialize UART */
UARTINT();
TEST_execute( uart_test, "UART", 1 );
printf( "\n***ALL Tests Passed***\n" );
SW_BREAKPOINT;
}