ioio.lib.api
Enum DigitalOutput.Spec.Mode

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

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

Output pin mode.


Enum Constant Summary
NORMAL
          Pin operates in push-pull mode, i.e.
OPEN_DRAIN
          Pin operates in open-drain mode, i.e.
 
Method Summary
static DigitalOutput.Spec.Mode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DigitalOutput.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

NORMAL

public static final DigitalOutput.Spec.Mode NORMAL
Pin operates in push-pull mode, i.e. a logical "HIGH" is represented by a voltage of Vdd on the pin and a logical "LOW" by a voltage of 0 (ground).


OPEN_DRAIN

public static final DigitalOutput.Spec.Mode OPEN_DRAIN
Pin operates in open-drain mode, i.e. a logical "HIGH" is represented by a high impedance on the pin (as if it is disconnected) and a logical "LOW" by a voltage of 0 (ground). This mode is most commonly used for generating 5V logical signal on a 3.3V pin: 5V tolerant pins must be used; a pull-up resistor is connected between the pin and 5V, and the pin is used in open- drain mode.

Method Detail

values

public static DigitalOutput.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 (DigitalOutput.Spec.Mode c : DigitalOutput.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 DigitalOutput.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