com.qualcomm.robotcore.hardware

## Interface DeviceInterfaceModule

- All Superinterfaces:
    AnalogInputController, AnalogOutputController, DigitalChannelController, HardwareDevice, I2cController, PWMOutputController

      public interface DeviceInterfaceModule
      extends DigitalChannelController, AnalogInputController, PWMOutputController, I2cController, AnalogOutputController

  DeviceInterfaceModule for working with various devices

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.DigitalChannelController

      `DigitalChannelController.Mode`

    - ### Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.I2cController

      `I2cController.I2cPortReadyBeginEndNotifications, I2cController.I2cPortReadyCallback`

    - ### Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `HardwareDevice.Manufacturer`

  - ### Field Summary

    - ### Fields inherited from interface com.qualcomm.robotcore.hardware.I2cController

      `I2C_BUFFER_START_ADDRESS`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getDigitalInputStateByte()` A byte containing the current logic levels present in the D7-D0 channel pins.
    `byte` | `getDigitalIOControlByte()` Get the digital IO control byte
    `byte` | `getDigitalOutputStateByte()` The D7-D0 output set field is a byte containing the required I/O output of the D7-D0 channel pins.
    `boolean` | `getLEDState(int channel)` Indicates whether the LED on the given channel is on or not
    `void` | `setDigitalIOControlByte(byte input)` If a particular bit is set to one, the corresponding channel pin will be in output mode.
    `void` | `setDigitalOutputByte(byte input)` If a a particular control field bit is set to one, the channel pin will be in output mode and will reflect the value of the corresponding field bit.
    `void` | `setLED(int channel, boolean state)` Turn on or off a particular LED

    - ### Methods inherited from interface com.qualcomm.robotcore.hardware.DigitalChannelController

      `getDigitalChannelMode, getDigitalChannelState, getSerialNumber, setDigitalChannelMode, setDigitalChannelMode, setDigitalChannelState`

    - ### Methods inherited from interface com.qualcomm.robotcore.hardware.AnalogInputController

      `getAnalogInputVoltage, getMaxAnalogInputVoltage, getSerialNumber`

    - ### Methods inherited from interface com.qualcomm.robotcore.hardware.PWMOutputController

      `getPulseWidthOutputTime, getPulseWidthPeriod, getSerialNumber, setPulseWidthOutputTime, setPulseWidthPeriod`

    - ### Methods inherited from interface com.qualcomm.robotcore.hardware.I2cController

      `clearI2cPortActionFlag, copyBufferIntoWriteBuffer, deregisterForPortReadyBeginEndCallback, deregisterForPortReadyCallback, enableI2cReadMode, enableI2cWriteMode, getCopyOfReadBuffer, getCopyOfWriteBuffer, getI2cPortReadyCallback, getI2cReadCache, getI2cReadCacheLock, getI2cReadCacheTimeWindow, getI2cWriteCache, getI2cWriteCacheLock, getMaxI2cWriteLatency, getPortReadyBeginEndCallback, getSerialNumber, isArmed, isI2cPortActionFlagSet, isI2cPortInReadMode, isI2cPortInWriteMode, isI2cPortReady, readI2cCacheFromController, readI2cCacheFromModule, registerForI2cPortReadyCallback, registerForPortReadyBeginEndCallback, setI2cPortActionFlag, writeI2cCacheToController, writeI2cCacheToModule, writeI2cPortFlagOnlyToController, writeI2cPortFlagOnlyToModule`

    - ### Methods inherited from interface com.qualcomm.robotcore.hardware.AnalogOutputController

      `getSerialNumber, setAnalogOutputFrequency, setAnalogOutputMode, setAnalogOutputVoltage`

    - ### Methods inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `close, getConnectionInfo, getDeviceName, getManufacturer, getVersion, resetDeviceConfigurationForOpMode`

- - ### Method Detail

    - #### getDigitalInputStateByte

          int getDigitalInputStateByte()

      A byte containing the current logic levels present in the D7-D0 channel pins. If a particular pin is in output mode, the current output state will be reported.

    - #### setDigitalIOControlByte

          void setDigitalIOControlByte(byte input)

      If a particular bit is set to one, the corresponding channel pin will be in output mode. Else it will be in input mode.
      Parameters:
        `input` - - the desired setting for each channel pin.

    - #### getDigitalIOControlByte

          byte getDigitalIOControlByte()

      Get the digital IO control byte
      Returns:
        control byte

    - #### setDigitalOutputByte

          void setDigitalOutputByte(byte input)

      If a a particular control field bit is set to one, the channel pin will be in output mode and will reflect the value of the corresponding field bit.
      Parameters:
        `input` - with output state of the digital pins.

    - #### getDigitalOutputStateByte

          byte getDigitalOutputStateByte()

      The D7-D0 output set field is a byte containing the required I/O output of the D7-D0 channel pins. If the corresponding Dy-D0 I/O control field bit is set to one, the channel pin will be in output mode and will reflect the value of the corresponding D7-D0 output set field bit.
      Returns:
        D7-D0 output set field.

    - #### getLEDState

          boolean getLEDState(int channel)

      Indicates whether the LED on the given channel is on or not
      Returns:
        true for ON, false for OFF

    - #### setLED

          void setLED(int channel,
                      boolean state)

      Turn on or off a particular LED
      Parameters:
        `channel` - - int indicating the ID of the LED.
        `state` - - byte containing the desired setting.