limit number of loops inside main_runLoop.
This commit is contained in:
@@ -57,7 +57,9 @@ main_loop:
|
|||||||
bigcall systemSleep ; system-dependant
|
bigcall systemSleep ; system-dependant
|
||||||
|
|
||||||
; run loop as long as some run function returns with CFLAG set
|
; run loop as long as some run function returns with CFLAG set
|
||||||
|
clr r17
|
||||||
main_runLoop:
|
main_runLoop:
|
||||||
|
push r17
|
||||||
clr r16
|
clr r16
|
||||||
push r16
|
push r16
|
||||||
bigcall runModules
|
bigcall runModules
|
||||||
@@ -72,9 +74,15 @@ main_runLoop:
|
|||||||
push r16
|
push r16
|
||||||
bigcall onEveryLoop ; call into main app
|
bigcall onEveryLoop ; call into main app
|
||||||
pop r16
|
pop r16
|
||||||
|
pop r17
|
||||||
|
|
||||||
tst r16
|
tst r16
|
||||||
brne main_runLoop
|
breq main_endRunLoop
|
||||||
|
inc r17
|
||||||
|
cpi r17, 2
|
||||||
|
brcc main_endRunLoop
|
||||||
|
brne main_runLoop
|
||||||
|
main_endRunLoop:
|
||||||
|
|
||||||
#ifdef MODULES_NETWORK
|
#ifdef MODULES_NETWORK
|
||||||
#ifndef MAIN_WITHOUT_MSG_HANDLING
|
#ifndef MAIN_WITHOUT_MSG_HANDLING
|
||||||
|
|||||||
Reference in New Issue
Block a user