Characteristic Locus
Namespace Meadow.Hardware
Assembly Meadow.dll

Syntax

public interface IIODevice

Properties

View Source

Capabilities

Gets the device capabilities.

Declaration
DeviceCapabilities Capabilities { get; }

Property Value

Type Description
DeviceCapabilities

Methods

View Source

CreateAnalogInputPort(IPin, Single)

Declaration
IAnalogInputPort CreateAnalogInputPort(IPin pin, float voltageReference = 3.3F)

Parameters

Type Name Description
IPin pin
System.Single voltageReference

Returns

Type Description
IAnalogInputPort
View Source

CreateBiDirectionalPort(IPin, Boolean, Boolean, InterruptMode, ResistorMode, PortDirectionType)

Declaration
IBiDirectionalPort CreateBiDirectionalPort(IPin pin, bool initialState = false, bool glitchFilter = false, InterruptMode interruptMode = InterruptMode.None, ResistorMode resistorMode = ResistorMode.Disabled, PortDirectionType initialDirection = PortDirectionType.Input)

Parameters

Type Name Description
IPin pin
System.Boolean initialState
System.Boolean glitchFilter
InterruptMode interruptMode
ResistorMode resistorMode
PortDirectionType initialDirection

Returns

Type Description
IBiDirectionalPort
View Source

CreateDigitalInputPort(IPin, InterruptMode, ResistorMode, Int32, Int32)

Declaration
IDigitalInputPort CreateDigitalInputPort(IPin pin, InterruptMode interruptMode = InterruptMode.None, ResistorMode resistorMode = ResistorMode.Disabled, int debounceDuration = 0, int glitchFilterCycleCount = 0)

Parameters

Type Name Description
IPin pin
InterruptMode interruptMode
ResistorMode resistorMode
System.Int32 debounceDuration
System.Int32 glitchFilterCycleCount

Returns

Type Description
IDigitalInputPort
View Source

CreateDigitalOutputPort(IPin, Boolean)

Declaration
IDigitalOutputPort CreateDigitalOutputPort(IPin pin, bool initialState = false)

Parameters

Type Name Description
IPin pin
System.Boolean initialState

Returns

Type Description
IDigitalOutputPort
View Source

CreateI2cBus(IPin, IPin, UInt16)

Declaration
II2cBus CreateI2cBus(IPin clock, IPin data, ushort speed = 100)

Parameters

Type Name Description
IPin clock
IPin data
System.UInt16 speed

Returns

Type Description
II2cBus
View Source

CreateI2cBus(IPin[], UInt16)

Declaration
II2cBus CreateI2cBus(IPin[] pins, ushort speed = 100)

Parameters

Type Name Description
IPin[] pins
System.UInt16 speed

Returns

Type Description
II2cBus
View Source

CreatePwmPort(IPin, Single, Single, Boolean)

Declaration
IPwmPort CreatePwmPort(IPin pin, float frequency = 100F, float dutyCycle = 0.5F, bool invert = false)

Parameters

Type Name Description
IPin pin
System.Single frequency
System.Single dutyCycle
System.Boolean invert

Returns

Type Description
IPwmPort
View Source

CreateSerialPort(SerialPortName, Int32, Int32, Parity, StopBits, Int32)

Declaration
ISerialPort CreateSerialPort(SerialPortName portName, int baudRate, int dataBits = 8, Parity parity = Parity.None, StopBits stopBits = StopBits.One, int readBufferSize = 4096)

Parameters

Type Name Description
SerialPortName portName
System.Int32 baudRate
System.Int32 dataBits
Parity parity
StopBits stopBits
System.Int32 readBufferSize

Returns

Type Description
ISerialPort
View Source

CreateSpiBus(IPin, IPin, IPin, Int64)

Declaration
ISpiBus CreateSpiBus(IPin clock, IPin mosi, IPin miso, long speed)

Parameters

Type Name Description
IPin clock
IPin mosi
IPin miso
System.Int64 speed

Returns

Type Description
ISpiBus
View Source

CreateSpiBus(IPin[], Int64)

Declaration
ISpiBus CreateSpiBus(IPin[] pins, long speed)

Parameters

Type Name Description
IPin[] pins
System.Int64 speed

Returns

Type Description
ISpiBus