📄 isr.asm
字号:
//============================================================================//
// 文件名: ISR.asm
// 描 述: 主要处理中断部分的程序,包括DVR中断、USB模组的外部中断。
// 日 期: 2003/04/03
// 库文件: NONE
//=============================================================================//
.public _BREAK
.public _FIQ
.public _IRQ0
.public _IRQ1
.public _IRQ2
.public _IRQ3
.public _IRQ4
.public _IRQ5
.public _IRQ6
.public _IRQ7
.include hardware.inc
.include dvr.inc
.external _fn_usb_isr
.external _Interrupt_Off
.external _Interrupt_On
.TEXT
_FIQ:
PUSH r1,r5 to [sp];
r1=0x2000;
test r1,[P_INT_Ctrl];
jnz L_FIQ_TimerA;
r1=0x0800;
test r1,[P_INT_Ctrl];
jnz L_FIQ_TimerB;
L_FIQ_PWM:
r1=C_FIQ_PWM;
[P_INT_Clear]=r1;
POP R1,R5 from[sp];
reti;
L_FIQ_TimerB:
[P_INT_Clear]=r1;
pop r1,r5 from [sp];
reti;
L_FIQ_TimerA:
r1=0x0001;
[P_Watchdog_Clear]=r1;
call F_FIQ_Service_SACM_DVR // for playback
r1=0x2000;
[P_INT_Clear]=r1;
pop r1,r5 from [sp];
reti;
/////////////////////////////////////////////////////////////////////////////////////////
// Function: Interrupt Service routine Area
// Service for IRQ1 - IRQ7
// User's IRQ must hook on here
/////////////////////////////////////////////////////////////////////////////////////////
_BREAK:
push r1,r4 to [sp]
pop r1,r4 from [sp]
reti
// ---------------------------------------------------------------------------
_IRQ0:
push r1,r4 to [sp]
pop r1,r4 from [sp]
reti
// ---------------------------------------------------------------------------
_IRQ1:
push r1,r4 to [sp]
pop r1,r4 from [sp]
reti
// ---------------------------------------------------------------------------
_IRQ2:
push r1,r4 to [sp]
pop r1,r4 from [sp]
reti
// ---------------------------------------------------------------------------
_IRQ3:
push r1,r5 to [sp] //压栈保护
r1=0x0100
test r1,[P_INT_Ctrl] //比较是否为IRQ3_EXT1
jnz irq3_ext1 //是,则转至对应程序段;
r1=0x0200
test r1,[P_INT_Ctrl] //否,则比较是否为IRQ3_EXT2
jnz irq3_ext2 //是,则转至对应程序段;
irq3_key: //否,则进入键唤醒中断
r1=0x0080
[P_INT_Clear]=r1
jmp ExitIrq3
irq3_ext2://turn on led
r1=0x0200
[P_INT_Clear]=r1
jmp ExitIrq3
irq3_ext1://turn off led
//int off;
r1=0x0100
[P_INT_Clear]=r1
int off;
r1=0x0001;
[P_Watchdog_Clear]=r1;
call _fn_usb_isr//
int irq,fiq;
ExitIrq3:
pop r1,r5 from [sp]
reti
// ---------------------------------------------------------------------------
_IRQ4:
push r1,r4 to [sp]
pop r1,r4 from [sp]
reti
// ---------------------------------------------------------------------------
_IRQ5:
push r1,r4 to [sp]
pop r1,r4 from [sp]
reti
// ---------------------------------------------------------------------------
_IRQ6:
push r1,r4 to [sp]
pop r1,r4 from [sp]
reti
// ---------------------------------------------------------------------------
_IRQ7:
push r1,r4 to [sp]
pop r1,r4 from [sp]
reti
// ---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -