gpioPin.removeEventHandler(this);
}
gpioPin.setDirection(newDirection);
if (newDirection == GPIOPin.DIRECTION_IN) {
gpioPin.setEdgeDetection(GPIOPin.EDGEDETECTION_BOTH);
gpioPin.addEventHandler(this);
}
}
/* Debouncing is valid only for input pins */
if (newDirection == GPIOPin.DIRECTION_IN) {