diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-09-24 16:17:00 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-09-24 16:17:00 +0200 |
commit | f0cf708b999ed3ff053aea7af03b597f46d68452 (patch) | |
tree | 792efcd8d672e6b79fac77a8115eb061189f67ef /src/arch | |
parent | 27425d0329c3056609d64407bf86040d6e0ccce7 (diff) |
POSIX: Add loop and timer support
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/posix/arch.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/arch/posix/arch.cc b/src/arch/posix/arch.cc index 54ee8e1..98a3a08 100644 --- a/src/arch/posix/arch.cc +++ b/src/arch/posix/arch.cc @@ -1,12 +1,29 @@ #include "arch.h" #include <unistd.h> +#if defined(WITH_LOOP) || defined(TIMER_S) +#include "driver/uptime.h" +void loop(); +#endif +#ifdef WITH_WAKEUP +void wakeup(); +#endif + void Arch::setup(void) { } void Arch::idle_loop(void) { while (1) { sleep(1); +#ifdef WITH_LOOP + loop(); +#endif +#ifdef WITH_WAKEUP + wakeup(); +#endif +#ifdef TIMER_S + uptime.tick_s(); +#endif } } |