Skip to main content

Class FtdiExpander.Ft232hSpiBus

Assembly: Ft2xxx.dll
View Source
Declaration
public class FtdiExpander.Ft232hSpiBus : FtdiExpander.SpiBus, ISpiBus

Inheritance: System.Object -> Meadow.Foundation.ICs.IOExpanders.FtdiExpander.SpiBus

Implements:
Meadow.Hardware.ISpiBus

Properties

SupportedSpeeds

Gets an array of all supported speeds of the SPI bus.

View Source
Declaration
public override Frequency[] SupportedSpeeds { get; }

Configuration

Gets the current SPI clock configuration.

View Source
Declaration
public override SpiClockConfiguration Configuration { get; }

Methods

Exchange(IDigitalOutputPort?, Span<byte>, Span<byte>, ChipSelectMode)

Writes data from the write buffer to a peripheral on the bus while reading return data into the read buffer.

View Source
Declaration
public override void Exchange(IDigitalOutputPort? chipSelect, Span<byte> writeBuffer, Span<byte> readBuffer, ChipSelectMode csMode = ChipSelectMode.ActiveLow)
Parameters
TypeNameDescription
Meadow.Hardware.IDigitalOutputPortchipSelectThe chip select port to activate the peripheral.
System.Span<System.Byte>writeBufferThe buffer containing data to write.
System.Span<System.Byte>readBufferThe buffer to read returning data into.
Meadow.Hardware.ChipSelectModecsModeThe chip select mode that activates the peripheral.

Read(IDigitalOutputPort?, Span<byte>, ChipSelectMode)

Reads data from the SPI bus into the specified buffer.

View Source
Declaration
public override void Read(IDigitalOutputPort? chipSelect, Span<byte> readBuffer, ChipSelectMode csMode = ChipSelectMode.ActiveLow)
Parameters
TypeNameDescription
Meadow.Hardware.IDigitalOutputPortchipSelectThe chip select port to activate the bus.
System.Span<System.Byte>readBufferThe buffer to read data into.
Meadow.Hardware.ChipSelectModecsModeThe chip select mode that activates the peripheral.

Write(IDigitalOutputPort?, Span<byte>, ChipSelectMode)

Writes data to the SPI bus.

View Source
Declaration
public override void Write(IDigitalOutputPort? chipSelect, Span<byte> writeBuffer, ChipSelectMode csMode = ChipSelectMode.ActiveLow)
Parameters
TypeNameDescription
Meadow.Hardware.IDigitalOutputPortchipSelectThe chip select port to activate the peripheral.
System.Span<System.Byte>writeBufferThe buffer containing data to write.
Meadow.Hardware.ChipSelectModecsModeThe chip select mode that activates the peripheral.

Implements

  • Meadow.Hardware.ISpiBus