update AT91SAM7X: Modify the interrupt interface implementations.

This commit is contained in:
aozima 2013-03-23 20:13:43 +08:00
parent 83ce430902
commit eab20a9975
3 changed files with 8 additions and 7 deletions

View File

@ -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);

View File

@ -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 <rtthread.h>
#include <rthw.h>
#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;

View File

@ -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);