ConnectSpi() public static method

Connects to an SPI device if it exists.
public static ConnectSpi ( int controllerIndex, int chipSelectLine, int frequency, int bits, SpiMode mode, SpiSharingMode sharingMode = SpiSharingMode.Exclusive ) : Windows.Devices.Spi.SpiDevice
controllerIndex int Controller index.
chipSelectLine int Slave Chip Select Line.
frequency int Frequency in Hz.
bits int Data length in bits.
mode SpiMode Communication mode, i.e. clock polarity.
sharingMode SpiSharingMode Sharing mode.
return Windows.Devices.Spi.SpiDevice
 public NavioMotionDevice()
     : base(NavioHardwareProvider.ConnectSpi(SpiControllerIndex, ChipSelect, Frequency, DataLength, SpiMode.Mode3))
 {
 }
 public NavioPositionDevice()
     : base(NavioHardwareProvider.ConnectSpi(SpiControllerIndex, ChipSelect, Frequency, DataLength, SpiMode.Mode0))
 {
     // Initialize message received handler
     Reader.MessageReceived += OnMessageReceived;
 }