This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

MPC8xxx - cyg_hal_interrupt_acknowledge()


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]