summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c')
-rw-r--r--c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c b/c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c
index 090faca557..8152716cd4 100644
--- a/c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c
+++ b/c/src/lib/libbsp/mips/rbtx4938/clock/clockdrv.c
@@ -1,11 +1,22 @@
-/*
+/**
+ * @file
+ *
* Instantiate the clock driver shell.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2012.
+ * On-Line Applications Research Corporation (OAR).
*
- * clockdrv.c,v 1.5 2001/01/09 17:05:57 joel Exp
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
*/
#include <rtems.h>
-#include <libcpu/tx4938.h>
+#include <bsp/irq.h>
#include <bsp.h>
#include <stdio.h>
@@ -30,6 +41,7 @@
#error "Build Error: unsupported timer mode"
#endif
+void new_brk_esr(void);
t_yamon_retfunc esr_retfunc = 0;
t_yamon_ref original_brk_esr = 0;
@@ -49,8 +61,14 @@ void new_brk_esr(void)
#define Clock_driver_support_install_isr( _new, _old ) \
do { \
- _old = set_vector( _new, CLOCK_VECTOR, 1 ); \
- YAMON_FUNC_REGISTER_IC_ISR(17,(t_yamon_isr)_new,0,&original_tmr0_isr); /* Call Yamon to enable interrupt */ \
+ rtems_interrupt_handler_install( \
+ CLOCK_VECTOR, \
+ "clock", \
+ 0, \
+ _new, \
+ NULL \
+ ); \
+ YAMON_FUNC_REGISTER_IC_ISR(17,(t_yamon_isr)_new,0,&original_tmr0_isr); /* Call Yamon to enable interrupt */ \
} while(0)