Package com.diozero.devices
Interface GpioExpander
- All Superinterfaces:
AutoCloseable
,Closeable
public interface GpioExpander extends Closeable
Interface for GPIO expansion boards such as the MCP23xxx family of devices
-
Method Summary
Modifier and Type Method Description void
close()
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.
-
Method Details
-
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
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
RuntimeIOException
-