source: rtems/c/src/lib/libbsp/arm/lpc176x/benchmark_timer/benchmark_timer.c @ 1c0663b

4.115
Last change on this file since 1c0663b was d4edbdbc, checked in by Sebastian Huber <sebastian.huber@…>, on Mar 20, 2015 at 1:09:26 PM

Replace www.rtems.com with www.rtems.org

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[19260fb]1/**
2 * @file timerbenchmark.c
3 *
4 * @ingroup lpc176x
5 *
6 * @brief Timer benchmark functions for the lpc176x bsp.
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
22#include <rtems.h>
23#include <bsp.h>
24#include <rtems/btimer.h>
25
26#include <bsp/timer.h>
27
28static uint32_t benchmark_timer_base;
29
30void benchmark_timer_initialize( void )
31{
32  benchmark_timer_base = lpc176x_timer_get_timer_value( LPC176X_TIMER_1 );
33}
34
[8fbe2e6]35benchmark_timer_t benchmark_timer_read( void )
[19260fb]36{
37  uint32_t delta = lpc176x_timer_get_timer_value( LPC176X_TIMER_1 ) -
38                   benchmark_timer_base;
39
40  return delta;
41}
42
43void benchmark_timer_disable_subtracting_average_overhead( bool find_avg_ovhead )
44{
[8fbe2e6]45}
Note: See TracBrowser for help on using the repository browser.