Module com.pi4j

Interface I2C

All Superinterfaces:
AutoCloseable, Describable, I2CRegisterDataReader, I2CRegisterDataReaderWriter, I2CRegisterDataWriter, Identity, IO<I2C,I2CConfig,I2CProvider>, IODataReader, IODataWriter, Lifecycle, Readable
All Known Implementing Classes:
I2CBase

I2C I/O Interface for Pi4J I2C Bus/Device Communications
Version:
$Id: $Id
Author:
Robert Savage Based on previous contributions from: Daniel Sendula, RasPelikan
  • Method Details

    • close

      void close()

      close.

      Specified by:
      close in interface AutoCloseable
    • newConfigBuilder

      static I2CConfigBuilder newConfigBuilder(Context context)

      newConfigBuilder.

      Parameters:
      context - Context
      Returns:
      a I2CConfigBuilder object.
    • device

      default int device()
      I2C Device Address
      Returns:
      The I2C device address for which this instance is constructed for.
    • bus

      default int bus()
      I2C Bus Address
      Returns:
      The I2C bus address for which this instance is constructed for.
    • isOpen

      boolean isOpen()
      I2C Device Communication State is OPEN
      Returns:
      The I2C device communication state
    • getBus

      default int getBus()
      I2C Bus Address
      Returns:
      The I2C bus address for which this instance is constructed for.
    • getDevice

      default int getDevice()
      I2C Device Address
      Returns:
      The I2C device address for which this instance is constructed for.
    • getRegister

      I2CRegister getRegister(int address)
      Get an encapsulated interface for reading and writing to a specific I2C device register
      Parameters:
      address - a int.
      Returns:
      a I2CRegister object.
    • register

      default I2CRegister register(int address)
      I2C Device Register Get an encapsulated interface for reading and writing to a specific I2C device register
      Parameters:
      address - the (16-bit) device register address
      Returns:
      an instance of I2CRegister for the provided register address