2014-01-10 16:21:35 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
|
|
|
*
|
2014-02-03 23:03:13 +01:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
2014-01-10 16:21:35 +01:00
|
|
|
* Public License. See the file LICENSE in the top level directory for more
|
|
|
|
* details.
|
|
|
|
*/
|
|
|
|
|
2014-02-03 23:03:13 +01:00
|
|
|
/**
|
|
|
|
* @ingroup tests
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Hwtimer test application
|
|
|
|
*
|
|
|
|
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
|
|
|
*
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2014-01-10 16:21:35 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "board_uart0.h"
|
|
|
|
#include "posix_io.h"
|
|
|
|
#include "hwtimer.h"
|
|
|
|
#include "thread.h"
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
printf("when the race condition is hit, hwtimer will wait a very very long time...\n");
|
2014-01-25 11:29:35 +01:00
|
|
|
|
|
|
|
while (1) {
|
|
|
|
for (unsigned long i = 256; i; i = i >> 1) {
|
2014-01-10 16:21:35 +01:00
|
|
|
printf("wait %lu\n", i);
|
|
|
|
hwtimer_wait(i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|