ioio.lib.api
Enum DigitalInput.Spec.Mode

java.lang.Object
  extended by java.lang.Enum<DigitalInput.Spec.Mode>
      extended by ioio.lib.api.DigitalInput.Spec.Mode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DigitalInput.Spec.Mode>
Enclosing class:
DigitalInput.Spec

public static enum DigitalInput.Spec.Mode
extends java.lang.Enum<DigitalInput.Spec.Mode>

Input pin mode.


Enum Constant Summary
FLOATING
          Pin is floating.
PULL_DOWN
          Internal pull-down resistor is used.
PULL_UP
          Internal pull-up resistor is used.
 
Method Summary
static DigitalInput.Spec.Mode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DigitalInput.Spec.Mode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FLOATING

public static final DigitalInput.Spec.Mode FLOATING
Pin is floating. When the pin is left disconnected the value sensed is undefined. Use this mode when an external pull-up or pull-down resistor is used or when interfacing push-pull type logic circuits.


PULL_UP

public static final DigitalInput.Spec.Mode PULL_UP
Internal pull-up resistor is used. When the pin is left disconnected, a logical "HIGH" (true) will be sensed. This is useful for interfacing with open drain circuits or for interacting with a switch connected between the pin and ground.


PULL_DOWN

public static final DigitalInput.Spec.Mode PULL_DOWN
Internal pull-down resistor is used. When the pin is left disconnected, a logical "LOW" (false) will be sensed. This is useful for interacting with a switch connected between the pin and Vdd.

Method Detail

values

public static DigitalInput.Spec.Mode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (DigitalInput.Spec.Mode c : DigitalInput.Spec.Mode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DigitalInput.Spec.Mode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null