1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/test_hwtimer_spin/main.c
2014-02-04 12:52:52 +01:00

41 lines
809 B
C

/*
* Copyright (C) 2013 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
* details.
*/
/**
* @ingroup tests
* @{
*
* @file
* @brief Hwtimer test application
*
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
*
* @}
*/
#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");
while (1) {
for (unsigned long i = 256; i; i = i >> 1) {
printf("wait %lu\n", i);
hwtimer_wait(i);
}
}
}