共用方式為


Mcp23s17 建構函式

定義

多載

Mcp23s17(SpiDevice, Int32, Int32, Int32, Int32, GpioController)
Mcp23s17(SpiDevice, Int32, Int32, Int32, Int32, GpioController, Boolean)

初始化 Mcp23s17 裝置的新實例。

Mcp23s17(SpiDevice, Int32, Int32, Int32, Int32, GpioController)

public Mcp23s17 (System.Device.Spi.SpiDevice spiDevice, int deviceAddress, int reset = -1, int interruptA = -1, int interruptB = -1, System.Device.Gpio.GpioController masterController = default);
new Iot.Device.Mcp23xxx.Mcp23s17 : System.Device.Spi.SpiDevice * int * int * int * int * System.Device.Gpio.GpioController -> Iot.Device.Mcp23xxx.Mcp23s17
Public Sub New (spiDevice As SpiDevice, deviceAddress As Integer, Optional reset As Integer = -1, Optional interruptA As Integer = -1, Optional interruptB As Integer = -1, Optional masterController As GpioController = Nothing)

參數

spiDevice
SpiDevice
deviceAddress
Int32
reset
Int32
interruptA
Int32
interruptB
Int32
masterController
GpioController

適用於

Mcp23s17(SpiDevice, Int32, Int32, Int32, Int32, GpioController, Boolean)

初始化 Mcp23s17 裝置的新實例。

public Mcp23s17 (System.Device.Spi.SpiDevice spiDevice, int deviceAddress, int reset = -1, int interruptA = -1, int interruptB = -1, System.Device.Gpio.GpioController? controller = default, bool shouldDispose = true);
new Iot.Device.Mcp23xxx.Mcp23s17 : System.Device.Spi.SpiDevice * int * int * int * int * System.Device.Gpio.GpioController * bool -> Iot.Device.Mcp23xxx.Mcp23s17
Public Sub New (spiDevice As SpiDevice, deviceAddress As Integer, Optional reset As Integer = -1, Optional interruptA As Integer = -1, Optional interruptB As Integer = -1, Optional controller As GpioController = Nothing, Optional shouldDispose As Boolean = true)

參數

spiDevice
SpiDevice

用於通訊的 SPI 裝置。

deviceAddress
Int32

SPI 匯流排上連線的裝置位址。

reset
Int32

如果有的話,連接到硬體重設的輸出針腳編號。 如果指定,裝置將會處於停用狀態。

interruptA
Int32

如果有任何,則連接到埠 A 中斷的輸入針腳編號 (INTA) 。

interruptB
Int32

如果有任何,則為連線到埠 B 中斷的輸入針腳編號, (INTB) 。

controller
GpioController

重設和中斷針腳的控制器。 如果未指定,則會使用預設控制器。

shouldDispose
Boolean

True 是表示 處置 Gpio 控制器

適用於