This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: MPC8xxx - cyg_hal_interrupt_acknowledge()
- From: "Paul D. DeRocco" <pderocco at ix dot netcom dot com>
- To: "eCos Discuss" <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 17 Dec 2009 23:02:55 -0800
- Subject: RE: [ECOS] MPC8xxx - cyg_hal_interrupt_acknowledge()
> From: Danny Sade
>
> Hi All,
> cyg_hal_interrupt_acknowledge( vector ) is composed of lines like
> case CYGNUM_HAL_INTERRUPT_IRQ1 ... CYGNUM_HAL_INTERRUPT_IRQ7:
> *reg_sipnr_h |= ( (0x00004000) >> (vector -
> CYGNUM_HAL_INTERRUPT_IRQ1) );
> break;
>
> The question is why to use the |= operator? When an interrupt is
> pending, the corresponding bit
> at SIPNR is turned on. Using the |= operator results with
> writing 1s to all bits which are turned on,
> and therefore acknowledging all pending interrupts...
>
> Am I missing something here?
Yes. Read it again. Looks fine to me.
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco@ix.netcom.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss