u_intr.s
来自「The combined demo is dedicated for S1C33」· S 代码 · 共 115 行
S
115 行
;************************************************************************************
; This file includes interrupt handler(s) for ITRON kernel. *
; *
;$Revision: 1.1 $ *
;************************************************************************************
;************************************************************************************
;* Entry of .global definition *
;************************************************************************************
.global Int_HS3xfer
.global Int_TM8_3
.global Int_USB_Mon
.global Int_NIKKA
;************************************************************************************
;* HSDMA CH.3 Transfer End interrupt occurred *
;************************************************************************************
Int_HS3xfer:
; save all registers
pushn %r15
ld.w %r0,%alr
ld.w %r1,%ahr
pushn %r1
; call interrupt function of c program
xcall MasterDMAXferEndProc
; load all registers
popn %r1
ld.w %ahr,%r1
ld.w %alr,%r0
popn %r15
; interrupt return
reti
;************************************************************************************
;* Timer0 interrupt occurred *
;************************************************************************************
Int_TM8_3:
; save all registers
pushn %r15
ld.w %r0,%alr
ld.w %r1,%ahr
pushn %r1
; call interrupt function of c program
xcall WaitTMIntProc
; load all registers
popn %r1
ld.w %ahr,%r1
ld.w %alr,%r0
popn %r15
; interrupt return
reti
;************************************************************************************
;* USB_MON interrupt occurred *
;************************************************************************************
Int_USB_Mon:
; multi interrupt enable
pushn %r0
ld.w %r0,%psr
or %r0,0x010
ld.w %psr,%r0 ; IE = 1, Interrupt:Enable
popn %r0
; save all registers
pushn %r15
ld.w %r0,%alr
ld.w %r1,%ahr
pushn %r1
; call interrupt function of c program
xcall USB_MON_Proc
; load all registers
popn %r1
ld.w %ahr,%r1
ld.w %alr,%r0
popn %r15
; interrupt return
reti
;************************************************************************************
;* port input interrupt occurred *
;************************************************************************************
Int_NIKKA:
; save all registers
pushn %r15
ld.w %r0,%alr
ld.w %r1,%ahr
pushn %r1
; call interrupt function of c program
xcall InterruptProc
; load all registers
popn %r1
ld.w %ahr,%r1
ld.w %alr,%r0
popn %r15
; interrupt return
reti
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?