com.ftdi.j2xx.interfaces

## Interface Gpio

- All Known Implementing Classes:
    FT_4222_Gpio

      public interface Gpio

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `init(int[] gpio)` Initialize the GPIO interface
    `int` | `read(int portNum, boolean[] bValue)` Read the value from the specified GPIO pin.
    `int` | `write(int portNum, boolean bValue)` Write value to the specified GPIO pin.

- - ### Method Detail

    - #### init

          int init(int[] gpio)

      Initialize the GPIO interface
      Parameters:
        `gpio` - An array defines the directions of GPIO pins. The GPIO direction will be: GPIO_OUTPUT GPIO_INPUT
      Returns:
        0 if successful, otherwise the return value is an FT error code.

    - #### read

          int read(int portNum,
                 boolean[] bValue)

      Read the value from the specified GPIO pin.
      Parameters:
        `portNum` - GPIO port number.
        `bValue` - A variable of typeBOOL which receives the value of the GPIO pin.
      Returns:
        0 if successful, otherwise the return value is an FT error code.

    - #### write

          int write(int portNum,
                  boolean bValue)

      Write value to the specified GPIO pin.
      Parameters:
        `portNum` - GPIO port number.
        `bValue` - The output value.
      Returns:
        0 if successful, otherwise the return value is an FT error code.

About FTDI | FTDI Licence Terms