Board.CreateSpiDevice Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateSpiDevice(SpiConnectionSettings) |
Create an SPI device instance |
CreateSpiDevice(SpiConnectionSettings, Int32[], PinNumberingScheme) |
Create an SPI device instance |
CreateSpiDevice(SpiConnectionSettings)
Create an SPI device instance
public System.Device.Spi.SpiDevice CreateSpiDevice (System.Device.Spi.SpiConnectionSettings connectionSettings);
member this.CreateSpiDevice : System.Device.Spi.SpiConnectionSettings -> System.Device.Spi.SpiDevice
Public Function CreateSpiDevice (connectionSettings As SpiConnectionSettings) As SpiDevice
Parameters
- connectionSettings
- SpiConnectionSettings
Connection parameters (contains SPI CS pin number and bus number)
Returns
An SPI device instance
Remarks
This method can only be used for bus numbers where the corresponding pins are hardwired
Applies to
CreateSpiDevice(SpiConnectionSettings, Int32[], PinNumberingScheme)
Create an SPI device instance
public System.Device.Spi.SpiDevice CreateSpiDevice (System.Device.Spi.SpiConnectionSettings connectionSettings, int[] pinAssignment, System.Device.Gpio.PinNumberingScheme pinNumberingScheme);
member this.CreateSpiDevice : System.Device.Spi.SpiConnectionSettings * int[] * System.Device.Gpio.PinNumberingScheme -> System.Device.Spi.SpiDevice
Public Function CreateSpiDevice (connectionSettings As SpiConnectionSettings, pinAssignment As Integer(), pinNumberingScheme As PinNumberingScheme) As SpiDevice
Parameters
- connectionSettings
- SpiConnectionSettings
Connection parameters (contains bus number and CS pin number)
- pinAssignment
- Int32[]
The set of pins to use for SPI. The parameter can be null if the hardware requires a fixed mapping from pins to SPI for the given bus.
- pinNumberingScheme
- PinNumberingScheme
The numbering scheme in which the pinAssignment
is given
Returns
An SPI device instance