avr: more work on basic device code.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user