public static final class GPIODriver.GPIOChannel extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GPIODriver.GPIOChannel.Direction
Enumeration for specifying the direction of a channel
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the channel (to 0)
|
int |
getChannel()
Return the channel number for this channel.
|
GPIODriver.GPIOChannel.Direction |
getDirection()
Get the direction for this channel
|
void |
lock()
Locks this channel for exclusive access.
|
boolean |
read()
Read the current value of the channel
|
void |
set()
Set the channel (to 1)
|
void |
setDirection(GPIODriver.GPIOChannel.Direction dir)
Set the direction for this channel
|
String |
toString() |
void |
unlock()
Unlocks the specified channel.
|
void |
write(boolean value)
Write a new value to this channel
|
public GPIODriver.GPIOChannel.Direction getDirection() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - If the direction cannot be determinedpublic void setDirection(GPIODriver.GPIOChannel.Direction dir) throws org.lsst.ccs.drivers.commons.DriverException
dir - The direction to be set.org.lsst.ccs.drivers.commons.DriverException - If the direction cannot be set.public void set()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - If the channel cannot be setpublic void clear()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic boolean read()
throws org.lsst.ccs.drivers.commons.DriverException
true if the channel is set (value == 1)org.lsst.ccs.drivers.commons.DriverException - If an error occurspublic void write(boolean value)
throws org.lsst.ccs.drivers.commons.DriverException
value - The value to writeorg.lsst.ccs.drivers.commons.DriverException - If an error occurspublic void lock()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - If the lock cannot be obtained.public void unlock()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - If the channel unlock failspublic int getChannel()
Copyright © 2018 LSST. All rights reserved.