source:
rtems/c/src/lib/libbsp/arm/lpc32xx/misc/timer.c
@
df40cc9
Last change on this file since df40cc9 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47 | |
---|---|
|
|
File size: 794 bytes |
Rev | Line | |
---|---|---|
[c468f18b] | 1 | /** |
2 | * @file | |
3 | * | |
[2d6543d4] | 4 | * @ingroup arm_lpc32xx |
[c468f18b] | 5 | * |
6 | * @brief Benchmark timer support. | |
7 | */ | |
8 | ||
9 | /* | |
10 | * Copyright (c) 2008, 2009 | |
11 | * embedded brains GmbH | |
12 | * Obere Lagerstr. 30 | |
13 | * D-82178 Puchheim | |
14 | * Germany | |
15 | * <rtems@embedded-brains.de> | |
16 | * | |
17 | * The license and distribution terms for this file may be | |
18 | * found in the file LICENSE in this distribution or at | |
[c499856] | 19 | * http://www.rtems.org/license/LICENSE. |
[c468f18b] | 20 | */ |
21 | ||
22 | #include <rtems.h> | |
[097c600] | 23 | #include <rtems/btimer.h> |
[c468f18b] | 24 | #include <rtems/timerdrv.h> |
25 | ||
[c477be46] | 26 | #include <bsp.h> |
[c468f18b] | 27 | |
28 | static uint32_t benchmark_timer_base; | |
29 | ||
30 | void benchmark_timer_initialize(void) | |
31 | { | |
32 | benchmark_timer_base = lpc32xx_timer(); | |
33 | } | |
34 | ||
35 | uint32_t benchmark_timer_read(void) | |
36 | { | |
[c477be46] | 37 | return lpc32xx_timer() - benchmark_timer_base; |
[c468f18b] | 38 | } |
39 | ||
40 | void benchmark_timer_disable_subtracting_average_overhead(bool find_average_overhead) | |
41 | { | |
[c477be46] | 42 | /* VOID */ |
[c468f18b] | 43 | } |
Note: See TracBrowser
for help on using the repository browser.