共用方式為


Mcp23xxx 建構函式

定義

多載

Mcp23xxx(Mcp23xxx+BusAdapter, Int32, Int32, Int32, GpioController, BankStyle)
Mcp23xxx(Mcp23xxx+BusAdapter, Int32, Int32, Int32, GpioController, BankStyle, Boolean)

I2C 或 SPI 應用程式的一般用途平行 I/O 擴充。

Mcp23xxx(Mcp23xxx+BusAdapter, Int32, Int32, Int32, GpioController, BankStyle)

protected Mcp23xxx (Iot.Device.Mcp23xxx.Mcp23xxx.BusAdapter bus, int reset = -1, int interruptA = -1, int interruptB = -1, System.Device.Gpio.GpioController masterController = default, Iot.Device.Mcp23xxx.BankStyle bankStyle = Iot.Device.Mcp23xxx.BankStyle.Sequential);
new Iot.Device.Mcp23xxx.Mcp23xxx : Iot.Device.Mcp23xxx.Mcp23xxx.BusAdapter * int * int * int * System.Device.Gpio.GpioController * Iot.Device.Mcp23xxx.BankStyle -> Iot.Device.Mcp23xxx.Mcp23xxx
Protected Sub New (bus As Mcp23xxx.BusAdapter, Optional reset As Integer = -1, Optional interruptA As Integer = -1, Optional interruptB As Integer = -1, Optional masterController As GpioController = Nothing, Optional bankStyle As BankStyle = Iot.Device.Mcp23xxx.BankStyle.Sequential)

參數

reset
Int32
interruptA
Int32
interruptB
Int32
masterController
GpioController
bankStyle
BankStyle

適用於

Mcp23xxx(Mcp23xxx+BusAdapter, Int32, Int32, Int32, GpioController, BankStyle, Boolean)

I2C 或 SPI 應用程式的一般用途平行 I/O 擴充。

protected Mcp23xxx (Iot.Device.Mcp23xxx.Mcp23xxx.BusAdapter bus, int reset = -1, int interruptA = -1, int interruptB = -1, System.Device.Gpio.GpioController? controller = default, Iot.Device.Mcp23xxx.BankStyle bankStyle = Iot.Device.Mcp23xxx.BankStyle.Sequential, bool shouldDispose = true);
protected Mcp23xxx (Iot.Device.Mcp23xxx.Mcp23xxx.BusAdapter bus, int reset = -1, int interruptA = -1, int interruptB = -1, System.Device.Gpio.GpioController? gpioController = default, Iot.Device.Mcp23xxx.BankStyle bankStyle = Iot.Device.Mcp23xxx.BankStyle.Sequential, bool shouldDispose = true);
new Iot.Device.Mcp23xxx.Mcp23xxx : Iot.Device.Mcp23xxx.Mcp23xxx.BusAdapter * int * int * int * System.Device.Gpio.GpioController * Iot.Device.Mcp23xxx.BankStyle * bool -> Iot.Device.Mcp23xxx.Mcp23xxx
new Iot.Device.Mcp23xxx.Mcp23xxx : Iot.Device.Mcp23xxx.Mcp23xxx.BusAdapter * int * int * int * System.Device.Gpio.GpioController * Iot.Device.Mcp23xxx.BankStyle * bool -> Iot.Device.Mcp23xxx.Mcp23xxx
Protected Sub New (bus As Mcp23xxx.BusAdapter, Optional reset As Integer = -1, Optional interruptA As Integer = -1, Optional interruptB As Integer = -1, Optional controller As GpioController = Nothing, Optional bankStyle As BankStyle = Iot.Device.Mcp23xxx.BankStyle.Sequential, Optional shouldDispose As Boolean = true)
Protected Sub New (bus As Mcp23xxx.BusAdapter, Optional reset As Integer = -1, Optional interruptA As Integer = -1, Optional interruptB As Integer = -1, Optional gpioController As GpioController = Nothing, Optional bankStyle As BankStyle = Iot.Device.Mcp23xxx.BankStyle.Sequential, Optional shouldDispose As Boolean = true)

參數

bus
Mcp23xxx.BusAdapter

裝置所連線的匯流排。

reset
Int32

連接到硬體重設的輸出針腳編號。

interruptA
Int32

連接到埠 A (INTA) 中斷的輸入針腳編號。

interruptB
Int32

連接到埠 B 中斷的輸入針腳編號, (INTB) 。

controllergpioController
GpioController

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

bankStyle
BankStyle

埠目前的銀行樣式。 這不會設定銀行樣式- 它會告訴我們銀行樣式是什麼。 強烈建議不要從預設值變更銀行樣式,因為沒有直接方法來偵測晶片所在的樣式,而且如果晶片未設定為預設值,大部分的應用程式都會失敗。 此設定不會影響 8 位展開器。

shouldDispose
Boolean

True 表示處置 Gpio 控制器

適用於