Symbian3/PDK/Source/GUID-90E2A645-56B0-4FC2-AE92-CD72FEC23AE6.dita
changeset 5 f345bda72bc4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/PDK/Source/GUID-90E2A645-56B0-4FC2-AE92-CD72FEC23AE6.dita	Tue Mar 30 11:56:28 2010 +0100
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE concept
+  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
+<concept id="GUID-90E2A645-56B0-4FC2-AE92-CD72FEC23AE6" xml:lang="en"><title>Input
+and Output Functions</title><shortdesc>Describes the input and output functions involved in implementing
+the Symbian platform GPIO class.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
+<p>There is no general reason why a pin which is available for use for GPIO
+should not also be available for some other function, and the Symbian platform
+GPIO specification allows for this. There are certain circumstances where
+pin sharing should be prevented, for instance when a pin is in use as an interrupt
+source, and these cases are specified individually.  </p>
+<section id="GUID-84ACB7AB-F6DE-42F5-8C89-C7598FBC7AC1"><title>Implement the
+Input/output functions</title> <ul>
+<li><p>          Implement <xref href="GUID-EB28CB99-7191-345B-90FC-7708E9D190C7.dita"><apiname>SetOutputState()</apiname></xref> for each value
+of          <xref href="GUID-7C1D78B4-9897-3C38-8EE7-7C311B885B0B.dita"><apiname>TGpioState</apiname></xref>.         </p> <ul>
+<li><p>                Implement <xref href="GUID-EB28CB99-7191-345B-90FC-7708E9D190C7.dita"><apiname>SetOutputState()</apiname></xref> with
+               <codeph>aState</codeph> == <xref href="GUID-ABF52F3A-CDC3-3AC6-89ED-FB7F5B781A25.dita"><apiname>ELow</apiname></xref> and return
+value                <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref>.              </p> <p>  
+             Verify that the pin is being used as a binary output. Set it
+               to its low electric state.              </p> </li>
+<li><p>                Implement <xref href="GUID-EB28CB99-7191-345B-90FC-7708E9D190C7.dita"><apiname>SetOutputState()</apiname></xref> with
+               <codeph>aState</codeph> == <xref href="GUID-28B7F356-760B-38EA-90B1-AD3594375CBC.dita"><apiname>EHigh</apiname></xref> and return
+value                <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref>.              </p> <p>  
+             Verify that the pin is being used as a binary output. Set it
+               to its high electric state.              </p> </li>
+<li><p>                Implement <xref href="GUID-EB28CB99-7191-345B-90FC-7708E9D190C7.dita"><apiname>SetOutputState()</apiname></xref> with
+               <codeph>aState</codeph> == <xref href="GUID-A538A8AF-DA50-3641-A794-19CAFF5B28F2.dita"><apiname>EDefaultIdleState</apiname></xref> and
+return value                <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref>.              </p> <p> 
+              Verify that the pin is being used as a binary output. Set its
+               electric state to its default idle state.              </p> </li>
+<li><p>                Implement <xref href="GUID-EB28CB99-7191-345B-90FC-7708E9D190C7.dita"><apiname>SetOutputState()</apiname></xref> with
+return                value <xref href="GUID-F89DA3F0-2A48-3F9B-8F08-29350E92D0E4.dita"><apiname>KErrNotSupported</apiname></xref>.         
+    </p> <p>                If the specified electric state is not supported
+return                <xref href="GUID-F89DA3F0-2A48-3F9B-8F08-29350E92D0E4.dita"><apiname>KErrNotSupported</apiname></xref>.              </p> </li>
+</ul> </li>
+<li><p>          Implement <xref href="GUID-E88C05CA-8882-3C6A-9B64-8048DB7DA622.dita"><apiname>GetOutputState()</apiname></xref> with return
+value          <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref>.         </p> <p>          Verify
+that the pin is being used as a binary output. Determine          its electric
+state and set <codeph>aState</codeph> to the appropriate value of        
+ <xref href="GUID-7C1D78B4-9897-3C38-8EE7-7C311B885B0B.dita"><apiname>TGpioState</apiname></xref>.         </p> </li>
+<li><p>          Implement <xref href="GUID-9BFB4B87-1400-33C0-B116-AC6FA349BE1E.dita"><apiname>GetInputState()</apiname></xref> with return
+value          <xref href="GUID-6CA4F1ED-7947-3087-B618-D35858FAA3BC.dita"><apiname>KErrNone</apiname></xref>.         </p> <p>          Verify
+that the pin is being used as a binary input. Determine          its electric
+state and set <codeph>aState</codeph> to the appropriate value of        
+ <xref href="GUID-7C1D78B4-9897-3C38-8EE7-7C311B885B0B.dita"><apiname>TGpioState</apiname></xref>.         </p> </li>
+</ul></section>
+</conbody></concept>
\ No newline at end of file