diff --git a/bsp/at91sam9260/platform/interrupt.c b/bsp/at91sam9260/platform/interrupt.c index dc98fe7c4d..60c4d0790b 100644 --- a/bsp/at91sam9260/platform/interrupt.c +++ b/bsp/at91sam9260/platform/interrupt.c @@ -396,6 +396,28 @@ void rt_hw_interrupt_ack(rt_uint32_t fiq_irq, rt_uint32_t id) at91_sys_write(AT91_AIC_EOICR, 0x0); } +void rt_interrupt_dispatch(rt_uint32_t fiq_irq) +{ + rt_isr_handler_t isr_func; + rt_uint32_t irq; + void *param; + + /* get irq number */ + irq = rt_hw_interrupt_get_active(fiq_irq); + + /* get interrupt service routine */ + isr_func = irq_desc[irq].handler; + param = irq_desc[irq].param; + + /* turn to interrupt service routine */ + isr_func(irq, param); + + rt_hw_interrupt_ack(fiq_irq, irq); +#ifdef RT_USING_INTERRUPT_INFO + irq_desc[irq].counter ++; +#endif +} + #ifdef RT_USING_FINSH #ifdef RT_USING_INTERRUPT_INFO void list_irq(void) diff --git a/bsp/at91sam9260/template.uvopt b/bsp/at91sam9260/template.uvopt index 2dca5102b8..7454a3661d 100644 --- a/bsp/at91sam9260/template.uvopt +++ b/bsp/at91sam9260/template.uvopt @@ -13,6 +13,7 @@ *.txt; *.h; *.inc *.plm *.cpp + 0 @@ -31,6 +32,7 @@ 1 1 0 + 0 1 @@ -108,10 +110,10 @@ 1 1 1 - 1 0 0 - 5 + 1 + 18 @@ -168,6 +170,13 @@ + 0 + 0 + 0 + + + + diff --git a/bsp/at91sam9260/template.uvproj b/bsp/at91sam9260/template.uvproj index c644bc5440..6e4ee85615 100644 --- a/bsp/at91sam9260/template.uvproj +++ b/bsp/at91sam9260/template.uvproj @@ -72,14 +72,18 @@ 0 0 + 0 + 0 - 0 + 1 0 - + fromelf.exe --bin -o $L@L.bin #L 0 0 + 0 + 0 0 @@ -141,10 +145,9 @@ 1 1 1 - 1 0 - 5 + 18 @@ -224,6 +227,7 @@ 0 0 0 + 0 3 3 0 @@ -356,8 +360,15 @@ 2 0 0 - 0 + 1 0 + 1 + 1 + 1 + 1 + 0 + 0 + 0 RT_USING_INTERRUPT_INFO @@ -375,6 +386,7 @@ 0 0 0 + 0