comonuartX: handle multiple messages in one run.

still there are NOBUF errors...
This commit is contained in:
Martin Preuss
2025-07-12 20:09:40 +02:00
parent 349b4a929a
commit 357ffe4e17

View File

@@ -187,6 +187,29 @@ runModules:
pop r16 pop r16
#endif #endif
push r16
rcall runComModules
pop r16
sbci r16, 0
; add more modules here
; check for repeat request
tst r16
clc
breq runModules_end
sec
runModules_end:
ret
; run until every module idle
runComModules:
clr r17
runComModules_loop:
push r17
clr r16
#ifdef MODULES_COMONUART0 #ifdef MODULES_COMONUART0
push r16 push r16
bigcall ComOnUart0_Run bigcall ComOnUart0_Run
@@ -200,21 +223,20 @@ runModules:
pop r16 pop r16
sbci r16, 0 sbci r16, 0
#endif #endif
pop r17
#ifdef MODULES_STATS
push r16
bigcall Stats_Run
pop r16
#endif
; add more modules here
; check for repeat request ; check for repeat request
tst r16 tst r16
clc clc
breq runModules_end breq runComModules_loopEnd
inc r17
cpi r17, 2
brne runComModules_loop
runComModules_loopEnd:
tst r17
clc
breq runComModules_end
sec sec
runModules_end: runComModules_end:
ret ret