From 6c591c8a68f65a25952836313b87a2322fb4ab0a Mon Sep 17 00:00:00 2001 From: Hauke Petersen <hauke.petersen@fu-berlin.de> Date: Wed, 26 Mar 2014 15:13:23 +0100 Subject: [PATCH] tests/pkg: fixed issues from #919 --- pkg/openwsn/patch.txt | 2 +- tests/test_hwtimer/main.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/openwsn/patch.txt b/pkg/openwsn/patch.txt index f5e5733cbb..0828c6f171 100644 --- a/pkg/openwsn/patch.txt +++ b/pkg/openwsn/patch.txt @@ -34615,7 +34615,7 @@ diff -crB openwsn/opentimers.h ../../../sys/net/openwsn/opentimers.h ! ! typedef void (*opentimers_cbt)(void); ! -! #define OPENTIMERS_HWTIMER_ID (ARCH_MAXTIMERS - 1) +! #define OPENTIMERS_HWTIMER_ID (HWTIMER_MAXTIMERS - 1) ! ! //=========================== typedef ========================================= ! diff --git a/tests/test_hwtimer/main.c b/tests/test_hwtimer/main.c index 537f5ddf05..c2291aaefe 100644 --- a/tests/test_hwtimer/main.c +++ b/tests/test_hwtimer/main.c @@ -25,7 +25,7 @@ #define BASE_DELAY (1000UL * 1000UL) #define DELTA_DELAY (1000UL * 1000UL) #define MSGLEN 12 // == strlen("callback %2i") -char msg[MSGLEN * ARCH_MAXTIMERS]; // == [callback 1\0callback 2\0...] +char msg[MSGLEN * HWTIMER_MAXTIMERS]; // == [callback 1\0callback 2\0...] void callback(void *ptr) { @@ -43,14 +43,14 @@ int main(void) puts(""); puts(" Timers should print \"callback x\" once when they run out."); - printf(" The order for x is 1, n-1, n-2, ..., 2 where n is the number of available hardware timers (%u on this platform).\n", ARCH_MAXTIMERS); + printf(" The order for x is 1, n-1, n-2, ..., 2 where n is the number of available hardware timers (%u on this platform).\n", HWTIMER_MAXTIMERS); puts(" One timer should fire every second until all timers have run out."); puts(" Additionally the message \"hwtimer set.\" should be printed once 1 second from now."); puts(""); puts("Setting timers:"); puts(""); - unsigned long delay = BASE_DELAY + ((ARCH_MAXTIMERS - 1) * DELTA_DELAY); + unsigned long delay = BASE_DELAY + ((HWTIMER_MAXTIMERS - 1) * DELTA_DELAY); /* make the first timer first to fire so timers do not run out linearly */ char *msgn = msg; @@ -58,9 +58,9 @@ int main(void) hwtimer_set(HWTIMER_TICKS(BASE_DELAY), callback, (void *) msgn); printf("set %s\n", msgn); - /* set up to ARCH_MAXTIMERS-1 because hwtimer_wait below also + /* set up to HWTIMER_MAXTIMERS-1 because hwtimer_wait below also * needs a timer */ - for (int i = 1; i < (ARCH_MAXTIMERS - 1); i++) { + for (int i = 1; i < (HWTIMER_MAXTIMERS - 1); i++) { msgn = msg + (i * MSGLEN); delay -= DELTA_DELAY; snprintf(msgn, MSGLEN, "callback %2x", i + 1); -- GitLab