The functions OEMInterruptEnable() and OEMInterruptDisable() are functions that a Windows CE device OEM must provide to enable and disable single interrupts. These functions receive as a parameter a SYSINTR value. They must map the SYSINTR value to an IRQ and then enable or disable the correct interrupt.
These functions are called indirectly by drivers. Drivers call functions like InterruptInitialize(), InterruptDone(), InterruptDisable(), and InterruptMask(). InterruptInitialize(), InterruptDone() and InterruptMask() indirectly call OEMInterrupteEnable(). InterruptDisable() and InterruptMask() indirectly call InterruptDisable().
To implement these functions, the Software Engineer will need to have a good understanding of how the interrupts are controlled on the hardware platform.   Some interrupts are controlled by registers in the CPU, while others may be controlled by external chips like a CPLD or FPGA. To enable and disable an interrupt is to mask or unmask the interrupt.
 It is important to realize that the functions are called when the code can be interrupted so caution should be used to ensure that changes to the mask registers must be done in an atomic way. If a register must be read, modified and written to mask or unmask an interrupt, the interrupt could be inadvertently masked or unmasked if the code is not atomic.
The BSPs that come with Platform Builder provide good examples for these functions. Depending on the BSP you may need to search in the CSP code to find the full implementations. The CSP code is in Platform\Common for CE 6.0 and in Public\Common\OAK\CSP for CE 5.0.
Copyright © 2009 – Bruce Eitman
All Rights Reserved