Describes the implementation of the clear function.
The function Interrupt::Clear() is used by device drivers to acknowledge that they have serviced the interrupt and cleared the pending flag in the interrupt controller hardware.
This is useful in situations where an interrupt must be cleared explicitly rather than as a side effect of an I/O register access, especially where the clearing is done from generic code such as in the PC card and MMC controllers.
The implementation of this function is completely dependent on the interrupt hardware.
In the template port, Interrupt::Clear() is implemented in ...\template_assp\interrupts.cpp.
EXPORT_C TInt Interrupt::Clear(TInt anId) { __KTRACE_OPT(KEXTENSION,Kern::Printf("Interrupt::Clear id=%d",anId)); TInt r=KErrNone; // if ID indicates a chained interrupt, call variant... if (anId<0 && ((((TUint)anId)>>16)&0x7fff)<(TUint)KNumTemplateInts) r=TemplateAssp::Variant->InterruptClear(anId); else if ((TUint)anId>=(TUint)KNumTemplateInts) r=KErrArgument; else { // // TO DO: (mandatory) // // Clear the corresponding Hardware Interrupt source // } return r; }
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.