Skip to main content

Class FtdiExpander.SpiBus

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

Derived:
Meadow.Foundation.ICs.IOExpanders.FtdiExpander.Ft232hSpiBus

Implements:
Meadow.Hardware.ISpiBus

Properties

SupportedSpeeds

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

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

Configuration

Gets the current SPI clock configuration.

View Source
Declaration
public abstract 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 abstract 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 abstract 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 abstract 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