/* This function will install a interrupt service routine to a interrupt.  */
rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler, void *param, char *name)
/* This function will install a interrupt service routine to a interrupt.  */
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)
    {
        rt_uint32_t* vect_ctl 	= (rt_uint32_t *)(VIC_BASE_ADDR + 0x200 + (vector << 2));
        *vect_ctl = 0x20 | (vector & 0x1F);
        old_handler = irq_desc[vector].handler;
		if (handler != RT_NULL)
		{
			irq_desc[vector].handler = handler;
			irq_desc[vector].param = param;
		}
    }
    return old_handler;
}