📄 main.c
字号:
/*
* Copyright 2007 by Spectrum Digital Incorporated.
* All rights reserved. Property of Spectrum Digital Incorporated.
*/
/*
* DaVinci HD Test Suite
*
*/
#include "stdio.h"
#include "davincihd.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 );
}
else
{
/* Print error message */
printf( " PASS\n" );
}
}
extern Int16 eeprom_test( );
/* ------------------------------------------------------------------------ *
* *
* main( ) *
* *
* ------------------------------------------------------------------------ */
void main( void )
{
/* Initialize BSL */
DAVINCIHD_init( );
TEST_execute( eeprom_test, "I2C EEPROM", 1 );
printf( "\n***ALL Tests Passed***\n" );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -