update Jz47xx: Modify the interrupt interface implementations.
This commit is contained in:
parent
29a3ae4368
commit
6058efbd9b
|
@ -39,7 +39,7 @@ void rt_hw_timer_handler(int vector, void* param)
|
||||||
/**
|
/**
|
||||||
* This function will initial OS timer
|
* This function will initial OS timer
|
||||||
*/
|
*/
|
||||||
void rt_hw_timer_init()
|
void rt_hw_timer_init(void)
|
||||||
{
|
{
|
||||||
rt_uint32_t val;
|
rt_uint32_t val;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
/*@{*/
|
/*@{*/
|
||||||
#if defined(RT_USING_UART) && defined(RT_USING_DEVICE)
|
#if defined(RT_USING_UART) && defined(RT_USING_DEVICE)
|
||||||
|
|
||||||
#define UART_BAUDRATE 115200
|
#define UART_BAUDRATE 57600
|
||||||
#define DEV_CLK 12000000
|
#define DEV_CLK 12000000
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -90,7 +90,9 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector,
|
||||||
{
|
{
|
||||||
old_handler = irq_handle_table[vector].handler;
|
old_handler = irq_handle_table[vector].handler;
|
||||||
|
|
||||||
|
#ifdef RT_USING_INTERRUPT_INFO
|
||||||
rt_strncpy(irq_handle_table[vector].name, name, RT_NAME_MAX);
|
rt_strncpy(irq_handle_table[vector].name, name, RT_NAME_MAX);
|
||||||
|
#endif /* RT_USING_INTERRUPT_INFO */
|
||||||
irq_handle_table[vector].handler = handler;
|
irq_handle_table[vector].handler = handler;
|
||||||
irq_handle_table[vector].param = param;
|
irq_handle_table[vector].param = param;
|
||||||
}
|
}
|
||||||
|
@ -118,6 +120,10 @@ void rt_interrupt_dispatch(void *ptreg)
|
||||||
/* do interrupt */
|
/* do interrupt */
|
||||||
(*irq_func)(i, irq_handle_table[i].param);
|
(*irq_func)(i, irq_handle_table[i].param);
|
||||||
|
|
||||||
|
#ifdef RT_USING_INTERRUPT_INFO
|
||||||
|
irq_handle_table[i].counter++;
|
||||||
|
#endif /* RT_USING_INTERRUPT_INFO */
|
||||||
|
|
||||||
/* ack interrupt */
|
/* ack interrupt */
|
||||||
INTC_IPR = (1 << i);
|
INTC_IPR = (1 << i);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue