diff options
| author | Bernard Xiong <[email protected]> | 2013-03-31 04:14:13 -0700 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2013-03-31 04:14:13 -0700 |
| commit | a667da553e0f08f5f4afdd9022e6b1105d76bd81 (patch) | |
| tree | bc2477f9a5beed222a2c931d0a2ba5b41ff78060 /libcpu | |
| parent | 97eadb7d8ee2aa96a3de6acaa9e2815774da2b6f (diff) | |
| parent | 710a0fc4a5169c7343889f7d509a454d10a01096 (diff) | |
Merge pull request #66 from weety/at91sam9260
fix issue when print interrupt info
Diffstat (limited to 'libcpu')
| -rwxr-xr-x | libcpu/arm/at91sam926x/interrupt.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); } } } |
