mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #1643 from LudwigOrtmann/tests-hwtimer-shorten
tests: hwtimer shorten wait period
This commit is contained in:
commit
075bcb9a20
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2013 INRIA
|
||||
* Copyright (C) 2014 Freie Universität Berlin
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser
|
||||
* General Public License v2.1. See the file LICENSE in the top level
|
||||
@ -14,6 +15,7 @@
|
||||
* @brief Hwtimer test application
|
||||
*
|
||||
* @author Oliver Hahm <oliver.hahm@inria.fr>
|
||||
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
||||
*
|
||||
* @}
|
||||
*/
|
||||
@ -24,7 +26,7 @@
|
||||
#include "thread.h"
|
||||
|
||||
#define BASE_DELAY (1000UL * 1000UL)
|
||||
#define DELTA_DELAY (1000UL * 1000UL)
|
||||
#define DELTA_DELAY (10UL * 1000UL)
|
||||
#define MSGLEN 12 // == strlen("callback %2i")
|
||||
char msg[MSGLEN * HWTIMER_MAXTIMERS]; // == [callback 1\0callback 2\0...]
|
||||
|
||||
@ -40,7 +42,7 @@ 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", HWTIMER_MAXTIMERS);
|
||||
puts(" One timer should fire every second until all timers have run out.");
|
||||
puts(" In 1 second, one timer should fire every second/100 until all timers have run out.");
|
||||
puts(" Additionally the message \"hwtimer set.\" should be printed once 1 second from now.");
|
||||
puts("");
|
||||
puts("Setting timers:");
|
||||
@ -68,7 +70,7 @@ int main(void)
|
||||
puts("All timers set.");
|
||||
puts("");
|
||||
|
||||
hwtimer_wait(HWTIMER_TICKS(1000UL * 1000UL));
|
||||
hwtimer_wait(HWTIMER_TICKS(BASE_DELAY));
|
||||
|
||||
puts("hwtimer set.");
|
||||
thread_sleep();
|
||||
|
Loading…
Reference in New Issue
Block a user