introduce app "hub"
This commit is contained in:
@@ -185,11 +185,8 @@ initModules:
|
||||
;
|
||||
; Call run functions of the used modules. Add your routine calls here.
|
||||
;
|
||||
; IN:
|
||||
; - nothing
|
||||
; OUT:
|
||||
; - nothing
|
||||
; USED: depending on called routines
|
||||
; @return CFLAG set: at least one RUN routine returned CFLAG set
|
||||
; @clobbers all
|
||||
|
||||
runModules:
|
||||
clr r16
|
||||
@@ -197,6 +194,7 @@ runModules:
|
||||
push r16
|
||||
bigcall BaseTimer_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
|
||||
#ifdef MODULES_TTYONUART1
|
||||
push r16
|
||||
@@ -204,10 +202,40 @@ runModules:
|
||||
pop r16
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COMONUART0
|
||||
push r16
|
||||
rcall runComModules
|
||||
bigcall ComOnUart0_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COMONUART1
|
||||
push r16
|
||||
bigcall ComOnUart1_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COM2W0
|
||||
push r16
|
||||
bigcall COM2W0_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COM2W1
|
||||
push r16
|
||||
bigcall COM2W1_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COM2WN
|
||||
push r16
|
||||
bigcall COM2WN_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
; add more modules here
|
||||
|
||||
@@ -218,67 +246,7 @@ runModules:
|
||||
sec
|
||||
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
|
||||
|
||||
#ifdef MODULES_COM2W0
|
||||
push r16
|
||||
bigcall COM2W0_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COM2W1
|
||||
push r16
|
||||
bigcall COM2W1_Run
|
||||
pop r16
|
||||
sbci r16, 0
|
||||
#endif
|
||||
|
||||
#ifdef MODULES_COM2WN
|
||||
push r16
|
||||
bigcall COM2WN_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
|
||||
|
||||
|
||||
; @end
|
||||
|
||||
|
||||
mainModulesOnPacketReceived:
|
||||
|
||||
Reference in New Issue
Block a user