Adaptation/GUID-B9B35999-0937-51C5-BB77-91A6C039CE2F.dita
changeset 15 307f4279f433
equal deleted inserted replaced
14:578be2adaf3e 15:307f4279f433
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    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 ASSP/Variant. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <section id="GUID-1342D8AC-CE52-488F-84BE-B87D4018B873"><title>ISR
       
    15 Table</title> <p>Decide on the number of interrupts that exist in
       
    16 the system. If the port is split into a core ASSP layer, and a device
       
    17 Variant layer, the core layer should include only those interrupts
       
    18 that exist on the ASSP. </p> <p>In the core ASSP implementation, declare
       
    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 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;
       
    22 
       
    23 class TemplateInterrupt : public Interrupt
       
    24     {
       
    25  ...
       
    26  public:
       
    27      static SInterruptHandler Handlers[KNumTemplateInts];
       
    28     };
       
    29             </codeblock> <p> <codeph>SInterruptHandler</codeph> is
       
    30 defined in <filepath>...\e32\include\kernel\arm\assp.h</filepath>,
       
    31 and <codeph>TemplateInterrrupt</codeph> is defined in <filepath>...\template_assp\template_assp_priv.h</filepath>. </p> </section>
       
    32 <section id="GUID-1AC207D8-5395-4583-BCF1-7C952609D227"><title>Interrupt
       
    33 IDs</title> <p>Declare an enum in an exported header file that provides
       
    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
       
    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
       
    36 // operating on the corresponding interrupt controller registers (for example, using their value as a shift count)
       
    37 //
       
    38 // EXAMPLE ONLY
       
    39 enum TTemplateAsspInterruptId
       
    40     {
       
    41     // ASSP or first-level Interrupt IDs
       
    42     EAsspIntIdA=0,
       
    43     EAsspIntIdB=1,
       
    44     EAsspIntIdC=2,
       
    45     EAsspIntIdD=3,
       
    46     EAsspIntIdE=4,
       
    47     // ...
       
    48     EAsspIntIdUsb=11,
       
    49     EAsspIntIdDma=12,
       
    50     // ...
       
    51     EAsspIntIdZ=25
       
    52     };</codeblock> </section>
       
    53 </conbody></concept>