summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authoraozima <[email protected]>2013-03-23 20:33:41 +0800
committeraozima <[email protected]>2013-03-31 18:25:51 +0800
commit2ccb3c7589f08d0c46ccd9b7ec7a35b1b678d609 (patch)
tree6120230923a51bd2bed4c98b78cc820c60696360 /libcpu
parent1549b7db90df55c638dd1102b9aee50986d7d9ba (diff)
update LPC2478: Modify the interrupt interface implementations.
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/arm/lpc24xx/interrupt.c10
-rw-r--r--libcpu/arm/lpc24xx/trap.c4
2 files changed, 8 insertions, 6 deletions
diff --git a/libcpu/arm/lpc24xx/interrupt.c b/libcpu/arm/lpc24xx/interrupt.c
index 6d64d7a07c..16d1dd7e99 100644
--- a/libcpu/arm/lpc24xx/interrupt.c
+++ b/libcpu/arm/lpc24xx/interrupt.c
@@ -10,8 +10,10 @@
* Change Logs:
* Date Author Notes
* 2008-12-11 XuXinming first version
+ * 2013-03-29 aozima Modify the interrupt interface implementations.
*/
+#include <rtthread.h>
#include <rthw.h>
#include "LPC24xx.h"
@@ -35,7 +37,7 @@ void rt_hw_interrupt_handler(int vector, void *param)
rt_kprintf("Unhandled interrupt %d occured!!!\n", vector);
}
-void rt_hw_interrupt_init()
+void rt_hw_interrupt_init(void)
{
register int i;
@@ -47,10 +49,10 @@ void rt_hw_interrupt_init()
VICIntSelect = 0;
/* init exceptions table */
+ rt_memset(irq_desc, 0x00, sizeof(irq_desc));
for(i=0; i < MAX_HANDLERS; i++)
{
- irq_desc[i].handler = (rt_isr_handler_t)rt_hw_interrupt_handler;
- irq_desc[i].param = RT_NULL;
+ irq_desc[i].handler = rt_hw_interrupt_handler;
vect_addr = (rt_uint32_t *)(VIC_BASE_ADDR + 0x100 + i*4);
vect_cntl = (rt_uint32_t *)(VIC_BASE_ADDR + 0x200 + i*4);
@@ -94,7 +96,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
old_handler = irq_desc[vector].handler;
if (handler != RT_NULL)
{
- irq_desc[vector].handler = (rt_isr_handler_t)handler;
+ irq_desc[vector].handler = handler;
irq_desc[vector].param = param;
}
}
diff --git a/libcpu/arm/lpc24xx/trap.c b/libcpu/arm/lpc24xx/trap.c
index 53ff13b4eb..71d88101fc 100644
--- a/libcpu/arm/lpc24xx/trap.c
+++ b/libcpu/arm/lpc24xx/trap.c
@@ -126,7 +126,7 @@ void rt_hw_trap_resv(struct rt_hw_register *regs)
}
extern rt_isr_handler_t isr_table[];
-void rt_hw_trap_irq()
+void rt_hw_trap_irq(void)
{
int irqno;
struct rt_irq_desc* irq;
@@ -139,7 +139,7 @@ void rt_hw_trap_irq()
irq->handler(irqno, irq->param);
}
-void rt_hw_trap_fiq()
+void rt_hw_trap_fiq(void)
{
rt_kprintf("fast interrupt request\n");
}