SunSPOT API V5.0


com.sun.spot.sensorboard.io
Interface IInputPinListener

All Known Implementing Classes:
InvertingInputPin, Switch

public interface IInputPinListener

Implemented by classes wanting a call back when the input pin state changes.

Note: that if pin changes happen too fast some transitions may be missed. At least 3 milliseconds is required between pin changes.

Note: to compare the IInputPin argument passed to your callback with an IIOPin you should use the equals() method, e.g.

 IIOPin dPins = EDemoBoard.getInstance().getIOPins();
 ...
     dPins[0].addIInputPinListener(this);
 
 public void pinSetHigh(IInputPin pin) {
     if (dPins[0].equals(pin)) {
         // handle pin D0 going high...
     }
 }
 


Method Summary
 void pinSetHigh(IInputPin pin)
          Callback for when the input pin state changes from low to high.
 void pinSetLow(IInputPin pin)
          Callback for when the input pin state changes from high to low.
 

Method Detail

pinSetHigh

void pinSetHigh(IInputPin pin)
Callback for when the input pin state changes from low to high.

Parameters:
pin - the pin that has changed state to high.

pinSetLow

void pinSetLow(IInputPin pin)
Callback for when the input pin state changes from high to low.


SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.