source:
rtems/bsps/arm/lpc176x/btimer/btimer.c
@
e945b049
Last change on this file since e945b049 was e945b049, checked in by Sebastian Huber <sebastian.huber@…>, on 04/25/18 at 08:43:38 | |
---|---|
|
|
File size: 1.1 KB |
Rev | Line | |
---|---|---|
[19260fb] | 1 | /** |
[e945b049] | 2 | * @file timerbenchmark.c |
[19260fb] | 3 | * |
4 | * @ingroup lpc176x | |
5 | * | |
[e945b049] | 6 | * @brief Timer benchmark functions for the lpc176x bsp. |
[19260fb] | 7 | */ |
8 | ||
9 | /* | |
10 | * Copyright (c) 2014 Taller Technologies. | |
11 | * | |
12 | * @author Boretto Martin (martin.boretto@tallertechnologies.com) | |
13 | * @author Diaz Marcos (marcos.diaz@tallertechnologies.com) | |
14 | * @author Lenarduzzi Federico (federico.lenarduzzi@tallertechnologies.com) | |
15 | * @author Daniel Chicco (daniel.chicco@tallertechnologies.com) | |
16 | * | |
17 | * The license and distribution terms for this file may be | |
18 | * found in the file LICENSE in this distribution or at | |
[d4edbdbc] | 19 | * http://www.rtems.org/license/LICENSE. |
[19260fb] | 20 | */ |
21 | ||
[e945b049] | 22 | #include <rtems.h> |
[19260fb] | 23 | #include <bsp.h> |
[e945b049] | 24 | #include <rtems/btimer.h> |
[19260fb] | 25 | |
[e945b049] | 26 | #include <bsp/timer.h> |
[19260fb] | 27 | |
[e945b049] | 28 | static uint32_t benchmark_timer_base; |
[19260fb] | 29 | |
[e945b049] | 30 | void benchmark_timer_initialize( void ) |
[19260fb] | 31 | { |
[e945b049] | 32 | benchmark_timer_base = lpc176x_timer_get_timer_value( LPC176X_TIMER_1 ); |
[19260fb] | 33 | } |
34 | ||
[e945b049] | 35 | benchmark_timer_t benchmark_timer_read( void ) |
[19260fb] | 36 | { |
[e945b049] | 37 | uint32_t delta = lpc176x_timer_get_timer_value( LPC176X_TIMER_1 ) - |
38 | benchmark_timer_base; | |
[19260fb] | 39 | |
[e945b049] | 40 | return delta; |
[19260fb] | 41 | } |
42 | ||
[e945b049] | 43 | void benchmark_timer_disable_subtracting_average_overhead( bool find_avg_ovhead ) |
[19260fb] | 44 | { |
45 | } |
Note: See TracBrowser
for help on using the repository browser.