Enum GlcdPin

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<GlcdPin>

    public enum GlcdPin
    extends java.lang.Enum<GlcdPin>

    All possible PIN configurations that can be found on your Graphics LCD device

    Note: Most of these pins are equivalent to the U8G2 constants found in it's header file:
          U8X8_PIN_D0 0
          U8X8_PIN_SPI_CLOCK 0
          U8X8_PIN_D1 1
          U8X8_PIN_SPI_DATA 1
          U8X8_PIN_D2 2
          U8X8_PIN_D3 3
          U8X8_PIN_D4 4
          U8X8_PIN_D5 5
          U8X8_PIN_D6 6
          U8X8_PIN_D7 7
          U8X8_PIN_E 8
          U8X8_PIN_CS 9              //parallel, SPI
          U8X8_PIN_DC 10             // parallel, SPI
          U8X8_PIN_RESET 11          // parallel, SPI, I2C
          U8X8_PIN_I2C_CLOCK 12      // 1 = Input/high impedance, 0 = drive low
          U8X8_PIN_I2C_DATA 13       // 1 = Input/high impedance, 0 = drive low
          U8X8_PIN_CS1 14            // KS0108 extra chip select
          U8X8_PIN_CS2 15            //KS0108 extra chip select
     
    Author:
    Rafael Ibasco
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CS
      Chip Select Pin
      CS1
      Chip Select 1 (KS0108 extra chip select)
      CS2
      Chip Select 2 (KS0108 extra chip select)
      D0
      Data pin 0 (also known as SPI CLOCK)
      D1
      Data pin 1 (also known as SPI DATA)
      D2
      Data Pin 2
      D3
      Data Pin 3
      D4
      Data Pin 4
      D5
      Data Pin 5
      D6
      Data Pin 6
      D7
      Data Pin 7
      DC
      Data/Command Pin
      EN
      Enable Pin
      I2C_CLOCK
      I2C Clock Pin (SCL)
      I2C_DATA
      I2C Data Pin (SDA)
      PSB
      Switch between Parallel or Serial bus interface
      RESET
      Reset Pin
      SPI_CLOCK
      Alias for D0.
      SPI_MOSI
      Alias for D1.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()  
      int getIndex()  
      java.lang.String getName()  
      GlcdPin getParent()  
      static java.util.List<GlcdPin> getPins()  
      boolean isAlias()  
      static GlcdPin valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static GlcdPin[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • D0

        public static final GlcdPin D0
        Data pin 0 (also known as SPI CLOCK)
      • D1

        public static final GlcdPin D1
        Data pin 1 (also known as SPI DATA)
      • D2

        public static final GlcdPin D2
        Data Pin 2
      • D3

        public static final GlcdPin D3
        Data Pin 3
      • D4

        public static final GlcdPin D4
        Data Pin 4
      • D5

        public static final GlcdPin D5
        Data Pin 5
      • D6

        public static final GlcdPin D6
        Data Pin 6
      • D7

        public static final GlcdPin D7
        Data Pin 7
      • EN

        public static final GlcdPin EN
        Enable Pin
      • CS

        public static final GlcdPin CS
        Chip Select Pin
      • DC

        public static final GlcdPin DC
        Data/Command Pin
      • RESET

        public static final GlcdPin RESET
        Reset Pin
      • I2C_CLOCK

        public static final GlcdPin I2C_CLOCK
        I2C Clock Pin (SCL)
      • I2C_DATA

        public static final GlcdPin I2C_DATA
        I2C Data Pin (SDA)
      • CS1

        public static final GlcdPin CS1
        Chip Select 1 (KS0108 extra chip select)
      • CS2

        public static final GlcdPin CS2
        Chip Select 2 (KS0108 extra chip select)
      • SPI_CLOCK

        public static final GlcdPin SPI_CLOCK
        Alias for D0. Added for convenience
      • SPI_MOSI

        public static final GlcdPin SPI_MOSI
        Alias for D1. Added for convenience
      • PSB

        public static final GlcdPin PSB
        Switch between Parallel or Serial bus interface
    • Method Detail

      • values

        public static GlcdPin[] 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 (GlcdPin c : GlcdPin.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GlcdPin 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
      • getName

        public java.lang.String getName()
        Returns:
        Name of the enumeration
      • getDescription

        public java.lang.String getDescription()
        Returns:
        The pin description
      • getIndex

        public int getIndex()
        Returns:
        The device pin index
      • isAlias

        public boolean isAlias()
        Returns:
        True if the enum is an alias of another GlcdPin
      • getParent

        public GlcdPin getParent()
        Returns:
        The parent GlcdPin instance
      • getPins

        public static java.util.List<GlcdPin> getPins()
        Returns:
        A List of the values of the GlcdPin enumeration