Symbian3/PDK/Source/GUID-DA8526FB-5789-4CB6-9A92-754E39C52E3B.dita
changeset 5 f345bda72bc4
equal deleted inserted replaced
4:4816d766a08a 5:f345bda72bc4
       
     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-DA8526FB-5789-4CB6-9A92-754E39C52E3B" xml:lang="en"><title>Pin
       
    13 Direction Functions</title><shortdesc>Describes the pin direction functions involved in implementing
       
    14 the Symbian platform GPIO class.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <p>Pins are used as inputs or outputs of binary signals. The Symbian platform
       
    16 GPIO class does not support bidirectional pins. However, some platforms allow
       
    17 pins to be in a quiescent state (also called floating or tri-stated). In this
       
    18 case a pin can be in one of three logical states namely, True, False or quiescent
       
    19 as specified in the enumeration <codeph>TGpioDirection</codeph>. The relevant
       
    20 three-valued logic is specified in this table.</p>
       
    21 <table id="GUID-C656B1CE-149D-4BCA-94BD-7B906E93F173">
       
    22 <tgroup cols="3"><colspec colname="col1"/><colspec colname="col2"/><colspec colname="col3"/>
       
    23 <thead>
       
    24 <row>
       
    25 <entry nameend="col2" namest="col1" valign="top"><p>Input </p> </entry>
       
    26 <entry valign="top"><p>Output</p></entry>
       
    27 </row>
       
    28 </thead>
       
    29 <tbody>
       
    30 <row>
       
    31 <entry><p>A</p></entry>
       
    32 <entry><p>B</p></entry>
       
    33 <entry><p>C</p></entry>
       
    34 </row>
       
    35 <row>
       
    36 <entry><p>0</p></entry>
       
    37 <entry><p>0</p></entry>
       
    38 <entry><p>Z</p></entry>
       
    39 </row>
       
    40 <row>
       
    41 <entry><p>1</p></entry>
       
    42 <entry><p>0</p></entry>
       
    43 <entry><p>Z</p></entry>
       
    44 </row>
       
    45 <row>
       
    46 <entry><p>0</p></entry>
       
    47 <entry><p>1</p></entry>
       
    48 <entry><p>0</p></entry>
       
    49 </row>
       
    50 <row>
       
    51 <entry><p>1</p></entry>
       
    52 <entry><p>1</p></entry>
       
    53 <entry><p>1</p></entry>
       
    54 </row>
       
    55 </tbody>
       
    56 </tgroup>
       
    57 </table>
       
    58 <section id="GUID-3DA1E4AC-BAE0-469E-8A5D-72E292A533C1"><title>Implement the
       
    59 pin direction functions</title> <ul>
       
    60 <li><p>          Implement <xref href="GUID-38FAAC57-13CF-390F-AE05-8D2B9E092450.dita"><apiname>SetPinDirection()</apiname></xref> for each value
       
    61          of the enumeration <xref href="GUID-2F6DB4C0-D198-39A8-B990-EF1D5B9B5901.dita"><apiname>TGpioDirection</apiname></xref>.</p><ul>
       
    62 <li><p>             Implement <xref href="GUID-38FAAC57-13CF-390F-AE05-8D2B9E092450.dita"><apiname>SetPinDirection()</apiname></xref> with  
       
    63           <codeph>aDirection</codeph> == <xref href="GUID-EC5870C2-5C3E-3DFB-9349-85AAF1A0AE58.dita"><apiname>EInput</apiname></xref> and return
       
    64 value             <codeph>KErrNone.</codeph>           </p> <p>          
       
    65   Set the pin to behave as an input binary signal.           </p> </li>
       
    66 <li><p>             Implement <xref href="GUID-38FAAC57-13CF-390F-AE05-8D2B9E092450.dita"><apiname>SetPinDirection()</apiname></xref> with  
       
    67           <codeph>aDirection</codeph> == <xref href="GUID-8E81439B-6FB5-3EEC-BC36-F3B70217FA8D.dita"><apiname>EOutput</apiname></xref> and return
       
    68 value             <codeph>KErrNone.</codeph>           </p> <p>          
       
    69   Set the pin to behave as an output binary signal.           </p> </li>
       
    70 <li><p>             Implement <xref href="GUID-38FAAC57-13CF-390F-AE05-8D2B9E092450.dita"><apiname>SetPinDirection()</apiname></xref> with  
       
    71           <codeph>aDirection</codeph> == <xref href="GUID-2AEEC0C1-CF80-3C1D-B24B-17178ACA6AB4.dita"><apiname>ETriStated</apiname></xref> and
       
    72 return value             <codeph>KErrNone.</codeph>           </p> <p>   
       
    73          Set the pin to be in a quiescent state (also called floating or 
       
    74            deactivated).           </p> <p>             Only implement this
       
    75 if the platform supports the quiescent             state. The physical state
       
    76 of the pin will be determined by the drive on the             line.      
       
    77     </p> </li>
       
    78 <li><p>             Implement <xref href="GUID-38FAAC57-13CF-390F-AE05-8D2B9E092450.dita"><apiname>SetPinDirection()</apiname></xref> with return
       
    79             value <xref href="GUID-F89DA3F0-2A48-3F9B-8F08-29350E92D0E4.dita"><apiname>KErrNotSupported</apiname></xref>.           </p> <p> 
       
    80            Return <xref href="GUID-F89DA3F0-2A48-3F9B-8F08-29350E92D0E4.dita"><apiname>KErrNotSupported</apiname></xref> if the pin cannot  
       
    81           operate in the direction specified, for instance if             <xref href="GUID-2AEEC0C1-CF80-3C1D-B24B-17178ACA6AB4.dita"><apiname>ETriStated</apiname></xref> has
       
    82 been passed and the platform does not             support the quiescent state.
       
    83           </p> </li>
       
    84 </ul></li>
       
    85 <li><p>          Implement <xref href="GUID-062A11F7-123D-334C-A082-F21DB9A9EE32.dita"><apiname>GetPinDirection()</apiname></xref> for each value
       
    86          of the enumeration <xref href="GUID-2F6DB4C0-D198-39A8-B990-EF1D5B9B5901.dita"><apiname>TGpioDirection</apiname></xref>.         </p> <ul>
       
    87 <li><p>             Implement <xref href="GUID-062A11F7-123D-334C-A082-F21DB9A9EE32.dita"><apiname>GetPinDirection()</apiname></xref> with  
       
    88           <codeph>aDirection</codeph> containing <xref href="GUID-EC5870C2-5C3E-3DFB-9349-85AAF1A0AE58.dita"><apiname>EInput</apiname></xref> and
       
    89 return value             <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref>.           </p> <p> 
       
    90            Verify that the pin is behaving as a binary input signal. Set 
       
    91            <xref href="GUID-221FF753-F089-399C-BD67-A693E68AB727.dita"><apiname>aDirection</apiname></xref> to <xref href="GUID-EC5870C2-5C3E-3DFB-9349-85AAF1A0AE58.dita"><apiname>EInput</apiname></xref>    
       
    92       </p> </li>
       
    93 <li><p>             Implement <xref href="GUID-062A11F7-123D-334C-A082-F21DB9A9EE32.dita"><apiname>GetPinDirection()</apiname></xref> with  
       
    94           <codeph>aDirection</codeph> containing <xref href="GUID-8E81439B-6FB5-3EEC-BC36-F3B70217FA8D.dita"><apiname>EOutput</apiname></xref> and
       
    95 return             value <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref>.           </p> <p> 
       
    96            Verify that the pin is behaving as a binary output signal. Set
       
    97             <codeph>aDirection</codeph> to <xref href="GUID-EC5870C2-5C3E-3DFB-9349-85AAF1A0AE58.dita"><apiname>EInput</apiname></xref>     
       
    98      </p> </li>
       
    99 <li><p>             Implement <xref href="GUID-062A11F7-123D-334C-A082-F21DB9A9EE32.dita"><apiname>GetPinDirection()</apiname></xref> with  
       
   100           <codeph>aDirection</codeph> containing <xref href="GUID-2AEEC0C1-CF80-3C1D-B24B-17178ACA6AB4.dita"><apiname>ETriStated</apiname></xref> and
       
   101 return             value <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref>.           </p> <p> 
       
   102            Verify that the pin is in the quiescent state. Set             <codeph>aDirection</codeph> to <xref href="GUID-2AEEC0C1-CF80-3C1D-B24B-17178ACA6AB4.dita"><apiname>ETriStated</apiname></xref> 
       
   103          </p> </li>
       
   104 <li><p>             Implement <xref href="GUID-062A11F7-123D-334C-A082-F21DB9A9EE32.dita"><apiname>GetPinDirection()</apiname></xref> with return
       
   105             value <xref href="GUID-F89DA3F0-2A48-3F9B-8F08-29350E92D0E4.dita"><apiname>KErrNotSupported</apiname></xref>.           </p> <p> 
       
   106            Return <xref href="GUID-F89DA3F0-2A48-3F9B-8F08-29350E92D0E4.dita"><apiname>KErrNotSupported</apiname></xref> if reading the pin 
       
   107            direction is not supported.           </p> </li>
       
   108 </ul></li>
       
   109 </ul> </section>
       
   110 </conbody></concept>