diff options
author | Claas Ziemke <ziemke@irs.uni-stuttgart.de> | 2012-08-22 14:39:02 +0200 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-11-03 14:19:47 -0600 |
commit | 7a669866eea8b66b87b22015b793b5ea4ff950c1 (patch) | |
tree | f7faffb2cd20b45894ddabbc60f1a0e5ee96403d /c/src/lib/libbsp/arm/beagle/misc/timer.c | |
parent | Add some generic ARM am335x and omap definitions (diff) | |
download | rtems-7a669866eea8b66b87b22015b793b5ea4ff950c1.tar.bz2 |
Added BeagleBoard BSP
Coding done in course of GSoC2012.
Commit edited to be brought up-to-date with mainline by
Ben Gras <beng@shrike-systems.com>.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/arm/beagle/misc/timer.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/beagle/misc/timer.c b/c/src/lib/libbsp/arm/beagle/misc/timer.c new file mode 100644 index 0000000000..50570e0b00 --- /dev/null +++ b/c/src/lib/libbsp/arm/beagle/misc/timer.c @@ -0,0 +1,46 @@ +/** + * @file + * + * @ingroup beagle + * + * @brief Benchmark timer support. + */ + +/* + * Copyright (c) 2012 Claas Ziemke. All rights reserved. + * + * Claas Ziemke + * Kernerstrasse 11 + * 70182 Stuttgart + * Germany + * <claas.ziemke@gmx.net> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + */ + +#include <rtems.h> +#include <rtems/btimer.h> +#include <rtems/timerdrv.h> + +#include <bsp.h> + +static uint32_t benchmark_timer_base; + +void benchmark_timer_initialize(void) +{ + benchmark_timer_base = beagleboard_timer(); +} + +uint32_t benchmark_timer_read(void) +{ + return beagleboard_timer() - benchmark_timer_base; +} + +void benchmark_timer_disable_subtracting_average_overhead( + bool find_average_overhead +) +{ + /* VOID */ +} |