From: Andrew Lunn <andrew@lunn.ch>
To: Neeraja <neeraja.kothala@gmail.com>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] How to handle IRQ0 interrupt?
Date: Thu, 08 Mar 2007 17:40:00 -0000 [thread overview]
Message-ID: <20070308173950.GB9229@lunn.ch> (raw)
In-Reply-To: <9372163.post@talk.nabble.com>
On Thu, Mar 08, 2007 at 02:34:26AM -0800, Neeraja wrote:
>
> Hi,
> I am working on at91rm9200 board. I want to catch the interrupt when the
> button is pressed which is connected to IRQ0 line.
> But what is happening is that when I run the application the interrupt isr
> is being called always irrespective of the button press.
>
> Can anyone suggest me how to configure so that the interrupt comes only when
> the button is pressed ?
>
> Here is the part of the code I am using
>
> interrupt = CYGNUM_HAL_INTERRUPT_IRQ0;
> cyg_interrupt_create(interrupt,
> 0, // Priority - what goes
> here?
> (cyg_addrword_t)0, // Data item passed to
> interrupt handler
> (cyg_ISR_t *)IRQ0_isr,
> (cyg_DSR_t *)IRQ0_dsr,
> &interrupt_handle,
> &interrupt_object);
>
> cyg_interrupt_attach(interrupt_handle);
> cyg_interrupt_acknowledge(interrupt);
> cyg_interrupt_unmask(interrupt);
Please show us the code which you use the setup the PIO.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2007-03-08 17:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-08 10:34 Neeraja
2007-03-08 17:38 ` Paul D. DeRocco
2007-03-09 12:55 ` [ECOS] " Neeraja
2007-03-08 17:40 ` Andrew Lunn [this message]
2007-03-09 0:19 ` [ECOS] " jiang jet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070308173950.GB9229@lunn.ch \
--to=andrew@lunn.ch \
--cc=ecos-discuss@ecos.sourceware.org \
--cc=neeraja.kothala@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).