Documentation ¶
Overview ¶
Package mcp23xxx controls a Microchip MCP23xxx series I/O Expander over I²C or SPI.
Datasheets for supported devices ¶
MCP23008 / MCP23S08 :
http://ww1.microchip.com/downloads/en/DeviceDoc/MCP23008-MCP23S08-Data-Sheet-20001919F.pdf
MCP23009 / MCP23S09 :
http://ww1.microchip.com/downloads/en/DeviceDoc/20002121C.pdf
MCP23017 / MCP23S17 :
http://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf
MCP23018 / MCP23S18 :
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type INTPinFunc ¶
type INTPinFunc int
INTPinFunc represents the configuration of INT pin. Refer to datasheet for possible modes.
const ( // Active driver, active-low (default). INTActiveLow INTPinFunc = iota // Active driver, active-high. INTActiveHigh // Open-drain. INTOpenDrain )
Possible INT pin configurations.
type Opts ¶
type Opts struct { // Chip model. Model string // Hardware address (refer to datasheet). HWAddr uint8 // Interface configuration function. IFCfg // GPIO pin for capturing interrupts. If given, it must be already configured. IRQPin gpio.PinIn // INT pin configuration. INTPinFunc }
Opts holds the configuration options for the device.
Click to show internal directories.
Click to hide internal directories.