irq.s

来自「基于EP7312的MP3播放器源代码,包括MCU和PC端代码.」· S 代码 · 共 138 行

S
138
字号
//****************************************************************************//// IRQ.S - Code for enabling and disabling the IRQ and FIQ interrupts of the//         ARM processor.//// Copyright (c) 1999,2000,2001 Cirrus Logic, Inc.////****************************************************************************#include "../asmdefs.h"#include "../hwport.h"#include "../hwdefs.h"//****************************************************************************//// Read-only code area.////****************************************************************************    _TEXT_//****************************************************************************//// DisableFIQ masks out the FIQ interrupt.////****************************************************************************    _EXPORT_ DisableFIQDisableFIQ _LABEL_    //    // Mask out the FIQ interrupt in the ARM program status register.    //    mrs     r0, cpsr    orr     r0, r0, _CONST_ 0x00000040    msr     cpsr_cf, r0    //    // Return to the caller.    //    mov     pc, lr//****************************************************************************//// EnableFIQ re-enables the FIQ interrupt.////****************************************************************************    _EXPORT_ EnableFIQEnableFIQ _LABEL_    //    // Enable the FIQ interrupt in the ARM program status register.    //    mrs     r0, cpsr    bic     r0, r0, _CONST_ 0x00000040    msr     cpsr_cf, r0    //    // Return to the caller.    //    mov     pc, lr//****************************************************************************//// DisableIRQ masks out the IRQ interrupt.////****************************************************************************    _EXPORT_ DisableIRQDisableIRQ _LABEL_    //    // Mask out the IRQ interrupt in the ARM program status register.    //    mrs     r0, cpsr    orr     r0, r0, _CONST_ 0x00000080    msr     cpsr_cf, r0    //    // Return to the caller.    //    mov     pc, lr//****************************************************************************//// EnableIRQ re-enables the IRQ interrupt.////****************************************************************************    _EXPORT_ EnableIRQEnableIRQ _LABEL_    //    // Enable the IRQ interrupt in the ARM program status register.    //    mrs     r0, cpsr    bic     r0, r0, _CONST_ 0x00000080    msr     cpsr_cf, r0    //    // Return to the caller.    //    mov     pc, lr//****************************************************************************//// DisableTimer disables the timer interrupt.////****************************************************************************    _EXPORT_ DisableTimerDisableTimer _LABEL_    //    // Disable the TIMER1 interrupt source.    //    ldr     r0, =HwBaseAddress    ldr     r1, [r0, _CONST_ HwIntMask]    bic     r1, r1, _CONST_ HwIrqTimer1    str     r1, [r0, _CONST_ HwIntMask]    //    // Return to the caller.    //    mov     pc, lr//****************************************************************************//// EnableTimer enables the timer interrupt.////****************************************************************************    _EXPORT_ EnableTimerEnableTimer _LABEL_    //    // Enable the TIMER1 interrupt source.    //    ldr     r0, =HwBaseAddress    ldr     r1, [r0, _CONST_ HwIntMask]    orr     r1, r1, _CONST_ HwIrqTimer1    str     r1, [r0, _CONST_ HwIntMask]    //    // Return to the caller.    //    mov     pc, lr    _END_

⌨️ 快捷键说明

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