h6. [[Hardware Abstraction Layer]] h6(. [[HAL entry points from RISC OS]] h6((. » HAL_IRQClear h2. HAL_IRQClear h5. (HAL entry #3) <pre> void HAL_IRQClear(int device) </pre> |_<. Entry | | |device |Device number to clear interrupt state for | |_<. Exit | | |- | | h4. Use If the interrupt controller does not latch interrupt sources, and the [[HAL Video API]] is not implemented, this call does not need to be implemented. If the interrupt controller does latch interrupt sources, this call must be implemented, to provide a way for those latches to be reset once the device has been serviced. Otherwise the ARM may receive spurious IRQs for devices which are no longer interrupting, or the system may become completely stuck attempting to serve the phantom IRQ. RISC OS code which uses IRQs must make sure to call HAL_IRQClear once they have serviced the interrupting device – the OS will not call it for you. If the [[HAL Video API]] is implemented, this call is expected to be capable of clearing any VSync IRQ that's latched in the video controller. Previously, HAL_IRQClear was also responsible for clearing latched timer IRQs, but that responsibility has now fully shifted to [[HAL_TimerIRQClear]] (Note, however, that because interrupts may be latched in both the timer and the IRQ controller, timer code must call both entry points to ensure the interrupt state is cleared). h4. See also * [[HAL interrupt handling API]] * [[HAL timer API]] * [[HAL Video API]] h6. Information sources: Kernel.Docs.HAL.MoreEnts, HAL.Tungsten.s.Interrupts, HAL.OMAP3.s.Interrupts in CVS