Port Class

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

Constitutes the input/output (I/O) port base class for managing General Purpose Input/Output (GPIO) pins, containing the necessary logic to handle read and write requests.

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public Class Port _
    Inherits NativeEventDispatcher
public class Port : NativeEventDispatcher
public ref class Port : public NativeEventDispatcher
type Port =  
    class
        inherit NativeEventDispatcher
    end
public class Port extends NativeEventDispatcher

The Port type exposes the following members.

Constructors

  Name Description
Protected method Port(Cpu. . :: . .Pin, Boolean) Initializes a new instance of the Port class with the specified port identifier and initial state.
Protected method Port(Cpu. . :: . .Pin, Boolean, Port. . :: . .ResistorMode, Port. . :: . .InterruptMode) Initializes a new instance of the Port class with the specified port identifier, glitch filter state, resistor mode, and interrupt mode.
Protected method Port(Cpu. . :: . .Pin, Boolean, Boolean, Port. . :: . .ResistorMode) Initializes a new instance of the Port class with the specified port identifier, initial state, glitch filter state, and resistor mode.

Top

Properties

  Name Description
Public property Id Gets the indentifier (ID) for a port.

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.)
Protected method Dispose(Boolean) Disables the pin for a port and marks it as available for reuse. (Overrides NativeEventDispatcher. . :: . .Dispose(Boolean).)
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.)
Protected method Finalize Performs cleanup operations. (Inherited from NativeEventDispatcher.)
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.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Read Reads a Boolean value at the port input.
Public methodStatic member ReservePin Reserves or releases a specified port pin.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

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

Top

Fields

  Name Description
Protected field m_callbacks The event handler for this NativeEventDispatcher object (a mulitcast combinable delegate). (Inherited from NativeEventDispatcher.)
Protected field m_disposed Set to true if this NativeEventDispatcher object has been disposed, or false if not. (Inherited from NativeEventDispatcher.)
Protected field m_threadSpawn The event handler for this NativeEventDispatcher object (a mulitcast combinable delegate). (Inherited from NativeEventDispatcher.)

Top

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