public class GpioHandle extends Object implements AutoCloseable
Each line driven by a handle is referred to by its index, as specified in the request, rather than by its number.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this GPIO handle and releases resources.
|
void |
read(GpioBuffer buffer)
Reads the current state of the lines this handle controls and writes it back to the given
buffer.
|
void |
write(GpioBuffer buffer)
Writes the new state of the lines this handle controls using the given buffer.
|
public void read(GpioBuffer buffer) throws LinuxException
buffer - Buffer meant to store the data.LinuxException - When something fails on the native side.public void write(GpioBuffer buffer) throws LinuxException
Obviously, this methods does not do much for inputs.
buffer - Buffer holding the new state of the lines.LinuxException - When something fails on the native side.public void close()
throws LinuxException
close in interface AutoCloseableLinuxException - When something fails on the native side.