comonuartX: handle multiple messages in one run.
still there are NOBUF errors...
This commit is contained in:
@@ -187,25 +187,10 @@ runModules:
|
||||
pop r16
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COMONUART0
|
||||
push r16
|
||||
bigcall ComOnUart0_Run
|
||||
rcall runComModules
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COMONUART1
|
||||
push r16
|
||||
bigcall ComOnUart1_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_STATS
|
||||
push r16
|
||||
bigcall Stats_Run
|
||||
pop r16
|
||||
#endif
|
||||
|
||||
; add more modules here
|
||||
|
||||
@@ -218,6 +203,43 @@ runModules_end:
|
||||
ret
|
||||
|
||||
|
||||
; run until every module idle
|
||||
|
||||
runComModules:
|
||||
clr r17
|
||||
runComModules_loop:
|
||||
push r17
|
||||
clr r16
|
||||
#ifdef MODULES_COMONUART0
|
||||
push r16
|
||||
bigcall ComOnUart0_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COMONUART1
|
||||
push r16
|
||||
bigcall ComOnUart1_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
pop r17
|
||||
; check for repeat request
|
||||
tst r16
|
||||
clc
|
||||
breq runComModules_loopEnd
|
||||
inc r17
|
||||
cpi r17, 2
|
||||
brne runComModules_loop
|
||||
runComModules_loopEnd:
|
||||
tst r17
|
||||
clc
|
||||
breq runComModules_end
|
||||
sec
|
||||
runComModules_end:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
mainModulesOnPacketReceived:
|
||||
|
||||
Reference in New Issue
Block a user