Examples of PinState


Examples of com.pi4j.io.gpio.PinState

    public void run() {
        // only process listeners and triggers if the received interrupt event
        // matches the pin number being tracked my this class instance
        if (this.pin.getPin().equals(event.getPin())) {
            if (event.getEventType() == PinEventType.DIGITAL_STATE_CHANGE) {
                PinState state = ((PinDigitalStateChangeEvent) event).getState();

                // process event callbacks for digital listeners
                for (GpioPinListener listener : pin.getListeners()) {
                    if (listener instanceof GpioPinListenerDigital) {
                        ((GpioPinListenerDigital) listener)
View Full Code Here

Examples of com.pi4j.io.gpio.PinState

    public void handlePinEvent(PinEvent event) {
        // only process listeners and triggers if the received interrupt event
        // matches the pin number being tracked my this class instance
        if (this.pin.getPin().equals(event.getPin())) {
            if (event.getEventType() == PinEventType.DIGITAL_STATE_CHANGE) {
                PinState state = ((PinDigitalStateChangeEvent)event).getState();
               
                // process event callbacks for digital listeners
                for (GpioPinListener listener : pin.getListeners()) {
                    if (listener instanceof GpioPinListenerDigital) {                     
                        ((GpioPinListenerDigital)listener).handleGpioPinDigitalStateChangeEvent(new GpioPinDigitalStateChangeEvent(event.getSource(), pin, state));
View Full Code Here

Examples of com.pi4j.io.gpio.PinState

           
            // 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
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.