2014-01-10 16:21:35 +01:00
|
|
|
/*
|
2014-04-22 17:14:53 +02:00
|
|
|
* Copyright (C) 2014 Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
2014-01-10 16:21:35 +01:00
|
|
|
*
|
2014-07-31 19:45:27 +02:00
|
|
|
* 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
|
|
|
|
* directory for more details.
|
2014-01-10 16:21:35 +01:00
|
|
|
*/
|
|
|
|
|
2014-02-03 23:03:13 +01:00
|
|
|
/**
|
|
|
|
* @ingroup tests
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Hwtimer test application
|
|
|
|
*
|
|
|
|
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
2014-11-26 18:54:07 +01:00
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
2014-02-03 23:03:13 +01:00
|
|
|
*
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
2014-01-10 16:21:35 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "hwtimer.h"
|
2014-08-01 09:02:21 +02:00
|
|
|
#include "board.h"
|
2014-01-10 16:21:35 +01:00
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
2014-04-22 17:14:53 +02:00
|
|
|
puts("This is just a functionality test for hwtimer_spin.");
|
2014-01-25 11:29:35 +01:00
|
|
|
|
2014-11-28 16:23:24 +01:00
|
|
|
puts("\nYou should see the message \"success\" after a while if"
|
|
|
|
" this test was successful.");
|
|
|
|
puts("If you do not see that message, something went wrong.\n");
|
2014-11-26 18:54:07 +01:00
|
|
|
|
2015-07-09 16:09:59 +02:00
|
|
|
for (unsigned long r = 1000; r > 0; r--) {
|
2014-08-01 09:02:21 +02:00
|
|
|
for (unsigned long i = HWTIMER_SPIN_BARRIER; i > 0; i--) {
|
2014-01-10 16:21:35 +01:00
|
|
|
hwtimer_wait(i);
|
|
|
|
}
|
|
|
|
}
|
2014-05-12 13:03:47 +02:00
|
|
|
puts("success");
|
|
|
|
return 0;
|
2014-01-10 16:21:35 +01:00
|
|
|
}
|