From 710a0fc4a5169c7343889f7d509a454d10a01096 Mon Sep 17 00:00:00 2001 From: weety Date: Sun, 31 Mar 2013 18:24:51 +0800 Subject: [PATCH] fix issue when print interrupt info --- libcpu/arm/at91sam926x/interrupt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libcpu/arm/at91sam926x/interrupt.c b/libcpu/arm/at91sam926x/interrupt.c index 91aaba1418..0a1809e43b 100755 --- a/libcpu/arm/at91sam926x/interrupt.c +++ b/libcpu/arm/at91sam926x/interrupt.c @@ -207,6 +207,7 @@ void rt_hw_interrupt_init(void) rt_snprintf(irq_desc[idx].name, RT_NAME_MAX - 1, "default"); irq_desc[idx].handler = (rt_isr_handler_t)rt_hw_interrupt_handle; irq_desc[idx].param = RT_NULL; + irq_desc[idx].counter = 0; } at91_gpio_irq_init(); @@ -321,6 +322,7 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler, rt_snprintf(irq_desc[vector].name, RT_NAME_MAX - 1, "%s", name); irq_desc[vector].handler = (rt_isr_handler_t)handler; irq_desc[vector].param = param; + irq_desc[vector].counter = 0; } } @@ -372,7 +374,7 @@ void list_irq(void) { if (rt_strncmp(irq_desc[irq].name, "default", sizeof("default"))) { - rt_kprintf("%02ld: %10ld %s\n", irq, irq_desc[irq].name); + rt_kprintf("%02ld: %10ld %s\n", irq, irq_desc[irq].counter, irq_desc[irq].name); } } }