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

📄 os_ostimer.s

📁 PXA250嵌入式
💻 S
字号:
	IMPORT	osStack
	IMPORT	osScanInterval
	IMPORT	ledShareInterval
	IMPORT	ledStatusBuffer	


	IMPORT	button_statusFetch
	IMPORT	ot_intervalSet
	IMPORT	led_statusSet
	IMPORT	intIdentify


	EXPORT	dummyOs

	AREA dummyOs ,CODE ,READONLY

	ldr r13,=osStack

pendingMode
	ldr r1,=ledShareInterval
pendingLoop
	sub r1,r1,#0x1
	cmp r1,#0x0
	beq invertLedStatus
;
	mov r14,pc
	;$$$$$
	;input:null
	;
	ldr pc,=button_statusFetch
	;
	;output:r0--0 means no input, --!0 input value
	;$$$$$
;
	cmp r0,#0x0
	bne applicationMode

	b pendingLoop


invertLedStatus
	ldr r11,=ledStatusBuffer	
	ldr r0,[r11]
	mvn r0,r0
	str r0,[r11]

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

	b pendingMode


;/////////////////
;*****************
;////////////////

applicationMode
	ldr r0,=osScanInterval

osScanDelayLoop	
	sub r0,r0,#0x1
	cmp r0,#0x0
	bne osScanDelayLoop

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


	cmp r0,#0x0
	beq osPollIntStatusBranch

	cmp r0,#0x80
	beq osClearOsTimerBranch

	b osSetOsTimerIntervalBranch

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

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

	mov r0,#0xff

osSetOsTimerIntervalBranch
	mov r14,pc
	;$$$$$
	;input:r0--n set osTimer n;--0xff clear all osTimer 
	;
	ldr pc,=ot_intervalSet
	;
	;output:r0--0 means opt normal; --1 failed
	;$$$$$


osPollIntStatusBranch
	mov r14,pc
	;$$$$$
	;input:null
	;
	ldr pc,=intIdentify
	;
	;output:null
	;$$$$$

;///////////

	b applicationMode
	nop
	nop
	END


⌨️ 快捷键说明

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