⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 u_intr.s

📁 The combined demo is dedicated for S1C33L05, so DMT33L05 should be used to load and run the demo. F
💻 S
字号:
;************************************************************************************
; 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -