TristatePort Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Contains members that can be used with input and output pins.

Inheritance Hierarchy

System. . :: . .Object
  Microsoft.SPOT.Hardware. . :: . .NativeEventDispatcher
    Microsoft.SPOT.Hardware. . :: . .Port
      Microsoft.SPOT.Hardware. . :: . .OutputPort
        Microsoft.SPOT.Hardware..::..TristatePort

Namespace:  Microsoft.SPOT.Hardware
Assembly:  Microsoft.SPOT.Hardware (in Microsoft.SPOT.Hardware.dll)

Syntax

'Declaration
Public NotInheritable Class TristatePort _
    Inherits OutputPort
public sealed class TristatePort : OutputPort
public ref class TristatePort sealed : public OutputPort
[<Sealed>]
type TristatePort =  
    class
        inherit OutputPort
    end
public final class TristatePort extends OutputPort

The TristatePort type exposes the following members.

Constructors

  Name Description
Public method TristatePort Initializes a new instance of the TristatePort class.

Top

Properties

  Name Description
Public property Active Gets or sets the current state of a particular tristate port — that is, active or inactive.
Public property GlitchFilter Gets a value that indicates whether the glitch filter is currently enabled.
Public property Id Gets the indentifier (ID) for a port. (Inherited from Port.)
Public property InitialState Gets the initial value for the output port after it is activated. (Inherited from OutputPort.)
Public property Resistor Gets or sets the resistor mode value for the current tristate port. The initial resistor mode value is set in the TristatePort constructor when the port is created.

Top

Methods

  Name Description
Public method DisableInterrupt Disables the interrupt for this NativeEventDispatcher object. (Inherited from NativeEventDispatcher.)
Public method Dispose() () () () Releases resources used by this NativeEventDispatcher object. (Inherited from NativeEventDispatcher.)
Public method EnableInterrupt Enables the interrupt for this NativeEventDispatcher object. (Inherited from NativeEventDispatcher.)
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Read Reads a Boolean value at the port input. (Inherited from Port.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Write Writes a value to the port output. (Inherited from OutputPort.)

Top

Events

  Name Description
Public event OnInterrupt Adds or removes callback methods for native events. (Inherited from NativeEventDispatcher.)

Top

Remarks

The TristatePort class is for use with GPIO pins that can be both input and output pins. It has nothing to do with tristate voltage levels in hardware. A pin is considered "active" when it is an output pin. It is an input pin when it is in the "inactive" state. Your application can use the TristatePort class to control and monitor whether a particular GPIO pin is currently an input pin or an output pin.

Note that tristate ports can share pins with other tristate ports, for both reading and writing.

This class cannot be inherited.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SPOT.Hardware Namespace