isr.asm

来自「在dsp芯片TOM320VC5402下电话接口的简单c程序实现」· 汇编 代码 · 共 60 行

ASM
60
字号
    ;; DSP/BIOS includes
    .include c54.h54
    .include gbl.h54
    .include hwi.h54

    .ref _handsetCodecService, _daaCodecService
    
    .global handsetCodecIsr, daaCodecIsr


;*******************************************************************
; Handset Codec Interrupt Service Routine
;*******************************************************************

handsetCodecIsr:

    HWI_enter C54_CNOTPRESERVED, 0ffffh
    ; cpl = 0
    ; dp = GBL_A_SYSPAGE

    ; We need to set cpl bit when going to C
    ssbx      cpl
    nop                             ; cpl latency

    call      _handsetCodecService  ; call Handset c service function

    rsbx      cpl                   ; HWI_exit precondition
    nop                             ; cpl latency

    ld        #GBL_A_SYSPAGE, dp

    HWI_exit  C54_CNOTPRESERVED, 0ffffh


;*******************************************************************
; DAA Codec Interrupt Service Routine
;*******************************************************************

daaCodecIsr:

    HWI_enter C54_CNOTPRESERVED, 0ffffh
    ; cpl = 0
    ; dp = GBL_A_SYSPAGE

    ; We need to set cpl bit when going to C
    ssbx      cpl
    nop                             ; cpl latency

    call      _daaCodecService      ; call DAA c service function

    rsbx      cpl                   ; HWI_exit precondition
    nop                             ; cpl latency

    ld        #GBL_A_SYSPAGE, dp

    HWI_exit  C54_CNOTPRESERVED, 0ffffh

	.end

⌨️ 快捷键说明

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