Package com.diozero.devices.mcp23xxx
Class MCP23x08
- java.lang.Object
-
- com.diozero.internal.spi.AbstractDeviceFactory
-
- com.diozero.devices.mcp23xxx.MCP23xxx
-
- com.diozero.devices.mcp23xxx.MCP23x08
-
- All Implemented Interfaces:
DeviceInterface
,DeviceEventConsumer<DigitalInputEvent>
,GpioExpander
,DeviceFactoryInterface
,GpioDeviceFactoryInterface
,PwmOutputDeviceFactoryInterface
,AutoCloseable
,Consumer<DigitalInputEvent>
- Direct Known Subclasses:
MCP23008
public abstract class MCP23x08 extends MCP23xxx
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MCP23x08.MCP23x08BoardPinInfo
-
Field Summary
-
Fields inherited from class com.diozero.devices.mcp23xxx.MCP23xxx
INTERRUPT_GPIO_NOT_SET
-
Fields inherited from class com.diozero.internal.spi.AbstractDeviceFactory
closed, deviceStates
-
Fields inherited from interface com.diozero.devices.GpioExpander
ALL_INPUT, ALL_OUTPUT, GPIOS_PER_PORT
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BoardPinInfo
getBoardPinInfo()
Get information about pins that can be provisioned by this device factory.protected int
getDefValReg(int port)
protected int
getGPIntEnReg(int port)
protected int
getGPIOReg(int port)
protected int
getGPPullUpReg(int port)
protected int
getIntCapReg(int port)
protected int
getIntConReg(int port)
protected int
getIntFReg(int port)
protected int
getIOConReg(int port)
protected int
getIODirReg(int port)
protected int
getIPolReg(int port)
protected int
getOLatReg(int port)
-
Methods inherited from class com.diozero.devices.mcp23xxx.MCP23xxx
accept, close, closeGpio, createDigitalInputDevice, createDigitalInputOutputDevice, createDigitalOutputDevice, createPwmOutputDevice, getBoardPwmFrequency, getName, getValue, getValues, initialise, readByte, setBoardPwmFrequency, setDirections, setInputMode, setOutputMode, setValue, setValues, writeByte
-
Methods inherited from class com.diozero.internal.spi.AbstractDeviceFactory
createI2CKey, createPinKey, createPwmPinKey, createSerialKey, createServoPinKey, createSpiKey, deviceClosed, deviceOpened, getDevice, isClosed, isDeviceOpened, reopen
-
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.spi.DeviceFactoryInterface
createI2CKey, createPinKey, createPwmPinKey, createSerialKey, createServoPinKey, createSpiKey, deviceClosed, deviceOpened, getDevice, isClosed, isDeviceOpened, reopen, start
-
Methods inherited from interface com.diozero.internal.spi.GpioDeviceFactoryInterface
provisionDigitalInputDevice, provisionDigitalInputOutputDevice, provisionDigitalOutputDevice
-
Methods inherited from interface com.diozero.internal.spi.PwmOutputDeviceFactoryInterface
provisionPwmOutputDevice
-
-
-
-
Method Detail
-
getIODirReg
protected int getIODirReg(int port)
- Specified by:
getIODirReg
in classMCP23xxx
-
getIPolReg
protected int getIPolReg(int port)
- Specified by:
getIPolReg
in classMCP23xxx
-
getGPIntEnReg
protected int getGPIntEnReg(int port)
- Specified by:
getGPIntEnReg
in classMCP23xxx
-
getDefValReg
protected int getDefValReg(int port)
- Specified by:
getDefValReg
in classMCP23xxx
-
getIntConReg
protected int getIntConReg(int port)
- Specified by:
getIntConReg
in classMCP23xxx
-
getIOConReg
protected int getIOConReg(int port)
- Specified by:
getIOConReg
in classMCP23xxx
-
getGPPullUpReg
protected int getGPPullUpReg(int port)
- Specified by:
getGPPullUpReg
in classMCP23xxx
-
getIntFReg
protected int getIntFReg(int port)
- Specified by:
getIntFReg
in classMCP23xxx
-
getIntCapReg
protected int getIntCapReg(int port)
- Specified by:
getIntCapReg
in classMCP23xxx
-
getGPIOReg
protected int getGPIOReg(int port)
- Specified by:
getGPIOReg
in classMCP23xxx
-
getOLatReg
protected int getOLatReg(int port)
- Specified by:
getOLatReg
in classMCP23xxx
-
getBoardPinInfo
public BoardPinInfo getBoardPinInfo()
Description copied from interface:DeviceFactoryInterface
Get information about pins that can be provisioned by this device factory.- Returns:
- board pin info instance for this device factory
-
-