|
Sun SPOT API |
||||||||
| 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 | |
|---|---|
IInputPin |
bindInputPin(PinDescriptor pidx)
register an input only pin and return the accessor object for it |
IIOPin |
bindIOPin(PinDescriptor pidx)
register an input/output pin and return the accessor object for it |
IOutputPin |
bindOutputPin(PinDescriptor pidx)
register an output only pin and return the accessor object for it |
boolean |
getPinValue(PinDescriptor pidx)
get the current value of the pin, this can be called on both outputs and inputs, if the pin is not a scalar type the return value will by either 0 or 1 |
void |
setPinDirection(PinDescriptor pidx,
boolean output)
set the pin direction, if output > 0 its set to an output if output == 0 its set to an input. |
void |
setPinValue(PinDescriptor pidx,
boolean value)
Ask the controller to set the pin value. |
| Method Detail |
|---|
IOutputPin bindOutputPin(PinDescriptor pidx)
pidx - pin to access
IInputPin bindInputPin(PinDescriptor pidx)
pidx - pin to access
IIOPin bindIOPin(PinDescriptor pidx)
pidx - pin to access
void setPinValue(PinDescriptor pidx,
boolean value)
pidx - pin to set value ofvalue - binary valueboolean getPinValue(PinDescriptor pidx)
void setPinDirection(PinDescriptor pidx,
boolean output)
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||