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

📄 handle_rtcostimer.s

📁 ARM嵌入式系统关于IRQ中断处理基于c语言的实验代码
💻 S
字号:
	IMPORT	osTimer_OSMR0
	IMPORT	osTimer_OSSR
	IMPORT	osTimer_OSCR


	IMPORT	ledStatusBuffer
	IMPORT	osScanInterval

	IMPORT	button_statusFetch
	IMPORT	led_statusSet
	IMPORT	rtc_functionConfigure



	EXPORT	handle_osTimer0New

	AREA handle_osTimer0New ,CODE ,READONLY

	stmfd r13!,{r14}
	
	mov r14,pc
	;$$$$$
	;input:null
	;
	ldr pc,=button_statusFetch
	;
	;output:r0--0 means no input, --!0 input value
	;$$$$$


	cmp r0,#0x40
	beq rtcRecountBranch

	cmp r0,#0x80
	beq rtcCountStartBranch

	b handleRtcEnd

;////////

rtcCountStartBranch
	mov r0,#0x1

	b xx
;////////

rtcRecountBranch
	ldr r11,=ledStatusBuffer	
	mov r0,#0x0
	str r0,[r11]

	mov r14,pc
	;$$$$$
	;input:r0--value 
	;
	ldr pc,=led_statusSet
	;
	;output:null
	;$$$$$	

	mov r0,#0x0


xx
	mov r14,pc
	;$$$$$
	;input:r0--1 enable trim function;--0 disable trim function
	;
	ldr pc,=rtc_functionConfigure
	;
	;output:null
	;$$$$$

	b handleRtcEnd

;/////////

handleRtcEnd
	ldr r10,=osTimer_OSMR0
	ldr r4,=osScanInterval
	ldr r11,=osTimer_OSCR
	ldr r5,[r11]
	add r4,r4,r5
	str r4,[r10]

	ldr r11,=osTimer_OSSR
	ldr r4,[r11]
	and r4,r4,#0x1
	str r4,[r11]				;clear OSTimer0 status.

	ldmfd r13!,{pc}

	END




	ldmfd r13!,{pc}

	END





⌨️ 快捷键说明

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