diff --git a/tests/hwtimer/main.c b/tests/hwtimer/main.c index 3a2d78684b6e9b8615f34de32124fd5f5e2d158b..bfa52ce4d42ca9067088b8d36c44792f55c79768 100644 --- a/tests/hwtimer/main.c +++ b/tests/hwtimer/main.c @@ -23,12 +23,13 @@ #include <stdio.h> #include "hwtimer.h" -#include "thread.h" -#define BASE_DELAY (1000UL * 1000UL) +#define BASE_DELAY (1000UL * 1000UL) +#define END_DELAY (BASE_DELAY + ((HWTIMER_MAXTIMERS - 1) * DELTA_DELAY)) #define DELTA_DELAY (10UL * 1000UL) -#define MSGLEN 12 // == strlen("callback %2i") -char msg[MSGLEN * HWTIMER_MAXTIMERS]; // == [callback 1\0callback 2\0...] +#define MSGLEN (12) /* == strlen("callback %2i") */ + +char msg[MSGLEN * HWTIMER_MAXTIMERS]; /* == [callback 1\0callback 2\0...] */ void callback(void *ptr) { @@ -70,9 +71,8 @@ int main(void) puts("All timers set."); puts(""); - hwtimer_wait(HWTIMER_TICKS(BASE_DELAY)); + hwtimer_wait(HWTIMER_TICKS(END_DELAY)); puts("hwtimer set."); - thread_sleep(); return 0; }