X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Ftimer.c;h=9e2a1173011d053f1baebc60c0634cfad837abf7;hb=505f1c5092e0efa3b63009a7544923751d43f0b3;hp=bd0ff9daed9ec26bfe5ae35ff5266917b72329b1;hpb=e62ca0b357f09804d7d894949df44224c9d74bb7;p=bertos.git diff --git a/bertos/drv/timer.c b/bertos/drv/timer.c index bd0ff9da..9e2a1173 100644 --- a/bertos/drv/timer.c +++ b/bertos/drv/timer.c @@ -37,10 +37,12 @@ */ #include "timer.h" +#include "hw/hw_timer.h" #include "cfg/cfg_timer.h" #include "cfg/cfg_wdt.h" -#include "cfg/cfg_kern.h" +#include "cfg/cfg_proc.h" +#include "cfg/cfg_signal.h" #include #include #include @@ -48,6 +50,7 @@ #include #include #include +#include // cpu_relax() /* * Include platform-specific binding code if we're hosted. @@ -57,7 +60,10 @@ //#include OS_CSOURCE(timer) #include #else - #include CPU_CSOURCE(timer) + #ifndef WIZ_AUTOGEN + #warning Deprecated: now you should include timer_ directly in the makefile. Remove this line and the following once done. + #include CPU_CSOURCE(timer) + #endif #endif /* @@ -197,11 +203,7 @@ void timer_delayTicks(ticks_t delay) /* Busy wait */ while (timer_clock() - start < delay) - { -#if CONFIG_WATCHDOG - wdt_reset(); -#endif - } + cpu_relax(); #endif /* !CONFIG_KERN_SIGNALS */ }