summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-20 13:58:12 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-20 13:58:12 -0500
commitce5c3b34bdf757ac637e3c9663b0811334a1bc10 (patch)
tree04eb76cd81bfe28cd460dd04894c2a2d0027381e /c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c
parentss555/startup/bspstart.c: BSP does not use SPRG0 (diff)
downloadrtems-ce5c3b34bdf757ac637e3c9663b0811334a1bc10.tar.bz2
nios2/nios2_iss: Fix warnings
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c b/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c
index e37c821f7e..fbb20d892b 100644
--- a/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c
+++ b/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c
@@ -1,13 +1,15 @@
-/* timer.c
- *
- * This file manages the benchmark timer used by the RTEMS Timing Test
- * Suite. Each measured time period is demarcated by calls to
- * benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
- * the number of microseconds since benchmark_timer_initialize() exitted.
+/*
+ * This file manages the benchmark timer used by the RTEMS Timing Test
+ * Suite. Each measured time period is demarcated by calls to
+ * benchmark_timer_initialize() and benchmark_timer_read().
+ * benchmark_timer_read() usually returns the number of microseconds
+ * since benchmark_timer_initialize() exitted.
*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
- *
+ */
+
+/*
* COPYRIGHT (c) 2005-2006 Kolja Waschk rtemsdev/ixo.de
* Derived from no_cpu/no_bsp/timer/timer.c 1.9,
* COPYRIGHT (c) 1989-1999.
@@ -30,7 +32,7 @@ bool benchmark_timer_find_average_overhead;
#define TIMER_REGS ((altera_avalon_timer_regs*)NIOS2_IO_BASE(TIMER_BASE))
-void timerisr( void )
+static rtems_isr timerisr(rtems_vector_number vector)
{
TIMER_REGS->status = 0;
Timer_interrupts++;
@@ -42,7 +44,7 @@ void benchmark_timer_initialize( void )
TIMER_REGS->control = ALTERA_AVALON_TIMER_CONTROL_STOP_MSK;
- set_vector((nios2_isr_entry *)timerisr, TIMER_VECTOR, 1);
+ set_vector(timerisr, TIMER_VECTOR, 1);
/* Enable interrupt processing */