X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Ftimer_test.c;h=f30ac45e2accebc7f806bd881374b985b3cf8b8a;hb=c82ae0ed27efa915691b5a07f8d6db4effaccf19;hp=170105dea8a1ca9ba809e4305faa5bb10eeb01b2;hpb=791e167e053bdd9250d34a9a5ccae6ccde4d6679;p=bertos.git diff --git a/bertos/drv/timer_test.c b/bertos/drv/timer_test.c index 170105de..f30ac45e 100644 --- a/bertos/drv/timer_test.c +++ b/bertos/drv/timer_test.c @@ -33,12 +33,21 @@ * \brief Hardware independent timer driver (implementation) * * \version $Id$ - * \author Bernardo Innocenti + * \author Bernie Innocenti */ -#include "timer.c" -#include "mware/event.c" -#include "os/hptime.c" +#include + +#include +#include + +#include + +#include + +#warning TODO:Refactor this test to comply whit BeRTOS test policy. + +#ifdef _TEST static void timer_test_constants(void) { @@ -61,7 +70,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)); @@ -122,6 +131,7 @@ static void timer_test_poll(void) } } + int main(void) { wdt_init(7); @@ -132,3 +142,13 @@ int main(void) timer_test_poll(); return 0; } + +#include "timer.c" +#include "drv/kdebug.c" +#include "mware/event.c" +#include "mware/formatwr.c" +#include "mware/hex.c" +#include "os/hptime.c" + +#endif +