diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-11-21 00:30:19 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-11-21 00:30:19 +0000 |
commit | 5cc0ed498f99d3b23c6f1b87a9a2fdcbb05dd1a9 (patch) | |
tree | e0f681d5a7fc06f192abdac3961ab39e08f98592 /openpicc/application/pio_irq.c | |
parent | ac77f6b5c53c4f2afb97564d1d281c5fdc429409 (diff) |
Checking in status quo: Can currently receive and print frames in ssc continuous mode (with new short and incomplete ssc irq handler: FIXME, either switch back to original handler (maybe fixing it
if necessary) or handle the missing cases in the new handler). Lots of debug statements still in there
git-svn-id: https://svn.openpcd.org:2342/trunk@335 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/pio_irq.c')
-rw-r--r-- | openpicc/application/pio_irq.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/openpicc/application/pio_irq.c b/openpicc/application/pio_irq.c index 5a82a85..648a561 100644 --- a/openpicc/application/pio_irq.c +++ b/openpicc/application/pio_irq.c @@ -85,15 +85,12 @@ void __ramfunc __pio_irq_demux(u_int32_t pio) } /* regular interrupt handler, in case fast forcing for PIOA disabled */ -static void pio_irq_demux_inner(void) +static void pio_irq_demux(void) __attribute__ ((naked)); +static void pio_irq_demux(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(); } @@ -144,11 +141,19 @@ void pio_irq_unregister(u_int32_t pio) pirqs.handlers[num] = NULL; } +static int initialized = 0; +void pio_irq_init_once(void) +{ + if(!initialized) pio_irq_init(); +} + void pio_irq_init(void) { + initialized = 1; AT91F_PIOA_CfgPMC(); AT91F_AIC_ConfigureIt(AT91C_ID_PIOA, OPENPICC_IRQ_PRIO_PIO, - AT91C_AIC_SRCTYPE_INT_HIGH_LEVEL, &pio_irq_demux_outer); + AT91C_AIC_SRCTYPE_INT_HIGH_LEVEL, &pio_irq_demux); AT91F_AIC_EnableIt(AT91C_ID_PIOA); + (void)pio_irq_demux; // FIXME NO IRQ } |