提交 6058efbd 编写于 作者: wuyangyong's avatar wuyangyong

update Jz47xx: Modify the interrupt interface implementations.

上级 29a3ae43
...@@ -39,7 +39,7 @@ void rt_hw_timer_handler(int vector, void* param) ...@@ -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 @@ ...@@ -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, ...@@ -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) ...@@ -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);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册