Skip to main content

Interface ISpiController

Contract for devices who expose ISpiBus(es).

Assembly: Meadow.Contracts.dll
View Source
public interface ISpiController : IDigitalOutputController, IPinController

Fields

DefaultSpiBusSpeed

The default SPI Bus speed, in kHz, used when speed parameters are not provided

View Source
public static Frequency DefaultSpiBusSpeed

Methods

CreateSpiBus(IPin, IPin, IPin, SpiClockConfiguration)

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

View Source
ISpiBus CreateSpiBus(IPin clock, IPin copi, IPin cipo, 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.IPincopiThe IPin instance to use for data transmit (controller out/peripheral in)
Meadow.Hardware.IPincipoThe IPin instance to use for data receive (controller in/peripheral out)
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
ISpiBus CreateSpiBus(IPin clock, IPin copi, IPin cipo, 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.IPincopiThe IPin instance to use for data transmit (controller out/peripheral in)
Meadow.Hardware.IPincipoThe IPin instance to use for data receive (controller in/peripheral out)
Meadow.Units.FrequencyspeedThe bus speed