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

📄 isr_config.c

📁 BF533的程序
💻 C
字号:
/******************************************************************************/
//
// Name: 	BF532-based EZ-KIT Interrupt Setup
//
/******************************************************************************

File Name:	ISR_Config.c

Purpose:		The file sets up all interrupts required 
				

*********************************************************************************/


#include <cdefBF533.h>
#include <stdlib.h>
#include <sys\exception.h>		//	Interrupt Handling Header
#include "flashsetup.h"

void UART_PUTC(char TXD);
extern volatile int done;
EX_INTERRUPT_HANDLER(DMA0_PPI_ISR)	// <--|declaration in  exception.h -->
{									//    |declaration with _pragma(interrupt) the ISR Startaddress 
	unsigned char *Ptr, *Y, *Cb, *Cr;
	unsigned char *YCbCr;
	short *fimage;
	int i, j, k, oddfield;
	short temp;

	//	Disable the interrupt request
	*pDMA0_IRQ_STATUS = 0x1;	
    
	//	Disable PPI port here
	*pPPI_CONTROL &= ~PORT_EN;
	
	//	Start watermarking indicator
	*pFlashA_PortB_Out = 0x04;		// initialize LED6 to ON	
	
	//	Partition the whole chunk of image read from the video decoder
	//	into Y, Cb and Cr planes
	
	

	//printf( "\nThe DMA0 PPI Interrupt has been entered!\n" );

	done=1;
	
}//end DMA0_PPI_ISR

EX_INTERRUPT_HANDLER(MDMA_ISR)	// <--|declaration in  exception.h -->
{									//    |declaration with _pragma(interrupt) the ISR Startaddress 

	//	Disable the interrupt request
//	*pMDMA_S0_IRQ_STATUS = 0x1;	
//    *pMDMA_D0_IRQ_STATUS = 0x1;	
//	printf( "\nThe MDMA Interrupt has been entered!\n" );

	done=1;
	
}//end DMA0_PPI_ISR


void Init_Interrupts(void)
{

	// configure interrupt
	*pSIC_IAR0 = *pSIC_IAR0 & 0xffffffff | 0x00000000;	
	*pSIC_IAR1 = *pSIC_IAR1 & 0xffffffff | 0x00000001;	//	map DMA0 PPI Interrupt -> IVG8
	*pSIC_IAR2 = *pSIC_IAR2 & 0xffffffff | 0x00300000;	
														
	
	register_handler(ik_ivg8, DMA0_PPI_ISR);			//	assign DMA0 PPI ISR to interrupt vector 8
    register_handler(ik_ivg9, MDMA_ISR);
	
	*pSIC_IMASK=0x00200100; //	all interrupts 0=disabled but DMA0 PPI interrupt enabled	
		

}//end Init_Interrupts


⌨️ 快捷键说明

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