📄 sys_irq.c
字号:
//====================================================================================
//文 件 名:Sys_IRQ.c
//功能描述: SPCE3200 40个中断源(硬件)的中断向量分支及软件中断处理。
// 使用时,用户不需要修改此文件中的内容
//维护记录: 2007年1月11日 v1.0 by hongyan.Feng
//====================================================================================
//===================================================
// 声明用户定义外部中断服务函数
//===================================================
extern void IRQ63(void);
extern void IRQ62(void);
extern void IRQ61(void);
extern void IRQ60(void);
extern void IRQ59(void);
extern void IRQ58(void);
extern void IRQ57(void);
extern void IRQ56(void);
extern void IRQ55(void);
extern void IRQ54(void);
extern void IRQ53(void);
extern void IRQ52(void);
extern void IRQ51(void);
extern void IRQ50(void);
extern void IRQ49(void);
extern void IRQ48(void);
extern void IRQ47(void);
extern void IRQ46(void);
extern void IRQ45(void);
extern void IRQ44(void);
extern void IRQ43(void);
extern void IRQ42(void);
extern void IRQ41(void);
extern void IRQ40(void);
extern void IRQ39(void);
extern void IRQ38(void);
extern void IRQ37(void);
extern void IRQ36(void);
extern void IRQ35(void);
extern void IRQ34(void);
extern void IRQ33(void);
extern void IRQ32(void);
extern void IRQ31(void);
extern void IRQ30(void);
extern void IRQ29(void);
extern void IRQ28(void);
extern void IRQ27(void);
extern void IRQ26(void);
extern void IRQ25(void);
extern void IRQ24(void);
//====================================================
// 语法格式:void intmsg(void)
// 功能描述: 软件中断及除SPCE3200 40个硬件中断之外的
// S+core内核硬件中断处理程序
// 入口参数: 无
// 出口参数: 无
//====================================================
void intmsg(void)
{
while(1);
}
//====================================================
// 语法格式:void irq_dispatch(unsigned int cp0_cause)
// 功能描述: 取SPCE3200 40个硬件中断的中断向量号,
// 根据中断向量号调用相应中断服务程序
// 入口参数: cp0_cause为S+core内核寄存器cr2的内容
// 其中第23~18位为63个硬件中断的中断请求(中断向量号)
// 出口参数: 无
//====================================================
void irq_dispatch(unsigned int cp0_cause)
{
int intvec=0;
intvec = (cp0_cause & 0x00FC0000)>>18;
//取中断向量号
switch (intvec)
{
case 63: //保留
IRQ63();
break;
case 62: //保留
IRQ62();
break;
case 61: //保留
IRQ61();
break;
case 60: //保留
IRQ60();
break;
case 59: //MIC溢出中断
IRQ59();
break;
case 58: //ADC中断
IRQ58();
break;
case 57: //TMB中断
IRQ57();
break;
case 56:
IRQ56(); //Timer中断
break;
case 55:
IRQ55(); //TV vblanking start中断
break;
case 54:
IRQ54(); //LCD vblanking start中断
break;
case 53:
IRQ53(); //保留
break;
case 52: //Light Gun中断
IRQ52();
break;
case 51: //CSI frame end中断
IRQ51();
break;
case 50: //CSI coordinate hit中断
IRQ50();
break;
case 49: //CSI motion frame end中断
IRQ49();
break;
case 48: //CSI capture done中断
IRQ48();
break;
case 47: //TV coordinate hit中断
IRQ47();
break;
case 46: //保留
IRQ46();
break;
case 45: //USB host+device中断
IRQ45();
break;
case 44: //SIO中断
IRQ44();
break;
case 43: //SPI中断
IRQ43();
break;
case 42: //UART中断
IRQ42();
break;
case 41: //Nand中断
IRQ41();
break;
case 40: //SD中断
IRQ40();
break;
case 39: //I2C中断
IRQ39();
break;
case 38: //I2S中断
IRQ38();
break;
case 37: //APBDMA CH1中断
IRQ37();
break;
case 36: //APBDMA CH2中断
IRQ36();
break;
case 35: //LDM DMA中断
IRQ35();
break;
case 34: //BIN DMA中断
IRQ34();
break;
case 33: //APBDMA CH3中断
IRQ33();
break;
case 32: //APBDMA CH4中断
IRQ32();
break;
case 31: //RTC中断
IRQ31();
break;
case 30: //MP4中断
IRQ30();
break;
case 29: //C3--ECC Module中断
IRQ29();
break;
case 28: //GPIO中断
IRQ28();
break;
case 27: //BUFCTL and TVvblanking end中断
IRQ27();
break;
case 26: //保留
IRQ26();
break;
case 25: //保留
IRQ25();
break;
case 24: //保留
IRQ24();
break;
default:
break;
}
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -