improved "run" code.
This commit is contained in:
@@ -175,56 +175,46 @@ initModules:
|
||||
; USED: depending on called routines
|
||||
|
||||
runModules:
|
||||
bigcall BaseTimer_Run
|
||||
clr r16
|
||||
|
||||
push r16
|
||||
bigcall BaseTimer_Run
|
||||
pop r16
|
||||
|
||||
#ifdef MODULES_COM
|
||||
; COM module (call until carry flag cleared but at most 10 times to not starve other modules)
|
||||
ldi r16, 10
|
||||
runModules_Com:
|
||||
push r16
|
||||
bigcall Com2_Run
|
||||
pop r16
|
||||
brcc runModules_ComEnd
|
||||
dec r16
|
||||
brne runModules_Com
|
||||
runModules_ComEnd:
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_TTYONUART1
|
||||
bigcall TtyOnUart1_Run
|
||||
push r16
|
||||
bigcall TtyOnUart1_Run
|
||||
pop r16
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COMONUART0
|
||||
bigcall ComOnUart0_Run
|
||||
push r16
|
||||
bigcall ComOnUart0_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COMONUART1
|
||||
bigcall ComOnUart1_Run
|
||||
push r16
|
||||
bigcall ComOnUart1_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_STATS
|
||||
bigcall Stats_Run
|
||||
push r16
|
||||
bigcall Stats_Run
|
||||
pop r16
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_REED
|
||||
bigcall REED_Run
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_CNY70
|
||||
bigcall CNY70_Run
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_MOTION_LIGHT
|
||||
; rcall MotionLight_Run
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef MODULES_TCRT1000
|
||||
; rcall TCRT1K_Run
|
||||
#endif
|
||||
|
||||
|
||||
; add more modules here
|
||||
|
||||
; check for repeat request
|
||||
tst r16
|
||||
clc
|
||||
breq runModules_end
|
||||
sec
|
||||
runModules_end:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user