mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests: fix test_hwtimer_spin
Actually test hwtimer_spin, not hwtimer_arch* `hwtimer_wait` calls `hwtimer_spin` only for delays `<= 6`, that's why a pure test_hwtimer_spin test should not pass values `>6`. Also decrement delay in steps of 1.
This commit is contained in:
parent
e3acf0835d
commit
19d9d67f4e
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
||||
* Copyright (C) 2014 Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser General
|
||||
* Public License. See the file LICENSE in the top level directory for more
|
||||
@ -29,10 +29,10 @@
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("when the race condition is hit, hwtimer will wait a very very long time...\n");
|
||||
puts("This is just a functionality test for hwtimer_spin.");
|
||||
|
||||
while (1) {
|
||||
for (unsigned long i = 256; i; i = i >> 1) {
|
||||
for (unsigned long i = 6; i > 0; i--) {
|
||||
printf("wait %lu\n", i);
|
||||
hwtimer_wait(i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user