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

📄 intrpt.c

📁 ISP1581设计的大容量存储器固件程序。 包含以下文件: d14.h i2c.c i2c.h init.c intrpt.c kernel.c
💻 C
字号:
//***********************************************************************
//									     								*
//                P H I L I P S   P R O P R I E T A R Y          		*
//                                                                      *
//          COPYRIGHT (c)   1999 BY PHILIPS SINGAPORE (APIC).    		*
//                    --  ALL RIGHTS RESERVED  --                 		*	
//                                                                      *
// 	File Name	:       Kernel.c                                        *
// 	Author		:       Albert Goh					 					*
// 	Created		:      	3 March 2000                               		*
//                  	                                                *
//***********************************************************************
//***********************************************************************
//                                                                      *
// Kernel.c is the control centre for this evaluation firmware. It will *
// control where should the firmware branch through via the selection 	*
// of the UART port of the 8051. if not via the UART, it will be from 	*
// the selection of the code defintion                                  *
//                                                                      *
//***********************************************************************
//***********************************************************************
//                                                                      *
//  Module History														*
//  **************														*
//																		*
//  Date   	Version			Author				Changes					*
//  ====	=======			======				=======					*
//  030300	  0.1 			Albert				Created    				*
//                                                                      *
//                                                                      *
//***********************************************************************
//***********************************************************************
//*																		*
//*	                     Include Files Definition						*
//*																		*
//***********************************************************************

#include "standard.h"
#include "Kernel.h"
#include "D14.h"

extern KERNEL Kernel_Flag;
extern D14_CNTRL_REG pdata *D14_Cntrl_Ptr;
extern DMA_INT_FLAG DMA_Int_Flag;
extern USB_INT_FLAG USB_Int_Flag;
extern void Init_D14(void);
extern void Start_mSEC_Timer(Data);
extern UI Temp;
extern UI count;


//***********************************************************************
//*																		*
//*	                     Variable Definition 							*
//*																		*
//***********************************************************************


UC	idata	Data;

//***********************************************************************
//*																		*
//*	                     Routine Definition								*
//*																		*
//***********************************************************************

void Int_2(void) interrupt 2 using 0
{
}

void Int_3(void) interrupt 3 using 0
{
}

void Int_4(void) interrupt 4 using 0
{
}

//***********************************************************************
//*										    							*
//*	Routine 	: Int_Timer0                                      		*
//*	Input		: Timer 0 overflow  									*
//*	Output		: Set time up flag                    					*
//*	Function	: To set the time up flag                   			*
//*																		*
//***********************************************************************

void Int_Timer0(void) interrupt 1 using 0
{

	Kernel_Flag.BITS.Timer_Expired = 1;
}

//***********************************************************************
//*										    							*
//*	Routine 	:	                                               		*
//*	Input		: D14_INT, 	        									*
//*	Output		:	                                   					*
//*	Function	:	                                         			*
//*																		*
//***********************************************************************

void Int_Ext_0(void) interrupt 0 using 1
{


	EX0 = 0;

	USB_Int_Flag.VALUE |= D14_Cntrl_Ptr->D14_INT.VALUE;//Read Interrup reg.  

   /*      if(USB_Int_Flag.BITS.DMA)
         {
	         DMA_Int_Flag.VALUE |= D14_Cntrl_Ptr->D14_DMA_INT.VALUE;
             D14_Cntrl_Ptr->D14_DMA_INT.VALUE = DMA_Int_Flag.VALUE;		//clear the interrupt
         }
     */    
	D14_Cntrl_Ptr->D14_INT.VALUE = USB_Int_Flag.VALUE;	
	USB_Int_Flag.VALUE &= 0X792D0000;	
	//clear interrupt

	if(USB_Int_Flag.BITS.RESET)
	{

		USB_Int_Flag.BITS.RESET = 0;
//		HS_FS_LED = FULL_SPEED;
		Kernel_Flag.BITS.HS_FS_State = FULL_SPEED;
		Kernel_Flag.BITS.Register_Test = 0;

		Init_D14();

	}
         
	EX0 = 1;

}	

⌨️ 快捷键说明

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