source: rtems/c/src/lib/libbsp/arm/lpc32xx/misc/timer.c @ 8fbe2e6

4.11
Last change on this file since 8fbe2e6 was 8fbe2e6, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 4, 2014 at 1:59:49 PM

Use correct prototype of benchmark_timer_read()

This change starts with removing the effectively empty file
timerdrv.h. The prototypes for benchmark_timer_XXX() were in
btimer.h which was not universally used. Thus every use of
timerdrv.h had to be changed to btimer.h. Then the prototypes
for benchmark_timer_read() had to be adjusted to return
benchmark_timer_t rather than int or uint32_t.

I took this opportunity to also correct the file headers to
separate the copyright from the file description comments which
is needed to ensure the copyright isn't propagated into Doxygen
output.

  • Property mode set to 100644
File size: 775 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup arm_lpc32xx
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
19 * http://www.rtems.org/license/LICENSE.
20 */
21
22#include <rtems.h>
23#include <rtems/btimer.h>
24
25#include <bsp.h>
26
27static uint32_t benchmark_timer_base;
28
29void benchmark_timer_initialize(void)
30{
31  benchmark_timer_base = lpc32xx_timer();
32}
33
34benchmark_timer_t benchmark_timer_read(void)
35{
36  return lpc32xx_timer() - benchmark_timer_base;
37}
38
39void benchmark_timer_disable_subtracting_average_overhead(bool find_average_overhead)
40{
41  /* VOID */
42}
Note: See TracBrowser for help on using the repository browser.