X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Ftimer_test.c;h=905f9c90005b151abdf7bfd28b9a71e576819412;hb=c13bce9eb60b232b77fee6096202a4090b47e5fc;hp=3e9338a89bdb226bab6f635ac35b6968f0a5dd14;hpb=f58b90fce4022247d31d68ba1c0d3a620a9071d8;p=bertos.git diff --git a/bertos/drv/timer_test.c b/bertos/drv/timer_test.c index 3e9338a8..905f9c90 100644 --- a/bertos/drv/timer_test.c +++ b/bertos/drv/timer_test.c @@ -33,21 +33,19 @@ * \brief Hardware independent timer driver (implementation) * * \version $Id$ - * \author Bernardo Innocenti + * \author Bernie Innocenti */ -#ifdef _TEST - #include "timer.c" - #include "mware/event.c" - #include "os/hptime.c" +#include -#else - #include - #include - #include +#include +#include -#endif +#include +#warning TODO:Refactor this test to comply whit BeRTOS test policy. + +#ifdef _TEST static void timer_test_constants(void) { @@ -70,7 +68,7 @@ static void timer_test_constants(void) kprintf("ticks_to_us(100)=%lu\n", ticks_to_us(100)); kprintf("ticks_to_us(10000)=%lu\n", ticks_to_us(10000)); kprintf("\n"); - kprintf("hptime_to_us(100)=%lu\n", hptime_to_us(100)); + kprintf("hptime_to_us(100)=%ld\n", hptime_to_us(100)); kprintf("hptime_to_us(10000)=%lu\n", hptime_to_us(10000)); kprintf("us_to_hptime(100)=%lu\n", us_to_hptime(100)); kprintf("us_to_hptime(10000)=%lu\n", us_to_hptime(10000)); @@ -131,6 +129,11 @@ static void timer_test_poll(void) } } + +#include "timer.c" +#include "mware/event.c" +#include "os/hptime.c" + int main(void) { wdt_init(7); @@ -141,3 +144,5 @@ int main(void) timer_test_poll(); return 0; } +#endif +