summaryrefslogtreecommitdiff
path: root/openpicc/application/pio_irq.c
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-14 05:28:05 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-14 05:28:05 +0000
commit8dc345999942b1f213f54c2ce4f2878abdabac4a (patch)
treeda82d2cd90d043f2475b0d584869115fce349296 /openpicc/application/pio_irq.c
parent3fb02f719f0bea99548a6bc7fe7c37e9d25ce800 (diff)
Rewrite irq handlers according to the new information in http://www.freertos.org/portsam7xlwIP.html: /* Call the handler function. This must be a separate function unless you can guarantee that
handling the interrupt will never use any stack space. */ git-svn-id: https://svn.openpcd.org:2342/trunk@327 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/pio_irq.c')
-rw-r--r--openpicc/application/pio_irq.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/openpicc/application/pio_irq.c b/openpicc/application/pio_irq.c
index d21d1db..5a82a85 100644
--- a/openpicc/application/pio_irq.c
+++ b/openpicc/application/pio_irq.c
@@ -85,11 +85,15 @@ void __ramfunc __pio_irq_demux(u_int32_t pio)
}
/* regular interrupt handler, in case fast forcing for PIOA disabled */
-static void pio_irq_demux(void)
+static void pio_irq_demux_inner(void)
{
- portSAVE_CONTEXT();
u_int32_t pio = AT91F_PIO_GetInterruptStatus(AT91C_BASE_PIOA);
__pio_irq_demux(pio);
+}
+static void pio_irq_demux_outer(void) __attribute__ ((naked));
+static void pio_irq_demux_outer(void) {
+ portSAVE_CONTEXT();
+ pio_irq_demux_inner();
portRESTORE_CONTEXT();
}
@@ -145,6 +149,6 @@ void pio_irq_init(void)
AT91F_PIOA_CfgPMC();
AT91F_AIC_ConfigureIt(AT91C_ID_PIOA,
OPENPICC_IRQ_PRIO_PIO,
- AT91C_AIC_SRCTYPE_INT_HIGH_LEVEL, &pio_irq_demux);
+ AT91C_AIC_SRCTYPE_INT_HIGH_LEVEL, &pio_irq_demux_outer);
AT91F_AIC_EnableIt(AT91C_ID_PIOA);
}
personal git repositories of Harald Welte. Your mileage may vary