SpiConnectionSettings Class
NuGet: GHIElectronics.TinyCLR.Devices.Spi
Assembly: System.Device.Spi
Namespace: System.Device.Spi
Per-device SPI settings in the standard System.Device.Spi shape. TinyCLR maps these onto its native SPI driver via SpiDevice.Create(SpiConnectionSettings).
public sealed class SpiConnectionSettings
Constructors
SpiConnectionSettings(int busId, int chipSelectLine)
public SpiConnectionSettings(int busId, int chipSelectLine)
Creates settings for a device on the given bus and chip-select line.
Properties
BusId
public int BusId { get; }
The bus this device is on (-1 for software SPI).
ChipSelectLine
public int ChipSelectLine { get; set; }
The chip-select line for this device.
ClockFrequency
public int ClockFrequency { get; set; }
The clock speed in Hz. Defaults to 500 kHz.
DataBitLength
public int DataBitLength { get; set; }
Bits per frame. Defaults to 8.
DataFlow
public DataFlow DataFlow { get; set; }
Bit order. Defaults to MSB first.
Mode
public SpiMode Mode { get; set; }
Clock polarity and phase. Defaults to mode 0.