2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>

* timer/timer.c: Rename timer driver methods to follow RTEMS
	programming conventions.
This commit is contained in:
Joel Sherrill
2008-08-31 16:53:16 +00:00
parent 7d6a5e2179
commit 8c84731227
2 changed files with 16 additions and 11 deletions

View File

@@ -1,3 +1,8 @@
2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Rename timer driver methods to follow RTEMS
programming conventions.
2008-08-18 Ralf Corsépius <ralf.corsepius@rtems.org> 2008-08-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* serial/twi.c: Remove unused var. * serial/twi.c: Remove unused var.

View File

@@ -2,8 +2,8 @@
* *
* This file manages the benchmark timer used by the RTEMS Timing Test * This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to * Suite. Each measured time period is demarcated by calls to
* Timer_initialize() and Read_timer(). Read_timer() usually returns * benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
* the number of microseconds since Timer_initialize() exitted. * the number of microseconds since benchmark_timer_initialize() exitted.
* *
* Copyright (c) 2006 by Atos Automacao Industrial Ltda. * Copyright (c) 2006 by Atos Automacao Industrial Ltda.
* written by Alain Schaefer <alain.schaefer@easc.ch> * written by Alain Schaefer <alain.schaefer@easc.ch>
@@ -22,14 +22,14 @@
uint32_t Timer_interrupts; uint32_t Timer_interrupts;
rtems_boolean Timer_driver_Find_average_overhead; rtems_boolean benchmark_timer_find_average_overhead;
/* /*
* Timer_initialize * benchmark_timer_initialize
* *
* Blackfin processor has a counter for clock cycles. * Blackfin processor has a counter for clock cycles.
*/ */
void Timer_initialize( void ) void benchmark_timer_initialize( void )
{ {
/*reset counters*/ /*reset counters*/
@@ -44,7 +44,7 @@ void Timer_initialize( void )
} }
/* /*
* The following controls the behavior of Read_timer(). * The following controls the behavior of benchmark_timer_read().
* *
* AVG_OVEREHAD is the overhead for starting and stopping the timer. It * AVG_OVEREHAD is the overhead for starting and stopping the timer. It
* is usually deducted from the number returned. * is usually deducted from the number returned.
@@ -58,7 +58,7 @@ void Timer_initialize( void )
/* This value is in microseconds. */ /* This value is in microseconds. */
#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */ #define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
int Read_timer( void ) int benchmark_timer_read( void )
{ {
uint32_t clicks; uint32_t clicks;
uint32_t total; uint32_t total;
@@ -76,7 +76,7 @@ int Read_timer( void )
/* converting to microseconds */ /* converting to microseconds */
total = clicks / (CCLK/1000000); total = clicks / (CCLK/1000000);
if ( Timer_driver_Find_average_overhead == 1 ) if ( benchmark_timer_find_average_overhead == 1 )
return total; /* in XXX microsecond units */ return total; /* in XXX microsecond units */
else { else {
if ( total < LEAST_VALID ) if ( total < LEAST_VALID )
@@ -93,14 +93,14 @@ int Read_timer( void )
* in Timing Test Suite. * in Timing Test Suite.
*/ */
rtems_status_code Empty_function( void ) rtems_status_code benchmark_timer_empty_function( void )
{ {
return RTEMS_SUCCESSFUL; return RTEMS_SUCCESSFUL;
} }
void Set_find_average_overhead( void benchmark_timer_disable_subtracting_average_overhead(
rtems_boolean find_flag rtems_boolean find_flag
) )
{ {
Timer_driver_Find_average_overhead = find_flag; benchmark_timer_find_average_overhead = find_flag;
} }