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
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | clock | The IPin instance to use as the bus clock |
Meadow.Hardware.IPin | copi | The IPin instance to use for data transmit (controller out/peripheral in) |
Meadow.Hardware.IPin | cipo | The IPin instance to use for data receive (controller in/peripheral out) |
Meadow.Hardware.SpiClockConfiguration | config | The 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
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | clock | The IPin instance to use as the bus clock |
Meadow.Hardware.IPin | copi | The IPin instance to use for data transmit (controller out/peripheral in) |
Meadow.Hardware.IPin | cipo | The IPin instance to use for data receive (controller in/peripheral out) |
Meadow.Units.Frequency | speed | The bus speed |