avr: more work on basic device code.

This commit is contained in:
Martin Preuss
2025-05-04 03:33:32 +02:00
parent e25b0ad69d
commit 9a854977a4
6 changed files with 48 additions and 28 deletions

View File

@@ -53,13 +53,6 @@ main:
#endif
main_loop:
rcall runModules
rcall runApps
#ifdef MODULES_NETWORK
rcall handleMessages
#endif
; only modify SE, SM1 and SM0
cli
in r16, MCUCR
@@ -70,6 +63,14 @@ main_loop:
out MCUCR, r16
sei ; make sure interrupts really are enabled
sleep ; sleep, wait for interrupt
rcall runModules
rcall runApps
#ifdef MODULES_NETWORK
rcall handleMessages
#endif
rjmp main_loop
main_loop_reboot:
@@ -117,6 +118,10 @@ onSystemTimerTick:
#ifdef APPS_DOOR
rcall AppDoor_Every100ms
#endif
#ifdef APPS_MA_LIGHT
rcall AppMotionLight_Every100ms
#endif
ret
; @end