X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Ftimer.c;h=942726399b1e47b0ebb102acd06b308592494ec7;hb=515886be3106584a6d695d4b5453730121b91f74;hp=aa671dc4d9423e8f50c0008ffc237212ec58a9e5;hpb=5ee0faa31c29bde72eebfc2646b7925e20e3e648;p=bertos.git diff --git a/bertos/drv/timer.c b/bertos/drv/timer.c index aa671dc4..94272639 100644 --- a/bertos/drv/timer.c +++ b/bertos/drv/timer.c @@ -341,3 +341,19 @@ void timer_init(void) MOD_INIT(timer); } + + +#if (ARCH & ARCH_EMUL) +/** + * Stop timer (only used by emulator) + */ +void timer_cleanup(void) +{ + MOD_CLEANUP(timer); + + timer_hw_cleanup(); + + // Hmmm... apparently, the demo app does not cleanup properly + //ASSERT(LIST_EMPTY(&timers_queue)); +} +#endif /* ARCH_EMUL */