📄 irq_timer.s
字号:
;定时器中断汇编入口
;- File source : irq_timer.s
;- Object : Assembler timer Interrupt Handler.
;-
;- 1.0 14/Feb/03 JPP : Creation
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
;- Area Definition
;------------------------------------------------------------------------------
AREA itHandler, CODE, READONLY
INCLUDE Includes/AT91RM9200.inc
INCLUDE Interrupt/irq_arm.mac
;------------------------------------------------------------------------------
;- Function : OSTickISR
;- Treatments : Timer 0 interrupt handler.
;- Called Functions : timer_c_irq_handler
;- Called Macros : IRQ_ENTRY, IRQ_EXIT
;------------------------------------------------------------------------------
EXPORT OSTickISR
IMPORT timer_c_irq_handler ;通用定时器服务C函数
OSTickISR ;定时器0汇编入口句柄
;- Manage Exception Entry
IRQ_ENTRY_T0
;- Call the timer Interrupt C handler
ldr r0, =AT91C_BASE_TC0 ;定时器指针
ldr r1, =timer_c_irq_handler
mov r14, pc
bx r1
;- Irq exit
;- Manage Exception Exit
IRQ_EXIT_T0
;------------------------------------------------------------------------------
;- Function : timer1_asm_irq_handler
;- Treatments : Timer 1 interrupt handler.
;- Called Functions : timer_c_irq_handler
;- Called Macros : IRQ_ENTRY, IRQ_EXIT
;------------------------------------------------------------------------------
EXPORT timer1_asm_irq_handler
IMPORT timer_c_irq_handler
timer1_asm_irq_handler ;定时器1汇编入口句柄
;- Manage Exception Entry
IRQ_ENTRY_T0
;- Call the timer Interrupt C handler
ldr r0, =AT91C_BASE_TC1
ldr r1, =timer_c_irq_handler
mov r14, pc
bx r1
;exit_irq
;- Manage Exception Exit
IRQ_EXIT_T0
;------------------------------------------------------------------------------
;- Function : timer2_asm_irq_handler
;- Treatments : Timer 2 interrupt handler.
;- Called Functions : timer_c_irq_handler
;- Called Macros : IRQ_ENTRY, IRQ_EXIT
;------------------------------------------------------------------------------
EXPORT timer2_asm_irq_handler
IMPORT timer_c_irq_handler
timer2_asm_irq_handler ;定时器2汇编入口句柄
;- Manage Exception Entry
IRQ_ENTRY
;- Call the timer Interrupt C handler
ldr r0, =AT91C_BASE_TC2
ldr r1, =timer_c_irq_handler
mov r14, pc
bx r1
;exit_irq
;- Manage Exception Exit
IRQ_EXIT
;------------------------------------------------------------------------------
;- Function : timer3_asm_irq_handler
;- Treatments : Timer 3 interrupt handler.
;- Called Functions : timer_c_irq_handler
;- Called Macros : IRQ_ENTRY, IRQ_EXIT
;------------------------------------------------------------------------------
EXPORT timer3_asm_irq_handler
IMPORT timer_c_irq_handler
timer3_asm_irq_handler ;定时器3汇编入口句柄
;- Manage Exception Entry
IRQ_ENTRY
;- Call the timer Interrupt C handler
ldr r0, =AT91C_BASE_TC3
ldr r1, =timer_c_irq_handler
mov r14, pc
bx r1
;exit_irq
;- Manage Exception Exit
IRQ_EXIT
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -