Enum Class SPI.Mode

java.lang.Object
java.lang.Enum<SPI.Mode>
edu.wpi.first.wpilibj.SPI.Mode
All Implemented Interfaces:
Serializable, Comparable<SPI.Mode>, Constable
Enclosing class:
SPI

public static enum SPI.Mode extends Enum<SPI.Mode>
SPI mode.
  • Enum Constant Details

    • kMode0

      public static final SPI.Mode kMode0
      Clock idle low, data sampled on rising edge.
    • kMode1

      public static final SPI.Mode kMode1
      Clock idle low, data sampled on falling edge.
    • kMode2

      public static final SPI.Mode kMode2
      Clock idle high, data sampled on falling edge.
    • kMode3

      public static final SPI.Mode kMode3
      Clock idle high, data sampled on rising edge.
  • Field Details

    • value

      public final int value
      SPI mode value.
  • Method Details

    • values

      public static SPI.Mode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SPI.Mode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null