共用方式為


Mcp23s18 建構函式

定義

多載

Mcp23s18(SpiDevice, Int32, Int32, Int32, GpioController)
Mcp23s18(SpiDevice, Int32, Int32, Int32, GpioController, Boolean)

初始化 Mcp23s18 裝置的新實例。

Mcp23s18(SpiDevice, Int32, Int32, Int32, GpioController)

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

參數

spiDevice
SpiDevice
reset
Int32
interruptA
Int32
interruptB
Int32
masterController
GpioController

適用於

Mcp23s18(SpiDevice, Int32, Int32, Int32, GpioController, Boolean)

初始化 Mcp23s18 裝置的新實例。

public Mcp23s18 (System.Device.Spi.SpiDevice spiDevice, int reset = -1, int interruptA = -1, int interruptB = -1, System.Device.Gpio.GpioController? controller = default, bool shouldDispose = true);
new Iot.Device.Mcp23xxx.Mcp23s18 : System.Device.Spi.SpiDevice * int * int * int * System.Device.Gpio.GpioController * bool -> Iot.Device.Mcp23xxx.Mcp23s18
Public Sub New (spiDevice As SpiDevice, 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 裝置。

reset
Int32

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

interruptA
Int32

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

interruptB
Int32

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

controller
GpioController

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

shouldDispose
Boolean

True 表示處置 Gpio 控制器

適用於