共用方式為


Mcp23008 建構函式

定義

多載

Mcp23008(I2cDevice, Int32, Int32, GpioController)
Mcp23008(I2cDevice, Int32, Int32, GpioController, Boolean)

初始化 Mcp23008 裝置的新實例。

Mcp23008(I2cDevice, Int32, Int32, GpioController)

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

參數

i2cDevice
I2cDevice
reset
Int32
interrupt
Int32
masterController
GpioController

適用於

Mcp23008(I2cDevice, Int32, Int32, GpioController, Boolean)

初始化 Mcp23008 裝置的新實例。

public Mcp23008 (System.Device.I2c.I2cDevice i2cDevice, int reset = -1, int interrupt = -1, System.Device.Gpio.GpioController? controller = default, bool shouldDispose = true);
new Iot.Device.Mcp23xxx.Mcp23008 : System.Device.I2c.I2cDevice * int * int * System.Device.Gpio.GpioController * bool -> Iot.Device.Mcp23xxx.Mcp23008
Public Sub New (i2cDevice As I2cDevice, Optional reset As Integer = -1, Optional interrupt As Integer = -1, Optional controller As GpioController = Nothing, Optional shouldDispose As Boolean = true)

參數

i2cDevice
I2cDevice

用於通訊的 I2C 裝置。

reset
Int32

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

interrupt
Int32

如果有的話,連接到中斷的輸入針腳編號。

controller
GpioController

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

shouldDispose
Boolean

True 是表示 處置 Gpio 控制器

適用於