avr: enabled COM_Run.
This commit is contained in:
26
avr/main.asm
26
avr/main.asm
@@ -90,6 +90,15 @@ ledA3Sram: .byte LED_SRAM_SIZE
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; ***************************************************************************
|
||||||
|
; data in EEPROM
|
||||||
|
|
||||||
|
.eseg
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; ***************************************************************************
|
; ***************************************************************************
|
||||||
; data in FLASH
|
; data in FLASH
|
||||||
|
|
||||||
@@ -181,14 +190,21 @@ initModules:
|
|||||||
|
|
||||||
runModulesUntilIdle:
|
runModulesUntilIdle:
|
||||||
|
|
||||||
runModulesUntilIdle_Timer: ; repeat this block for every module with run function
|
; TIMER module
|
||||||
rcall Timer_Run ;
|
rcall Timer_Run
|
||||||
brcs runModulesUntilIdle_Timer ;
|
|
||||||
|
|
||||||
|
; COM module (call until carry flag cleared but at most 10 times to not starve other modules)
|
||||||
|
ldi r16, 10
|
||||||
runModulesUntilIdle_Com:
|
runModulesUntilIdle_Com:
|
||||||
rcall Com_Run
|
push r16
|
||||||
brcs runModulesUntilIdle_Com
|
rcall Com_Run
|
||||||
|
pop r16
|
||||||
|
brcc runModulesUntilIdle_ComEnd
|
||||||
|
dec r16
|
||||||
|
brne runModulesUntilIdle_Com
|
||||||
|
runModulesUntilIdle_ComEnd:
|
||||||
|
|
||||||
|
; add more modules here
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user