diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-DA8526FB-5789-4CB6-9A92-754E39C52E3B.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-DA8526FB-5789-4CB6-9A92-754E39C52E3B.dita Tue Mar 30 11:56:28 2010 +0100 @@ -0,0 +1,110 @@ + + + + + +Pin +Direction FunctionsDescribes the pin direction functions involved in implementing +the Symbian platform GPIO class. +

Pins are used as inputs or outputs of binary signals. The Symbian platform +GPIO class does not support bidirectional pins. However, some platforms allow +pins to be in a quiescent state (also called floating or tri-stated). In this +case a pin can be in one of three logical states namely, True, False or quiescent +as specified in the enumeration TGpioDirection. The relevant +three-valued logic is specified in this table.

+ + + + +

Input

+

Output

+
+ + + +

A

+

B

+

C

+
+ +

0

+

0

+

Z

+
+ +

1

+

0

+

Z

+
+ +

0

+

1

+

0

+
+ +

1

+

1

+

1

+
+ + +
+
Implement the +pin direction functions
    +
  • Implement SetPinDirection() for each value + of the enumeration TGpioDirection.

      +
    • Implement SetPinDirection() with + aDirection == EInput and return +value KErrNone.

      + Set the pin to behave as an input binary signal.

    • +
    • Implement SetPinDirection() with + aDirection == EOutput and return +value KErrNone.

      + Set the pin to behave as an output binary signal.

    • +
    • Implement SetPinDirection() with + aDirection == ETriStated and +return value KErrNone.

      + Set the pin to be in a quiescent state (also called floating or + deactivated).

      Only implement this +if the platform supports the quiescent state. The physical state +of the pin will be determined by the drive on the line. +

    • +
    • Implement SetPinDirection() with return + value KErrNotSupported.

      + Return KErrNotSupported if the pin cannot + operate in the direction specified, for instance if ETriStated has +been passed and the platform does not support the quiescent state. +

    • +
  • +
  • Implement GetPinDirection() for each value + of the enumeration TGpioDirection.

      +
    • Implement GetPinDirection() with + aDirection containing EInput and +return value KErrNone.

      + Verify that the pin is behaving as a binary input signal. Set + aDirection to EInput +

    • +
    • Implement GetPinDirection() with + aDirection containing EOutput and +return value KErrNone.

      + Verify that the pin is behaving as a binary output signal. Set + aDirection to EInput +

    • +
    • Implement GetPinDirection() with + aDirection containing ETriStated and +return value KErrNone.

      + Verify that the pin is in the quiescent state. Set aDirection to ETriStated +

    • +
    • Implement GetPinDirection() with return + value KErrNotSupported.

      + Return KErrNotSupported if reading the pin + direction is not supported.

    • +
  • +
+
\ No newline at end of file