[ECOS] MPC8xxx - cyg_hal_interrupt_acknowledge()

Paul D. DeRocco pderocco@ix.netcom.com
Fri Dec 18 07:03:00 GMT 2009


> 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



More information about the Ecos-discuss mailing list