The ISR Table and Interrupt IDs must be defined by the ASSP/Variant.
Decide on the number of interrupts that exist in the system. If the port is split into a core ASSP layer, and a device Variant layer, the core layer should include only those interrupts that exist on the ASSP.
In the core ASSP implementation, declare a static ISR table, of type SInterruptHandler with the same number of entries that you have just worked out.
In the template port, for example, this table is static member of the TemplateInterrupt class:
const TInt KNumTemplateInts=EAsspIntIdZ+1; class TemplateInterrupt : public Interrupt { ... public: static SInterruptHandler Handlers[KNumTemplateInts]; };
SInterruptHandler is defined in ...\e32\include\kernel\arm\assp.h, and TemplateInterrrupt is defined in ...\template_assp\template_assp_priv.h.
Declare an enum in an exported header file that provides labels for each of the possible Interrupt IDs in the table.
For example, in the template port, the interrupt IDs are defined by the TTemplateAsspInterruptId enum, defined in ...\template_assp\template_assp.h, and is part of the ASSP layer:
// Enumerate here all ASSP interrupt sources. It could be a good idea to enumerate them in a way that facilitates // operating on the corresponding interrupt controller registers (for example, using their value as a shift count) // // EXAMPLE ONLY enum TTemplateAsspInterruptId { // ASSP or first-level Interrupt IDs EAsspIntIdA=0, EAsspIntIdB=1, EAsspIntIdC=2, EAsspIntIdD=3, EAsspIntIdE=4, // ... EAsspIntIdUsb=11, EAsspIntIdDma=12, // ... EAsspIntIdZ=25 };
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.