📄 davincievm.c
字号:
/*
* Copyright 2005 by Spectrum Digital Incorporated.
* All rights reserved. Property of Spectrum Digital Incorporated.
*
* Not for distribution.
*/
/*
* Board Setup ( for ARM and/or DSP )
*
*/
#include "davincievm.h"
/* ------------------------------------------------------------------------ *
* *
* DAVINCIEVM_init( ) *
* *
* *
* *
* *
* *
* ------------------------------------------------------------------------ */
Int16 DAVINCIEVM_init( )
{
DAVINCIEVM_PMX_init( ); // Setup Pin Mux
/* ---------------------------------------------------------------- *
* *
* The commented code below is assumed to have already been *
* called in the ARM GEL file. The GEL file will setup the *
* pll, power domains, ddr2, aemif, and clocks. *
* *
* ---------------------------------------------------------------- */
DAVINCIEVM_initPsc( ); // Setup PSC
DAVINCIEVM_enablePowerModule( 0, 18 ); // Enable I2C
DAVINCIEVM_enablePll1( 0, 16 ); // Setup Pll1 ( Clk @ 459 MHz )
DAVINCIEVM_I2C_init( ); // Setup I2C
return 0;
}
/* ------------------------------------------------------------------------ *
* *
* DAVINCIEVM_wait( delay ) *
* *
* Wait in a software loop *
* *
* ------------------------------------------------------------------------ */
void DAVINCIEVM_wait( Uint32 delay )
{
volatile Uint32 i;
for ( i = 0 ; i < delay ; i++ );
}
/* ------------------------------------------------------------------------ *
* *
* DAVINCIEVM_waitusec( usec ) *
* *
* Wait in a software loop for X microseconds *
* *
* ------------------------------------------------------------------------ */
void DAVINCIEVM_waitusec( Uint32 usec )
{
#ifdef ARM_SIDE
DAVINCIEVM_wait( ( usec * 51 ) >> 6 );
#elif DSP_SIDE
DAVINCIEVM_wait( ( usec * 28 ) );
#endif
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -