001package com.pi4j.io.gpio;
002
003import java.util.concurrent.Callable;
004import java.util.concurrent.Future;
005import java.util.concurrent.TimeUnit;
006
007/*
008 * #%L
009 * **********************************************************************
010 * ORGANIZATION  :  Pi4J
011 * PROJECT       :  Pi4J :: Java Library (Core)
012 * FILENAME      :  GpioPinDigitalOutput.java
013 *
014 * This file is part of the Pi4J project. More information about
015 * this project can be found here:  https://www.pi4j.com/
016 * **********************************************************************
017 * %%
018 * Copyright (C) 2012 - 2019 Pi4J
019 * %%
020 * This program is free software: you can redistribute it and/or modify
021 * it under the terms of the GNU Lesser General Public License as
022 * published by the Free Software Foundation, either version 3 of the
023 * License, or (at your option) any later version.
024 *
025 * This program is distributed in the hope that it will be useful,
026 * but WITHOUT ANY WARRANTY; without even the implied warranty of
027 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
028 * GNU General Lesser Public License for more details.
029 *
030 * You should have received a copy of the GNU General Lesser Public
031 * License along with this program.  If not, see
032 * <http://www.gnu.org/licenses/lgpl-3.0.html>.
033 * #L%
034 */
035
036/**
037 * Gpio digital output pin interface.
038 *
039 * @author Robert Savage (<a
040 *         href="http://www.savagehomeautomation.com">http://www.savagehomeautomation.com</a>)
041 */
042@SuppressWarnings("unused")
043public interface GpioPinDigitalOutput extends GpioPinDigital, GpioPinOutput {
044
045    void high();
046    void low();
047    void toggle();
048    Future<?> blink(long delay);
049    Future<?> blink(long delay, TimeUnit timeUnit);
050    Future<?> blink(long delay, PinState blinkState);
051    Future<?> blink(long delay, PinState blinkState, TimeUnit timeUnit);
052    Future<?> blink(long delay, long duration);
053    Future<?> blink(long delay, long duration, TimeUnit timeUnit);
054    Future<?> blink(long delay, long duration, PinState blinkState);
055    Future<?> blink(long delay, long duration, PinState blinkState, TimeUnit timeUnit);
056    Future<?> pulse(long duration);
057    Future<?> pulse(long duration, TimeUnit timeUnit);
058    Future<?> pulse(long duration, Callable<Void> callback);
059    Future<?> pulse(long duration, Callable<Void> callback, TimeUnit timeUnit);
060    Future<?> pulse(long duration, boolean blocking);
061    Future<?> pulse(long duration, boolean blocking, TimeUnit timeUnit);
062    Future<?> pulse(long duration, boolean blocking, Callable<Void> callback);
063    Future<?> pulse(long duration, boolean blocking, Callable<Void> callback, TimeUnit timeUnit);
064    Future<?> pulse(long duration, PinState pulseState);
065    Future<?> pulse(long duration, PinState pulseState, TimeUnit timeUnit);
066    Future<?> pulse(long duration, PinState pulseState, Callable<Void> callback);
067    Future<?> pulse(long duration, PinState pulseState, Callable<Void> callback, TimeUnit timeUnit);
068    Future<?> pulse(long duration, PinState pulseState, boolean blocking);
069    Future<?> pulse(long duration, PinState pulseState, boolean blocking, TimeUnit timeUnit);
070    Future<?> pulse(long duration, PinState pulseState, boolean blocking, Callable<Void> callback);
071    Future<?> pulse(long duration, PinState pulseState, boolean blocking, Callable<Void> callback, TimeUnit timeUnit);
072    void setState(PinState state);
073    void setState(boolean state);
074
075}