public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] MPC8xxx - cyg_hal_interrupt_acknowledge()
@ 2009-11-25  8:51 Danny Sade
  2009-12-18  7:03 ` Paul D. DeRocco
  0 siblings, 1 reply; 2+ messages in thread
From: Danny Sade @ 2009-11-25  8:51 UTC (permalink / raw)
  To: ecos-discuss

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?

Thanks

Danny

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [ECOS] MPC8xxx - cyg_hal_interrupt_acknowledge()
  2009-11-25  8:51 [ECOS] MPC8xxx - cyg_hal_interrupt_acknowledge() Danny Sade
@ 2009-12-18  7:03 ` Paul D. DeRocco
  0 siblings, 0 replies; 2+ messages in thread
From: Paul D. DeRocco @ 2009-12-18  7:03 UTC (permalink / raw)
  To: eCos Discuss

> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-18  7:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-25  8:51 [ECOS] MPC8xxx - cyg_hal_interrupt_acknowledge() Danny Sade
2009-12-18  7:03 ` Paul D. DeRocco

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).