|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IGPIOController
Controller interface of a GPIO controller. This interface should be able to deal with pins of types input, output and a superset that can be switched dynamically from one to the other.
| Method Summary | |
|---|---|
void |
disablePinChangeInterrupts(IInputPin pin)
Stop a pin generating pin change interrupts. |
void |
enablePinChangeInterrupts(IInputPin pin)
Allow the input pin specified to generate pin change interrupts. |
boolean |
getPinDirection(PinDescriptor pidx)
Get the current direction for the specified input/output pin. |
boolean |
getPinValue(PinDescriptor pidx)
Get the current value of the pin, this can be called on both outputs and inputs. |
void |
setPinDirection(PinDescriptor pidx,
boolean output)
Set the mask for the indicated pin to the indicated direction. |
void |
setPinValue(PinDescriptor pidx,
boolean value)
Ask the controller to set the pin value. |
| Method Detail |
|---|
void setPinValue(PinDescriptor pidx,
boolean value)
pidx - pin to set value ofvalue - binary valueboolean getPinValue(PinDescriptor pidx)
pidx - pin to get value of
void setPinDirection(PinDescriptor pidx,
boolean output)
pidx - pin to be modifiedoutput - true if user wants the pin to be an output
IOPinException - attempt to set pin to illegal directionboolean getPinDirection(PinDescriptor pidx)
pidx - pin to be modified
void enablePinChangeInterrupts(IInputPin pin)
synchronized(pin.getIndex()) { pin.getIndex().wait(); }
to wait for it. Enabling a pin change interrupt does not inhibit deep sleep.
Note: only the master isolate actually interacts with the hardware. Any child
isolates send a request to enable interrupts to the master isolate. Upon an
interrupt the master isolate will send a message to the child isolate.
pin - the input pinvoid disablePinChangeInterrupts(IInputPin pin)
pin - the input pin
|
SunSPOT API V4.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||