diff --git a/bsp/sam7x/drivers/board.c b/bsp/sam7x/drivers/board.c index 16dfacb9be..1e13656f66 100644 --- a/bsp/sam7x/drivers/board.c +++ b/bsp/sam7x/drivers/board.c @@ -154,7 +154,7 @@ static void rt_hw_console_init() /** * This function will initial sam7x board. */ -void rt_hw_board_init() +void rt_hw_board_init(void) { extern void rt_serial_init(void); diff --git a/libcpu/arm/AT91SAM7X/interrupt.c b/libcpu/arm/AT91SAM7X/interrupt.c index 1aced87b29..71884f9f3f 100644 --- a/libcpu/arm/AT91SAM7X/interrupt.c +++ b/libcpu/arm/AT91SAM7X/interrupt.c @@ -10,8 +10,10 @@ * Change Logs: * Date Author Notes * 2006-08-23 Bernard first version + * 2013-03-29 aozima Modify the interrupt interface implementations. */ +#include #include #include "AT91SAM7X256.h" @@ -30,7 +32,7 @@ rt_uint32_t rt_thread_switch_interrupt_flag; */ /*@{*/ -void rt_hw_interrupt_handler(int vector) +static void rt_hw_interrupt_handler(int vector, void *param) { rt_kprintf("Unhandled interrupt %d occured!!!\n", vector); } @@ -38,7 +40,7 @@ void rt_hw_interrupt_handler(int vector) /** * This function will initialize hardware interrupt */ -void rt_hw_interrupt_init() +void rt_hw_interrupt_init(void) { rt_base_t index; @@ -96,7 +98,6 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler, void *param, char *name) { rt_isr_handler_t old_handler = RT_NULL; - if(vector >= 0 && vector < MAX_HANDLERS) { old_handler = irq_desc[vector].handler; diff --git a/libcpu/arm/AT91SAM7X/trap.c b/libcpu/arm/AT91SAM7X/trap.c index 4b21f81c1c..74d1cba445 100644 --- a/libcpu/arm/AT91SAM7X/trap.c +++ b/libcpu/arm/AT91SAM7X/trap.c @@ -22,7 +22,7 @@ */ /*@{*/ -void rt_hw_trap_irq() +void rt_hw_trap_irq(void) { int irqno; extern struct rt_irq_desc irq_desc[]; @@ -37,13 +37,13 @@ void rt_hw_trap_irq() AT91C_BASE_AIC->AIC_EOICR = 0; } -void rt_hw_trap_fiq() +void rt_hw_trap_fiq(void) { rt_kprintf("fast interrupt request\n"); } extern struct rt_thread* rt_current_thread; -void rt_hw_trap_abort() +void rt_hw_trap_abort(void) { rt_kprintf("Abort occured!!! Thread [%s] suspended.\n",rt_current_thread->name); rt_thread_suspend(rt_current_thread);