Esempio n. 1
0
File: Pin.java Progetto: xranby/pi4j
 public static Pin getPin(String pinName) {
   for (Pin pin : Pin.values()) {
     if (pin.getValueString().equalsIgnoreCase(pinName.trim())) return pin;
     else if (pin.getName().equalsIgnoreCase(pinName.trim())) return pin;
     else if (pin.hasAltFunction() && pin.getAltFunction().equalsIgnoreCase(pinName.trim()))
       return pin;
   }
   return null;
 }