This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
MPC8xxx - cyg_hal_interrupt_acknowledge()
- From: Danny Sade <danny at channelot dot com>
- To: "ecos-discuss at ecos dot sourceware dot org" <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 25 Nov 2009 10:50:55 +0200
- Subject: [ECOS] 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