SpiDevice SpiDevice SpiDevice SpiDevice Class

Definition

Represents a device connected through the SPI bus.

public : sealed class SpiDevice : ISpiDevice, IClosablepublic sealed class SpiDevice : ISpiDevice, IDisposablePublic NotInheritable Class SpiDevice Implements ISpiDevice, IDisposable// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)

Properties

ConnectionSettings ConnectionSettings ConnectionSettings ConnectionSettings

Gets the connection settings for the device.

public : SpiConnectionSettings ConnectionSettings { get; }public SpiConnectionSettings ConnectionSettings { get; }Public ReadOnly Property ConnectionSettings As SpiConnectionSettings// You can use this property in JavaScript.
Additional features and requirements
Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)
Capabilities
lowLevelDevices

DeviceId DeviceId DeviceId DeviceId

Gets the unique ID associated with the device.

public : PlatForm::String DeviceId { get; }public string DeviceId { get; }Public ReadOnly Property DeviceId As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The ID.

Additional features and requirements
Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)
Capabilities
lowLevelDevices

Methods

Close() Close() Close() Close()

Closes the connection to the device.

public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.

Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()

FromIdAsync(String, SpiConnectionSettings) FromIdAsync(String, SpiConnectionSettings) FromIdAsync(String, SpiConnectionSettings) FromIdAsync(String, SpiConnectionSettings)

Opens a device with the connection settings provided.

public : static IAsyncOperation<SpiDevice> FromIdAsync(PlatForm::String busId, SpiConnectionSettings settings)public static IAsyncOperation<SpiDevice> FromIdAsync(String busId, SpiConnectionSettings settings)Public Static Function FromIdAsync(busId As String, settings As SpiConnectionSettings) As IAsyncOperation( Of SpiDevice )// You can use this method in JavaScript.
Parameters
busId
PlatForm::String String String String

The id of the bus.

Returns
Additional features and requirements
Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)
Capabilities
lowLevelDevices

GetBusInfo(String) GetBusInfo(String) GetBusInfo(String) GetBusInfo(String)

Retrieves the info about a certain bus.

public : static SpiBusInfo GetBusInfo(PlatForm::String busId)public static SpiBusInfo GetBusInfo(String busId)Public Static Function GetBusInfo(busId As String) As SpiBusInfo// You can use this method in JavaScript.
Parameters
busId
PlatForm::String String String String

The id of the bus.

Returns

The bus info requested.

Additional features and requirements
Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)
Capabilities
lowLevelDevices

GetDeviceSelector() GetDeviceSelector() GetDeviceSelector() GetDeviceSelector()

Gets all the SPI buses found on the system.

public : static PlatForm::String GetDeviceSelector()public static string GetDeviceSelector()Public Static Function GetDeviceSelector() As string// You can use this method in JavaScript.
Returns
PlatForm::String string string string

String containing all the buses found on the system.

See Also

GetDeviceSelector(String) GetDeviceSelector(String) GetDeviceSelector(String) GetDeviceSelector(String)

Gets all the SPI buses found on the system that match the input parameter.

public : static PlatForm::String GetDeviceSelector(PlatForm::String friendlyName)public static string GetDeviceSelector(String friendlyName)Public Static Function GetDeviceSelector(friendlyName As String) As string// You can use this method in JavaScript.
Parameters
friendlyName
PlatForm::String String String String

Input parameter specifying an identifying name for the desired bus. This usually corresponds to a name on the schematic.

Returns
PlatForm::String string string string

String containing all the buses that have the input in the name.

See Also

Read(Byte[]) Read(Byte[]) Read(Byte[]) Read(Byte[])

Reads from the connected device.

public : void Read(Byte[] buffer)public void Read(Byte[] buffer)Public Function Read(buffer As Byte[]) As void// You can use this method in JavaScript.
Parameters
buffer
Byte[] Byte[] Byte[] Byte[]

Array containing data read from the device.

Additional features and requirements
Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)
Capabilities
lowLevelDevices

TransferFullDuplex(Byte[], Byte[]) TransferFullDuplex(Byte[], Byte[]) TransferFullDuplex(Byte[], Byte[]) TransferFullDuplex(Byte[], Byte[])

Transfer data using a full duplex communication system. Full duplex allows both the master and the slave to communicate simultaneously.

public : void TransferFullDuplex(Byte[] writeBuffer, Byte[] readBuffer)public void TransferFullDuplex(Byte[] writeBuffer, Byte[] readBuffer)Public Function TransferFullDuplex(writeBuffer As Byte[], readBuffer As Byte[]) As void// You can use this method in JavaScript.
Parameters
writeBuffer
Byte[] Byte[] Byte[] Byte[]

Array containing data to write to the device.

readBuffer
Byte[] Byte[] Byte[] Byte[]

Array containing data read from the device.

Additional features and requirements
Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)
Capabilities
lowLevelDevices

TransferSequential(Byte[], Byte[]) TransferSequential(Byte[], Byte[]) TransferSequential(Byte[], Byte[]) TransferSequential(Byte[], Byte[])

Transfer data sequentially to the device.

public : void TransferSequential(Byte[] writeBuffer, Byte[] readBuffer)public void TransferSequential(Byte[] writeBuffer, Byte[] readBuffer)Public Function TransferSequential(writeBuffer As Byte[], readBuffer As Byte[]) As void// You can use this method in JavaScript.
Parameters
writeBuffer
Byte[] Byte[] Byte[] Byte[]

Array containing data to write to the device.

readBuffer
Byte[] Byte[] Byte[] Byte[]

Array containing data read from the device.

Additional features and requirements
Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)
Capabilities
lowLevelDevices

Write(Byte[]) Write(Byte[]) Write(Byte[]) Write(Byte[])

Writes to the connected device.

public : void Write(Byte[] buffer)public void Write(Byte[] buffer)Public Function Write(buffer As Byte[]) As void// You can use this method in JavaScript.
Parameters
buffer
Byte[] Byte[] Byte[] Byte[]

Array containing the data to write to the device.

Additional features and requirements
Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)
Capabilities
lowLevelDevices