Skip to main content

Class Pin

Provides base implementation for IO pins.

Assembly: Meadow.Contracts.dll
View Source
Declaration
public class Pin : IPin, IEquatable<IPin>

Implements:
Meadow.Hardware.IPin, System.IEquatable<Meadow.Hardware.IPin>

Properties

SupportedChannels

Gets a list of IChannelInfo the pin supports

View Source
Declaration
public IList<IChannelInfo>? SupportedChannels { get; protected set; }

Controller

Gets the IPinController associated with the pin

View Source
Declaration
public IPinController? Controller { get; }

Name

Gets the name of the pin

View Source
Declaration
public string Name { get; protected set; }

Key

Identifier that the parent Device can use to identify the I/O (address, port, pin, etc)

View Source
Declaration
public object Key { get; protected set; }

Methods

ToString()

Returns a string that represents the pin

View Source
Declaration
public override string ToString()
Returns

System.String

Equals(IPin)

Indicates whether the specified object is equal to the current object

View Source
Declaration
public virtual bool Equals(IPin other)
Returns

System.Boolean

Parameters
TypeName
Meadow.Hardware.IPinother

Equals(object)

Indicates whether the specified object is equal to the current object

View Source
Declaration
public override bool Equals(object obj)
Returns

System.Boolean

Parameters
TypeName
System.Objectobj

GetHashCode()

Serves as the hash function for a pin object

View Source
Declaration
public override int GetHashCode()
Returns

System.Int32

Implements

Extension Methods

  • Meadow.Hardware.IPin.Meadow.IPinExtensions.CreateAnalogInputPort(System.Int32)
  • Meadow.Hardware.IPin.Meadow.IPinExtensions.CreateAnalogInputPort(System.Int32,System.TimeSpan,Meadow.Units.Voltage)
  • Meadow.IPinExtensions.CreateAnalogOutputPort(Meadow.Hardware.IPin)
  • Meadow.Hardware.IPin.Meadow.IPinExtensions.CreateBiDirectionalPort(System.Boolean,Meadow.Hardware.InterruptMode,Meadow.Hardware.ResistorMode,Meadow.Hardware.PortDirectionType)
  • Meadow.Hardware.IPin.Meadow.IPinExtensions.CreateBiDirectionalPort(System.Boolean,Meadow.Hardware.InterruptMode,Meadow.Hardware.ResistorMode,Meadow.Hardware.PortDirectionType,System.TimeSpan,System.TimeSpan)
  • Meadow.Hardware.IPin.Meadow.IPinExtensions.CreateDigitalInputPort(Meadow.Hardware.ResistorMode)
  • Meadow.Hardware.IPin.Meadow.IPinExtensions.CreateDigitalInterruptPort(Meadow.Hardware.InterruptMode,Meadow.Hardware.ResistorMode)
  • Meadow.Hardware.IPin.Meadow.IPinExtensions.CreateDigitalInterruptPort(Meadow.Hardware.InterruptMode,Meadow.Hardware.ResistorMode,System.TimeSpan,System.TimeSpan)
  • Meadow.Hardware.IPin.Meadow.IPinExtensions.CreateDigitalOutputPort(System.Boolean)
  • Meadow.Hardware.IPin.Meadow.IPinExtensions.CreatePwmPort(Meadow.Units.Frequency,System.Single,System.Boolean)
  • Meadow.Hardware.IPin.Meadow.IPinExtensions.Supports``1
  • Meadow.Hardware.IPin.Meadow.IPinExtensions.Supports``1(System.Func{{TChannel},System.Boolean})