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

📄 cslconfig.c

📁 这是个TI公司的TMS320VC5502的专门用的usb通讯程序
💻 C
字号:

/****************************************************************************************/
//
// Filename:  	cslconfig.c
// Function:	Use CSL to configure interrupt
//
/****************************************************************************************/

#include <csl.h>
#include <csl_gpt.h>
#include <csl_irq.h>
#include "sx2.h"
#include "timer.h"

/* Reference start of interrupt vector table   */
/* This symbol is defined in file, vectors.s55 */
extern void VECSTART(void);
/*******************************************************************************/
//
//	Functionname:	Csl_Config();	
//	Function:		Realize chip-support library configuration
//
/********************************************************************************/ 
extern void Csl_Config(void)
{
   unsigned int EventId0;
 	/* Initialize CSL library - This is REQUIRED!!! */
    CSL_init();
    
     
	/* Set IVPH/IVPD to start of interrupt vector table */
	IRQ_setVecs((Uint32)(&VECSTART));
	
    /* Open Timer 0, set registers to power on defaults  And return handle of Timer 0 */
	MyhGpt = GPT_open(GPT_DEV0, GPT_OPEN_RESET);
	
	/* Get Event Id associated with Timer 0, for use with  CSL interrupt enable functions.                    */         
	EventId0 = GPT_getEventId(MyhGpt);
	
	IRQ_globalDisable();
	
	/* Clear any pending Timer interrupts */
	IRQ_clear(EventId0);
	/* Place interrupt service routine address at  associated vector location */
	IRQ_plug(EventId0,&Timer0Isr);
   
	IRQ_clear(IRQ_EVT_INT2);
	IRQ_plug (IRQ_EVT_INT2,&int2_isr);
	
    IRQ_enable (EventId0);
    //IRQ_enable (IRQ_EVT_INT2);	Let this controlled by SysInt_Enable() function
	IRQ_globalEnable();
}         

/******************************************************************************/
//	No more
/******************************************************************************/

⌨️ 快捷键说明

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