Module com.pi4j

Interface I2C

    • Method Detail

      • 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