⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maina.c

📁 基于TS201 Sets up a skeleton overlay system in C
💻 C
字号:
//***********************************************************************
//      Main routine for the TigerSHARC EZ-Kit DSPA (ID 0)
//      Overlay example in C
//      Maina.c
//***********************************************************************

#ifdef __ADSPTS201__
#include "cache_macros.h"
asm("#include <cache_macros.h>");
asm("#include <defts201.h>");
#endif


//************************* Externs *************************************
extern	void inita(void);                                   
extern	void funct1(void);                                   
extern	void funct2(void);                                   
extern	void funct3(void);                                   
extern	void funct4(void);  
                                

//************************** Main Code *********************************
void main(void)
{
#ifdef __ADSPTS201__
	/* in the case of TS201, at the beginning of the program the
	   cache must be enabled. The procedure is contained in the
	   cache_enable macro that uses the refresh rate as input parameter
       -if CCLK=500MHz, refresh_rate=750
       -if CCLK=400MHz, refresh_rate=600
       -if CCLK=300MHz, refresh_rate=450
       -if CCLK=250MHz, refresh_rate=375 */
	asm("cache_enable(750);");					// Enable cache for ADSP-TS201 EZ-KIT
#endif
	inita();									// Initialize system
	funct1();                                   // call function 1
	funct2();                                   // call function 1
	funct3();                                   // call function 1
	funct4();                                   // call function 1
	while(1){}                                  // And wait in infinite loop
}
//***********************************************************************


⌨️ 快捷键说明

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