|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.spot.sensorboard.io.InputPin
public class InputPin
Accessor object for input only GPIO pins.
Constructor Summary | |
---|---|
InputPin(PinDescriptor idx,
IGPIOController cntrl)
|
Method Summary | |
---|---|
void |
addIInputPinListener(IInputPinListener who)
Adds the specified input pin listener to receive callbacks from this input pin. |
IInputPinListener[] |
getIInputPinListeners()
Returns an array of all the input pin listeners registered on this input pin. |
PinDescriptor |
getIndex()
Return the PinDescriptor associated with this input pin. |
boolean |
isHigh()
Return true if the input bit is high. |
boolean |
isLow()
Return true if the input bit is low. |
void |
notifyIInputPinListeners(boolean nowHigh)
Called by pin's IGPIOController when pin state changes. |
void |
removeIInputPinListener(IInputPinListener who)
Removes the specified input pin listener so that it no longer receives callbacks from this input pin. |
void |
waitForChange()
Block the current thread until the pin's state changes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InputPin(PinDescriptor idx, IGPIOController cntrl)
Method Detail |
---|
public boolean isLow()
isLow
in interface IInputPin
public boolean isHigh()
isHigh
in interface IInputPin
public void waitForChange()
waitForChange
in interface IInputPin
public PinDescriptor getIndex()
getIndex
in interface IInputPin
public void addIInputPinListener(IInputPinListener who)
addIInputPinListener
in interface IInputPin
who
- the input pin listener to add.public void removeIInputPinListener(IInputPinListener who)
removeIInputPinListener
in interface IInputPin
who
- the input pin listener to remove.public IInputPinListener[] getIInputPinListeners()
getIInputPinListeners
in interface IInputPin
public void notifyIInputPinListeners(boolean nowHigh)
nowHigh
- true if pin is currently set to high state.
|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |