Interface ISpiController
Contract for devices who expose ISpiBus(es)
.
Assembly: Meadow.Contracts.dll
View Source
Declaration
public interface ISpiController : IDigitalOutputController, IPinController
Fields
DefaultSpiBusSpeed
The default SPI Bus speed, in kHz, used when speed parameters are not provided
View Source
Declaration
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
Declaration
ISpiBus CreateSpiBus(IPin clock, IPin copi, IPin cipo, SpiClockConfiguration config)
Returns
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | clock | The IPin instance to use as the bus clock |
Meadow.Hardware.IPin | ||
Meadow.Hardware.IPin | ||
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
Declaration
ISpiBus CreateSpiBus(IPin clock, IPin copi, IPin cipo, Frequency speed)
Returns
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | clock | The IPin instance to use as the bus clock |
Meadow.Hardware.IPin | ||
Meadow.Hardware.IPin | ||
Meadow.Units.Frequency | speed | The bus speed |
CreateSpiBus(int, Frequency)
Creates a SPI bus instance for the requested bus number and bus speed
View Source
Declaration
ISpiBus CreateSpiBus(int busNumber, Frequency speed)
Returns
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | busNumber | The bus number |
Meadow.Units.Frequency | speed | The bus speed |