Package com.diozero.devices
Class MCP23008
- All Implemented Interfaces:
GpioExpander
,InputEventListener<DigitalInputEvent>
,DeviceFactoryInterface
,GpioDeviceFactoryInterface
,PwmOutputDeviceFactoryInterface
,Closeable
,AutoCloseable
public class MCP23008 extends MCP23x08
-
Nested Class Summary
Nested classes/interfaces inherited from class com.diozero.internal.provider.mcp23xxx.MCP23x08
MCP23x08.MCP23x08BoardPinInfo
-
Field Summary
Fields inherited from class com.diozero.internal.provider.mcp23xxx.MCP23xxx
INTERRUPT_GPIO_NOT_SET
Fields inherited from class com.diozero.internal.provider.AbstractDeviceFactory
closed, deviceStates
-
Constructor Summary
-
Method Summary
Methods inherited from class com.diozero.internal.provider.mcp23xxx.MCP23x08
getBoardPinInfo, getDefValReg, getGPIntEnReg, getGPIOReg, getGPPullUpReg, getIntCapReg, getIntConReg, getIntFReg, getIOConReg, getIODirReg, getIPolReg, getOLatReg
Methods inherited from class com.diozero.internal.provider.mcp23xxx.MCP23xxx
closeGpio, createDigitalInputDevice, createDigitalInputOutputDevice, createDigitalOutputDevice, createPwmOutputDevice, getBoardPwmFrequency, getName, getValue, getValues, initialise, setBoardPwmFrequency, setDirections, setInputMode, setOutputMode, setValue, setValues, valueChanged
Methods inherited from class com.diozero.internal.provider.AbstractDeviceFactory
createI2CKey, createPinKey, createSerialKey, createSpiKey, deviceClosed, deviceOpened, getDevice, getDevice, isClosed, isDeviceOpened
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.diozero.internal.provider.DeviceFactoryInterface
createI2CKey, createPinKey, createSerialKey, createSpiKey, deviceClosed, deviceOpened, getDevice, getDevice, isClosed, isDeviceOpened, start
Methods inherited from interface com.diozero.internal.provider.GpioDeviceFactoryInterface
provisionDigitalInputDevice, provisionDigitalInputOutputDevice, provisionDigitalOutputDevice
Methods inherited from interface com.diozero.internal.provider.PwmOutputDeviceFactoryInterface
provisionPwmOutputDevice
-
Constructor Details
-
MCP23008
- Throws:
RuntimeIOException
-
MCP23008
- Throws:
RuntimeIOException
-
MCP23008
- Throws:
RuntimeIOException
-
MCP23008
- Throws:
RuntimeIOException
-
MCP23008
public MCP23008(int controller, int address, int interruptGpioA, int interruptGpioB) throws RuntimeIOException- Throws:
RuntimeIOException
-
-
Method Details
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceDeviceFactoryInterface
- Specified by:
close
in interfaceGpioExpander
- Overrides:
close
in classMCP23xxx
- Throws:
RuntimeIOException
-
readByte
protected byte readByte(int register) -
writeByte
protected void writeByte(int register, byte value)
-