Adaptation/GUID-C059F39F-BC53-5C92-B05E-863B8CF22859.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-C059F39F-BC53-5C92-B05E-863B8CF22859" xml:lang="en"><title>Command
       
    13 Objects</title><shortdesc>The MultiMediaCard controller uses a <codeph>TMMCCommandDesc</codeph> object
       
    14 to contain command and parameter information when issuing a command over the
       
    15 bus.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    16 <p> This object is also used to contain response information resulting from
       
    17 the execution of that command. </p>
       
    18 <p>As it can sometimes be necessary to temporarily save current command and
       
    19 parameter information, the controller implements a small stack of <xref href="GUID-6B3DDBFD-3A4A-3694-A058-7794700FEC7A.dita"><apiname>TMMCCommandDesc</apiname></xref> objects.
       
    20 The controller then has the concept of a <i>current</i> command information
       
    21 object. </p>
       
    22 <p>The platform independent layer provides three functions through which command
       
    23 and parameter information can be set up: </p>
       
    24 <ul>
       
    25 <li id="GUID-2E6A2192-CC7E-519C-9918-F9A21A340D7B"><p>Two variants of <xref href="GUID-B5193656-9819-3E00-A335-EEF1726115A5.dita#GUID-B5193656-9819-3E00-A335-EEF1726115A5/GUID-DBD4FF2D-5443-3993-B63E-A19606D07C92"><apiname>DMMCStack::CurrentSessFillCmdDesc()</apiname></xref> </p> </li>
       
    26 <li id="GUID-95BD9ED0-773A-588E-801E-F248745A2160"><p> <xref href="GUID-B5193656-9819-3E00-A335-EEF1726115A5.dita#GUID-B5193656-9819-3E00-A335-EEF1726115A5/GUID-0629AAB8-4F6D-363D-ACCD-EAD31B884211"><apiname>DMMCStack::CurrentSessFillCmdArgs()</apiname></xref> </p> </li>
       
    27 </ul>
       
    28 <p>These functions are used to fill the <i>current</i> <xref href="GUID-6B3DDBFD-3A4A-3694-A058-7794700FEC7A.dita"><apiname>TMMCCommandDesc</apiname></xref> object. </p>
       
    29 <p>The controller executes a single command by calling the state machine function <xref href="GUID-B5193656-9819-3E00-A335-EEF1726115A5.dita#GUID-B5193656-9819-3E00-A335-EEF1726115A5/GUID-A48C1C16-B465-3DDA-9C83-00DEB8D27B68"><apiname>DMMCStack::IssueMMCCommandSM()</apiname></xref>;
       
    30 this is implemented by the platform specific layer as part of the porting
       
    31 activity. </p>
       
    32 <p>It calls <xref href="GUID-0186BEDE-8E28-3F8C-8CAE-A8B92F41F47A.dita#GUID-0186BEDE-8E28-3F8C-8CAE-A8B92F41F47A/GUID-931547BD-665D-326A-92B5-909B2D57F8C6"><apiname>DMMCSession::Command()</apiname></xref> to access the <i>current</i> command
       
    33 and parameter information. </p>
       
    34 <section id="GUID-0F16D5E0-9A9F-597C-9865-4D44C39BD78E"><title>The command
       
    35 stack</title> <p>Internally, the command stack is implemented as a simple
       
    36 array of <xref href="GUID-6B3DDBFD-3A4A-3694-A058-7794700FEC7A.dita"><apiname>TMMCCommandDesc</apiname></xref> objects; this is the <codeph>DMMCSession::iCommand[]</codeph> private
       
    37 data member. The stack is <codeph>KMaxMMCCommandStackDepth</codeph> deep.
       
    38 Internally, the current command information object is identified and accessed
       
    39 through the <codeph>DMMCSession::iCmdSP</codeph> data member, which indexes
       
    40 into the array and acts as a pointer to the current command information object. </p> <p>The
       
    41 platform independent layer provides two protected functions that the platform
       
    42 specific layer can use to change the command information object that is current: </p> <ul>
       
    43 <li id="GUID-6DAD8BE5-666C-5C4D-AC45-D5D8BA4E952F"><p> <xref href="GUID-B5193656-9819-3E00-A335-EEF1726115A5.dita#GUID-B5193656-9819-3E00-A335-EEF1726115A5/GUID-FE93890C-249A-3344-BC93-57E690A432C4"><apiname>DMMCStack::CurrentSessPushCmdStack()</apiname></xref> </p> </li>
       
    44 <li id="GUID-302438B8-7501-50DE-96FE-8AE7BA3D88B1"><p> <xref href="GUID-B5193656-9819-3E00-A335-EEF1726115A5.dita#GUID-B5193656-9819-3E00-A335-EEF1726115A5/GUID-7B55B7E8-373D-39BE-BB15-A9F41E6A0255"><apiname>DMMCStack::CurrentSessPopCmdStack()</apiname></xref> </p> </li>
       
    45 </ul> </section>
       
    46 </conbody></concept>