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