From 3d0a9bd40be2d014e0877eb623042c899d8cbe66 Mon Sep 17 00:00:00 2001 From: henryk Date: Tue, 13 Nov 2007 00:47:14 +0000 Subject: Add PIO IRQ counter (and print it in 'c' command) Make tc_cdiv_sync interrupt working Add 'p' command to print some PIO inputs Add 'z' command to enable/disable tc_cdiv_sync git-svn-id: https://svn.openpcd.org:2342/trunk@324 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/application/pio_irq.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'openpicc/application/pio_irq.c') diff --git a/openpicc/application/pio_irq.c b/openpicc/application/pio_irq.c index 572a4e4..c7238d8 100644 --- a/openpicc/application/pio_irq.c +++ b/openpicc/application/pio_irq.c @@ -38,6 +38,7 @@ struct pioirq_state { }; static struct pioirq_state pirqs; +static unsigned long count = 0; /* low-level handler, used by Cstartup_app.S PIOA fast forcing and * by regular interrupt handler below */ @@ -45,6 +46,7 @@ void __ramfunc __pio_irq_demux(u_int32_t pio) { u_int8_t send_usb = 0; int i; + count++; DEBUGPCRF("PIO_ISR_STATUS = 0x%08x", pio); @@ -101,6 +103,12 @@ void pio_irq_disable(u_int32_t pio) AT91F_PIO_InterruptDisable(AT91C_BASE_PIOA, pio); } +/* Return the number of PIO IRQs received */ +long pio_irq_get_count(void) +{ + return count; +} + int pio_irq_register(u_int32_t pio, irq_handler_t *handler) { u_int8_t num = ffs(pio); -- cgit v1.2.3