// Path: IOIO/iOIOLibAndroid/src/main/java/ioio/lib/api/PulseInput.java
// public enum PulseMode {
//     /**
//      * Positive pulse measurement (rising-edge-to-falling-edge).
//      */
//     POSITIVE(1),
//     /**
//      * Negative pulse measurement (falling-edge-to-rising-edge).
//      */
//     NEGATIVE(1),
//     /**
//      * Frequency measurement (rising-edge-to-rising-edge).
//      */
//     FREQ(1),
//     /**
//      * Frequency measurement (rising-edge-to-rising-edge) with 4x scaling.
//      */
//     FREQ_SCALE_4(4),
//     /**
//      * Frequency measurement (rising-edge-to-rising-edge) with 16x scaling.
//      */
//     FREQ_SCALE_16(16);
// 
//     /**
//      * The scaling factor as an integer.
//      */
//     public final int scaling;
// 
//     private PulseMode(int s) {
//         scaling = s;
//     }
// }
// 
// Path: IOIO/iOIOLibAndroid/src/main/java/ioio/lib/api/TwiMaster.java
// enum Rate {
//     RATE_100KHz, RATE_400KHz, RATE_1MHz
// }
// 
// Path: IOIO/iOIOLibAndroid/src/main/java/ioio/lib/api/Uart.java
// enum Parity {
//     /**
//      * No parity.
//      */
//     NONE,
//     /**
//      * Even parity.
//      */
//     EVEN,
//     /**
//      * Odd parity.
//      */
//     ODD
// }
// 
// Path: IOIO/iOIOLibAndroid/src/main/java/ioio/lib/api/Uart.java
// enum StopBits {
//     /**
//      * One stop bit.
//      */
//     ONE,
//     /**
//      * Two stop bits.
//      */
//     TWO
// }


import ioio.lib.api.PulseInput.PulseMode;
import ioio.lib.api.TwiMaster.Rate;
import ioio.lib.api.Uart.Parity;
import ioio.lib.api.Uart.StopBits;
import ioio.lib.api.exception.ConnectionLostException;
import ioio.lib.api.exception.IncompatibilityException;
import ioio.lib.api.exception.OutOfResourceException;
import java.io.Closeable;
     * @param clk         Pin specification for the CLK pin, consisting of the pin number, as labeled on the
     *                    board, and the mode, which determines whether the pin will be normal or
     *                    open-drain. See {@link DigitalOutput.Spec.Mode} for more information.
     * @param slaveSelect An array of pin specifications for each of the slaves' SS (Slave Select) pin. The
     *                    index of this array designates the slave index, used later to refer to this slave.
     *                    The spec is consisting of the pin number, as labeled on the board, and the mode,
     *                    which determines whether the pin will be normal or open-drain. See
     *                    {@link DigitalOutput.Spec.Mode} for more information.
     * @param config      The configuration of the SPI module. See {@link SpiMaster.Config} for details.
     * @return Interface of the assigned module.
     * @throws ConnectionLostException Connection was lost before or during the execution of this method.
     * @throws OutOfResourceException  This is a runtime exception, so it is not necessary to catch it if the client
     *                                 guarantees that the total number of concurrent SPI resources is not exceeded.
     * @see SpiMaster
     */
    public SpiMaster openSpiMaster(DigitalInput.Spec miso, DigitalOutput.Spec mosi,
                                   DigitalOutput.Spec clk, DigitalOutput.Spec[] slaveSelect, SpiMaster.Config config)
            throws ConnectionLostException;

    /**
     * Shorthand for
     * {@link #openSpiMaster(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[], ioio.lib.api.SpiMaster.Config)}
     * , where the pins are all open with the default modes and default configuration values are
     * used.
     *
     * @see #openSpiMaster(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec,
     * ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[],
     * ioio.lib.api.SpiMaster.Config)
     */
    public SpiMaster openSpiMaster(int miso, int mosi, int clk, int[] slaveSelect,
// Path: IOIO/iOIOLibAndroid/src/main/java/ioio/lib/api/PulseInput.java
// public enum PulseMode {
//     /**
//      * Positive pulse measurement (rising-edge-to-falling-edge).
//      */
//     POSITIVE(1),
//     /**
//      * Negative pulse measurement (falling-edge-to-rising-edge).
//      */
//     NEGATIVE(1),
//     /**
//      * Frequency measurement (rising-edge-to-rising-edge).
//      */
//     FREQ(1),
//     /**
//      * Frequency measurement (rising-edge-to-rising-edge) with 4x scaling.
//      */
//     FREQ_SCALE_4(4),
//     /**
//      * Frequency measurement (rising-edge-to-rising-edge) with 16x scaling.
//      */
//     FREQ_SCALE_16(16);
// 
//     /**
//      * The scaling factor as an integer.
//      */
//     public final int scaling;
// 
//     private PulseMode(int s) {
//         scaling = s;
//     }
// }
// 
// Path: IOIO/iOIOLibAndroid/src/main/java/ioio/lib/api/TwiMaster.java
// enum Rate {
//     RATE_100KHz, RATE_400KHz, RATE_1MHz
// }
// 
// Path: IOIO/iOIOLibAndroid/src/main/java/ioio/lib/api/Uart.java
// enum Parity {
//     /**
//      * No parity.
//      */
//     NONE,
//     /**
//      * Even parity.
//      */
//     EVEN,
//     /**
//      * Odd parity.
//      */
//     ODD
// }
// 
// Path: IOIO/iOIOLibAndroid/src/main/java/ioio/lib/api/Uart.java
// enum StopBits {
//     /**
//      * One stop bit.
//      */
//     ONE,
//     /**
//      * Two stop bits.
//      */
//     TWO
// }


// Path: IOIO/iOIOLibAndroid/src/main/java/ioio/lib/api/IOIO.java
import ioio.lib.api.PulseInput.PulseMode;
import ioio.lib.api.TwiMaster.Rate;
import ioio.lib.api.Uart.Parity;
import ioio.lib.api.Uart.StopBits;
import ioio.lib.api.exception.ConnectionLostException;
import ioio.lib.api.exception.IncompatibilityException;
import ioio.lib.api.exception.OutOfResourceException;
import java.io.Closeable;

     * @param clk         Pin specification for the CLK pin, consisting of the pin number, as labeled on the
     *                    board, and the mode, which determines whether the pin will be normal or
     *                    open-drain. See {@link DigitalOutput.Spec.Mode} for more information.
     * @param slaveSelect An array of pin specifications for each of the slaves' SS (Slave Select) pin. The
     *                    index of this array designates the slave index, used later to refer to this slave.
     *                    The spec is consisting of the pin number, as labeled on the board, and the mode,
     *                    which determines whether the pin will be normal or open-drain. See
     *                    {@link DigitalOutput.Spec.Mode} for more information.
     * @param config      The configuration of the SPI module. See {@link SpiMaster.Config} for details.
     * @return Interface of the assigned module.
     * @throws ConnectionLostException Connection was lost before or during the execution of this method.
     * @throws OutOfResourceException  This is a runtime exception, so it is not necessary to catch it if the client
     *                                 guarantees that the total number of concurrent SPI resources is not exceeded.
     * @see SpiMaster
     */
    public SpiMaster openSpiMaster(DigitalInput.Spec miso, DigitalOutput.Spec mosi,
                                   DigitalOutput.Spec clk, DigitalOutput.Spec[] slaveSelect, SpiMaster.Config config)
            throws ConnectionLostException;

    /**
     * Shorthand for
     * {@link #openSpiMaster(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[], ioio.lib.api.SpiMaster.Config)}
     * , where the pins are all open with the default modes and default configuration values are
     * used.
     *
     * @see #openSpiMaster(ioio.lib.api.DigitalInput.Spec, ioio.lib.api.DigitalOutput.Spec,
     * ioio.lib.api.DigitalOutput.Spec, ioio.lib.api.DigitalOutput.Spec[],
     * ioio.lib.api.SpiMaster.Config)
     */
    public SpiMaster openSpiMaster(int miso, int mosi, int clk, int[] slaveSelect,
                                   SpiMaster.Rate rate) throws ConnectionLostException;