Skip to main content

Class Ft232h

Represents a DS3502 digital potentiometer

Assembly: Ft232h.dll
View Source
public class Ft232h : IDisposable, IDigitalInputOutputController, IDigitalInputController, ISpiController, IDigitalOutputController, II2cController, IPinController

Implements:
System.IDisposable, Meadow.Hardware.IDigitalInputOutputController, Meadow.Hardware.IDigitalInputController, Meadow.Hardware.ISpiController, Meadow.Hardware.IDigitalOutputController, Meadow.Hardware.II2cController, Meadow.Hardware.IPinController

Properties

Pins

The pins

View Source
public Ft232h.PinDefinitions Pins { get; }

DefaultClockConfiguration

View Source
public static SpiClockConfiguration DefaultClockConfiguration { get; }

Methods

CreateI2cBus(int)

View Source
public II2cBus CreateI2cBus(int busNumber = 0)
Returns

Meadow.Hardware.II2cBus

Parameters
TypeName
System.Int32busNumber

CreateI2cBus(int, I2cBusSpeed)

Creates an I2C bus instance for the default pins and the requested bus speed

View Source
public II2cBus CreateI2cBus(int busNumber, I2cBusSpeed busSpeed)
Returns

Meadow.Hardware.II2cBus: An instance of an I2cBus

Parameters
TypeNameDescription
System.Int32busNumberThe bus number
Meadow.Hardware.I2cBusSpeedbusSpeedThe bus speed

CreateI2cBus(IPin[], I2cBusSpeed)

Creates an I2C bus instance for the requested pins and bus speed

View Source
public II2cBus CreateI2cBus(IPin[] pins, I2cBusSpeed busSpeed)
Returns

Meadow.Hardware.II2cBus: An instance of an I2cBus

Parameters
TypeNameDescription
Meadow.Hardware.IPin[]pinsAn array of two pins holding the I2C clock and data pins
Meadow.Hardware.I2cBusSpeedbusSpeedThe bus speed

CreateI2cBus(IPin, IPin, I2cBusSpeed)

Creates an I2C bus instance for the requested pins and bus speed

View Source
public II2cBus CreateI2cBus(IPin clock, IPin data, I2cBusSpeed busSpeed)
Returns

Meadow.Hardware.II2cBus: An instance of an I2cBus

Parameters
TypeNameDescription
Meadow.Hardware.IPinclockThe I2C clock pin
Meadow.Hardware.IPindataThe I2C data pin
Meadow.Hardware.I2cBusSpeedbusSpeedThe bus speed

CreateSpiBus()

View Source
public ISpiBus CreateSpiBus()
Returns

Meadow.Hardware.ISpiBus

CreateSpiBus(IPin, IPin, IPin, SpiClockConfiguration)

Creates a SPI bus instance for the requested control pins and clock configuration

View Source
public ISpiBus CreateSpiBus(IPin clock, IPin mosi, IPin miso, SpiClockConfiguration config)
Returns

Meadow.Hardware.ISpiBus: An instance of an Meadow.Hardware.ISpiBus

Parameters
TypeNameDescription
Meadow.Hardware.IPinclockThe IPin instance to use as the bus clock
Meadow.Hardware.IPinmosi
Meadow.Hardware.IPinmiso
Meadow.Hardware.SpiClockConfigurationconfigThe bus clock configuration parameters

CreateSpiBus(IPin, IPin, IPin, Frequency)

Creates a SPI bus instance for the requested control pins and bus speed

View Source
public ISpiBus CreateSpiBus(IPin clock, IPin mosi, IPin miso, Frequency speed)
Returns

Meadow.Hardware.ISpiBus: An instance of an Meadow.Hardware.ISpiBus

Parameters
TypeNameDescription
Meadow.Hardware.IPinclockThe IPin instance to use as the bus clock
Meadow.Hardware.IPinmosi
Meadow.Hardware.IPinmiso
Meadow.Units.FrequencyspeedThe bus speed

CreateSpiBus(int, SpiClockConfiguration)

View Source
public ISpiBus CreateSpiBus(int busNumber, SpiClockConfiguration config)
Returns

Meadow.Hardware.ISpiBus

Parameters
TypeName
System.Int32busNumber
Meadow.Hardware.SpiClockConfigurationconfig

CreateDigitalInputPort(IPin)

Creates an IDigitalInputPort on the specified pin with Disabled resistor mode

View Source
public IDigitalInputPort CreateDigitalInputPort(IPin pin)
Returns

Meadow.Hardware.IDigitalInputPort

Parameters
TypeNameDescription
Meadow.Hardware.IPinpinThe pin on which to create the port.

CreateDigitalInputPort(IPin, ResistorMode)

Creates an IDigitalInputPort on the specified pin.

View Source
public IDigitalInputPort CreateDigitalInputPort(IPin pin, ResistorMode resistorMode)
Returns

Meadow.Hardware.IDigitalInputPort

Parameters
TypeNameDescription
Meadow.Hardware.IPinpinThe pin on which to create the port.
Meadow.Hardware.ResistorModeresistorModeThe ResistorMode specifying whether an
        external pull-up/pull-down resistor is used, or an internal pull-up/pull-down
        resistor should be configured for default state. |

CreateDigitalOutputPort(IPin, bool, OutputType)

Creates an IDigitalOutputPort on the specified pin.

View Source
public IDigitalOutputPort CreateDigitalOutputPort(IPin pin, bool initialState = false, OutputType initialOutputType = OutputType.PushPull)
Returns

Meadow.Hardware.IDigitalOutputPort

Parameters
TypeNameDescription
Meadow.Hardware.IPinpinThe pin on which to create the port.
System.BooleaninitialStateThe default initial state of the port,
either LOW (false), or HIGH (true).
Meadow.Hardware.OutputTypeinitialOutputTypeWhether the port is initially configured
as PushPull or OpenDrain. PushPull by default.

Dispose(bool)

View Source
protected virtual void Dispose(bool disposing)
Parameters
TypeName
System.Booleandisposing

~Ft232h()

Finalizer for the Ft232h class, used to release unmanaged resources.

View Source
protected ~Ft232h()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source
public void Dispose()

Implements

  • System.IDisposable
  • Meadow.Hardware.IDigitalInputOutputController
  • Meadow.Hardware.IDigitalInputController
  • Meadow.Hardware.ISpiController
  • Meadow.Hardware.IDigitalOutputController
  • Meadow.Hardware.II2cController
  • Meadow.Hardware.IPinController