Merge pull request #5044 from gohai/io-fixes

IO library updates
This commit is contained in:
Ben Fry
2017-05-04 05:45:04 -04:00
committed by GitHub

View File

@@ -450,7 +450,7 @@ public class GPIO {
* @webref
*/
public static void waitFor(int pin, int mode) {
waitForInterrupt(pin, mode, -1);
waitFor(pin, mode, -1);
}
@@ -458,8 +458,6 @@ public class GPIO {
* Waits for the value of an input pin to change
*
* This function will throw a RuntimeException in case of a timeout.
* @param pin GPIO pin
* @param mode what to wait for: GPIO.CHANGE, GPIO.FALLING or GPIO.RISING
* @param timeout don't wait more than timeout milliseconds
* @webref
*/
@@ -513,19 +511,4 @@ public class GPIO {
return true;
}
}
/**
* Waits for the value of an input pin to change
*
* Make sure to setup the interrupt with enableInterrupt() before calling
* this function. This function will wait indefinitely for an interrupt
* to occur.
* @parm pin GPIO pin
* @see enableInterrupt
* @see disableInterrupt
*/
protected static void waitForInterrupt(int pin) {
waitForInterrupt(pin, -1);
}
}