7 Nokia Corporation - initial contribution. |
7 Nokia Corporation - initial contribution. |
8 Contributors: |
8 Contributors: |
9 --> |
9 --> |
10 <!DOCTYPE concept |
10 <!DOCTYPE concept |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
12 <concept id="GUID-B9B35999-0937-51C5-BB77-91A6C039CE2F" xml:lang="en"><title>ISR |
12 <concept id="GUID-B9B35999-0937-51C5-BB77-91A6C039CE2F" xml:lang="en"><title>ISR Table and Interrupt IDs</title><shortdesc>The ISR Table and Interrupt IDs must be defined by the |
13 Table and Interrupt IDs</title><shortdesc>The ISR Table and Interrupt IDs must be defined by the ASSP/Variant. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
13 ASSP/Variant. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 <section id="GUID-1342D8AC-CE52-488F-84BE-B87D4018B873"><title>ISR Table</title> <p>Decide on the number of interrupts that |
14 <section id="GUID-1342D8AC-CE52-488F-84BE-B87D4018B873"><title>ISR |
15 exist in the system. If the port is split into a core ASSP layer, and a device |
15 Table</title> <p>Decide on the number of interrupts that exist in |
16 Variant layer, the core layer should include only those interrupts that exist |
16 the system. If the port is split into a core ASSP layer, and a device |
17 on the ASSP. </p> <p>In the core ASSP implementation, declare a static <xref href="GUID-76A30EC4-4B99-5471-9E80-F853C91485BC.dita#GUID-76A30EC4-4B99-5471-9E80-F853C91485BC/GUID-77E83634-BBF6-5190-9434-9FB700547CD0">ISR |
17 Variant layer, the core layer should include only those interrupts |
18 table</xref>, of type <xref href="GUID-2C9B6510-D045-3FA1-AD65-B544E30D34C7.dita"><apiname>SInterruptHandler</apiname></xref> with the same number |
18 that exist on the ASSP. </p> <p>In the core ASSP implementation, declare |
19 of entries that you have just worked out. </p> <p>In the template port, for |
19 a static <xref href="GUID-76A30EC4-4B99-5471-9E80-F853C91485BC.dita#GUID-76A30EC4-4B99-5471-9E80-F853C91485BC/GUID-77E83634-BBF6-5190-9434-9FB700547CD0">ISR table</xref>, of type <xref href="GUID-2C9B6510-D045-3FA1-AD65-B544E30D34C7.dita"><apiname>SInterruptHandler</apiname></xref> with |
20 example, this table is static member of the <codeph>TemplateInterrupt</codeph> class: </p> <codeblock id="GUID-733FA201-2D43-5044-AAEA-D98D26BF3B36" xml:space="preserve">const TInt KNumTemplateInts=EAsspIntIdZ+1; |
20 the same number of entries that you have just worked out. </p> <p>In the template port, for example, this table is static member of |
|
21 the <codeph>TemplateInterrupt</codeph> class: </p> <codeblock id="GUID-733FA201-2D43-5044-AAEA-D98D26BF3B36" xml:space="preserve">const TInt KNumTemplateInts=EAsspIntIdZ+1; |
21 |
22 |
22 class TemplateInterrupt : public Interrupt |
23 class TemplateInterrupt : public Interrupt |
23 { |
24 { |
24 ... |
25 ... |
25 public: |
26 public: |
26 static SInterruptHandler Handlers[KNumTemplateInts]; |
27 static SInterruptHandler Handlers[KNumTemplateInts]; |
27 }; |
28 }; |
28 </codeblock> <p> <codeph>SInterruptHandler</codeph> is defined |
29 </codeblock> <p> <codeph>SInterruptHandler</codeph> is |
29 in <filepath>...\e32\include\kernel\arm\assp.h</filepath>, and <codeph>TemplateInterrrupt</codeph> is |
30 defined in <filepath>...\e32\include\kernel\arm\assp.h</filepath>, |
30 defined in <filepath>...\template_assp\template_assp_priv.h</filepath>. </p> </section> |
31 and <codeph>TemplateInterrrupt</codeph> is defined in <filepath>...\template_assp\template_assp_priv.h</filepath>. </p> </section> |
31 <section id="GUID-1AC207D8-5395-4583-BCF1-7C952609D227"><title>Interrupt IDs</title> <p>Declare an enum in an exported header |
32 <section id="GUID-1AC207D8-5395-4583-BCF1-7C952609D227"><title>Interrupt |
32 file that provides labels for each of the possible <xref href="GUID-76A30EC4-4B99-5471-9E80-F853C91485BC.dita#GUID-76A30EC4-4B99-5471-9E80-F853C91485BC/GUID-8E58F4C9-0290-55E0-A4FD-B6C2361BE205">Interrupt ID</xref> s in the table. </p> <p>For example, in the template |
33 IDs</title> <p>Declare an enum in an exported header file that provides |
33 port, the interrupt IDs are defined by the <codeph>TTemplateAsspInterruptId</codeph> enum, |
34 labels for each of the possible <xref href="GUID-76A30EC4-4B99-5471-9E80-F853C91485BC.dita#GUID-76A30EC4-4B99-5471-9E80-F853C91485BC/GUID-8E58F4C9-0290-55E0-A4FD-B6C2361BE205">Interrupt ID</xref>s in the table. </p> <p>For example, in the template |
34 defined in <filepath>...\template_assp\template_assp.h</filepath>, and is |
35 port, the interrupt IDs are defined by the <codeph>TTemplateAsspInterruptId</codeph> enum, defined in <filepath>...\template_assp\template_assp.h</filepath>, and is part of the ASSP layer: </p> <codeblock id="GUID-9E221131-1A5C-5969-8A1B-945D943D70E0" xml:space="preserve">// Enumerate here all ASSP interrupt sources. It could be a good idea to enumerate them in a way that facilitates |
35 part of the ASSP layer: </p> <codeblock id="GUID-9E221131-1A5C-5969-8A1B-945D943D70E0" xml:space="preserve">// Enumerate here all ASSP interrupt souces. It could be a good idea to enumerate them in a way that facilitates |
36 // operating on the corresponding interrupt controller registers (for example, using their value as a shift count) |
36 // operating on the corresponding interrupt controller registers (e.g using their value as a shift count) |
|
37 // |
37 // |
38 // EXAMPLE ONLY |
38 // EXAMPLE ONLY |
39 enum TTemplateAsspInterruptId |
39 enum TTemplateAsspInterruptId |
40 { |
40 { |
41 // ASSP or first-level Interrupt IDs |
41 // ASSP or first-level Interrupt IDs |