Files
rtems/c/src/lib/libbsp/arm/lpc32xx/misc/timer.c
Joel Sherrill 8fbe2e69b5 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.
2014-09-16 16:09:12 -05:00

43 lines
775 B
C

/**
* @file
*
* @ingroup arm_lpc32xx
*
* @brief Benchmark timer support.
*/
/*
* Copyright (c) 2008, 2009
* embedded brains GmbH
* Obere Lagerstr. 30
* D-82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#include <rtems.h>
#include <rtems/btimer.h>
#include <bsp.h>
static uint32_t benchmark_timer_base;
void benchmark_timer_initialize(void)
{
benchmark_timer_base = lpc32xx_timer();
}
benchmark_timer_t benchmark_timer_read(void)
{
return lpc32xx_timer() - benchmark_timer_base;
}
void benchmark_timer_disable_subtracting_average_overhead(bool find_average_overhead)
{
/* VOID */
}