Examples of GpioPinShutdown


Examples of com.pi4j.io.gpio.GpioPinShutdown

            if(!pin.getProvider().isShutdown()){
                pin.getProvider().shutdown();
            }
           
            // perform the shutdown options if configured for the pin
            GpioPinShutdown shutdownOptions = pin.getShutdownOptions();
            if (shutdownOptions != null) {
                // get shutdown option configuration
                PinState state = shutdownOptions.getState();
                PinMode mode = shutdownOptions.getMode();
                PinPullResistance resistance = shutdownOptions.getPullResistor();
                Boolean unexport = shutdownOptions.getUnexport();
               
                // perform shutdown actions
                if ((state != null) && (pin instanceof GpioPinDigitalOutput)) {
                    ((GpioPinDigitalOutput)pin).setState(state);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.