Loading src/arch/arduino-nano/arch.cc +15 −5 Original line number Diff line number Diff line Loading @@ -32,10 +32,14 @@ void wakeup(); #if defined(WITH_LOOP) || defined(TIMER_S) #include "driver/uptime.h" void loop(); #endif #if defined(WITH_LOOP) extern void loop(); volatile char run_loop = 0; #endif void Arch::idle_loop(void) { while (1) { Loading @@ -44,13 +48,13 @@ void Arch::idle_loop(void) SMCR = 0; asm("wdr"); #ifdef WITH_LOOP if (run_loop) { loop(); run_loop = 0; } #endif #ifdef WITH_WAKEUP wakeup(); #endif #ifdef TIMER_S uptime.tick_s(); #endif } } Loading Loading @@ -79,6 +83,12 @@ Arch arch; ISR(TIMER1_COMPA_vect) { #ifdef WITH_LOOP run_loop = 1; #endif #ifdef TIMER_S uptime.tick_s(); #endif } #endif Loading
src/arch/arduino-nano/arch.cc +15 −5 Original line number Diff line number Diff line Loading @@ -32,10 +32,14 @@ void wakeup(); #if defined(WITH_LOOP) || defined(TIMER_S) #include "driver/uptime.h" void loop(); #endif #if defined(WITH_LOOP) extern void loop(); volatile char run_loop = 0; #endif void Arch::idle_loop(void) { while (1) { Loading @@ -44,13 +48,13 @@ void Arch::idle_loop(void) SMCR = 0; asm("wdr"); #ifdef WITH_LOOP if (run_loop) { loop(); run_loop = 0; } #endif #ifdef WITH_WAKEUP wakeup(); #endif #ifdef TIMER_S uptime.tick_s(); #endif } } Loading Loading @@ -79,6 +83,12 @@ Arch arch; ISR(TIMER1_COMPA_vect) { #ifdef WITH_LOOP run_loop = 1; #endif #ifdef TIMER_S uptime.tick_s(); #endif } #endif