Package com.diozero.devices
Interface GpioExpander
-
- All Superinterfaces:
AutoCloseable
,DeviceInterface
- All Known Implementing Classes:
MCP23008
,MCP23017
,MCP23S17
,MCP23x08
,MCP23x17
,MCP23xxx
,OutputShiftRegister
,PCF8574
public interface GpioExpander extends DeviceInterface
Interface for GPIO expansion boards such as the MCP23xxx family of devices
-
-
Field Summary
Fields Modifier and Type Field Description static byte
ALL_INPUT
static byte
ALL_OUTPUT
static int
GPIOS_PER_PORT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
setDirections(int port, byte directions)
Set the directions for all pins on this port using the specified directions bit mask.void
setValues(int port, byte values)
Set the output value for a pins on this port.-
Methods inherited from interface com.diozero.api.DeviceInterface
close
-
-
-
-
Field Detail
-
GPIOS_PER_PORT
static final int GPIOS_PER_PORT
- See Also:
- Constant Field Values
-
ALL_OUTPUT
static final byte ALL_OUTPUT
- See Also:
- Constant Field Values
-
ALL_INPUT
static final byte ALL_INPUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
setDirections
void setDirections(int port, byte directions)
Set the directions for all pins on this port using the specified directions bit mask. 0 = output, 1 = input- Parameters:
port
- the bank of up to 8 GPIOsdirections
- bit mask specifying the directions for up to 8 GPIOs. 0 = output, 1 = input
-
setValues
void setValues(int port, byte values)
Set the output value for a pins on this port.- Parameters:
port
- the bank of up to 8 GPIOsvalues
- bit mask specifying on/off values. 1 = on, 0 = off
-
-