共用方式為


Mcp23018 建構函式

定義

多載

Mcp23018(I2cDevice, Int32, Int32, Int32, GpioController)
Mcp23018(I2cDevice, Int32, Int32, Int32, GpioController, Boolean)

初始化 Mcp23018 裝置的新實例。

Mcp23018(I2cDevice, Int32, Int32, Int32, GpioController)

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

參數

i2cDevice
I2cDevice
reset
Int32
interruptA
Int32
interruptB
Int32
masterController
GpioController

適用於

Mcp23018(I2cDevice, Int32, Int32, Int32, GpioController, Boolean)

初始化 Mcp23018 裝置的新實例。

public Mcp23018 (System.Device.I2c.I2cDevice i2cDevice, int reset = -1, int interruptA = -1, int interruptB = -1, System.Device.Gpio.GpioController? controller = default, bool shouldDispose = true);
new Iot.Device.Mcp23xxx.Mcp23018 : System.Device.I2c.I2cDevice * int * int * int * System.Device.Gpio.GpioController * bool -> Iot.Device.Mcp23xxx.Mcp23018
Public Sub New (i2cDevice As I2cDevice, 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)

參數

i2cDevice
I2cDevice

用於通訊的 I2C 裝置。

reset
Int32

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

interruptA
Int32

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

interruptB
Int32

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

controller
GpioController

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

shouldDispose
Boolean

True 是表示 處置 Gpio 控制器

適用於