main.c

来自「davincievm 6446 音瀕檢測」· C语言 代码 · 共 64 行

C
64
字号
/*
 *  Copyright 2005 by Spectrum Digital Incorporated.
 *  All rights reserved. Property of Spectrum Digital Incorporated.
 *
 *  Not for distribution.
 */

/*
 *  AIC33 Tests
 *
 */

#include "stdio.h"
#include "davincievm.h"

/* ------------------------------------------------------------------------ *
 *                                                                          *
 *  Testing Function                                                        *
 *                                                                          *
 * ------------------------------------------------------------------------ */
void TEST_execute( Int16 ( *funchandle )( ), char *testname, Int16 ledmask )
{
    Int16 status;

    /* Display test ID */
    printf( "%02d  Testing %s...\n", ledmask, testname );

    /* Call test function */
    status = funchandle( );

    /* Check for test fail */
    if ( status != 0 )
    {
        /* Print error message */
        printf( "     FAIL... error code %d... quitting\n", status, testname );

        /* Software Breakpoint to Code Composer */
        SW_BREAKPOINT;
    }
    else
    {
        /* Print error message */
        printf( "    PASS\n", testname );
    }
}

extern Int16 aic33_test( );

/* ------------------------------------------------------------------------ *
 *                                                                          *
 *  main( )                                                                 *
 *                                                                          *
 * ------------------------------------------------------------------------ */
void main( void )
{
    /* Initialize BSL */
    DAVINCIEVM_init( );

    TEST_execute( aic33_test, "AIC33", 1 );

    printf( "\n***ALL Tests Passed***\n" );
    SW_BREAKPOINT;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?