Class RemoteRequestI2CPort

    • Constructor Detail

      • RemoteRequestI2CPort

        public RemoteRequestI2CPort​(java.io.ObjectInputStream is,
                                    java.io.ObjectOutputStream os)
    • Method Detail

      • close

        public void close()
        Description copied from interface: IOPort
        Close the port, the port can not be used after this call.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface IOPort
        Overrides:
        close in class RemoteRequestIOPort
      • i2cTransaction

        public void i2cTransaction​(int deviceAddress,
                                   byte[] writeBuf,
                                   int writeOffset,
                                   int writeLen,
                                   byte[] readBuf,
                                   int readOffset,
                                   int readLen)
        Description copied from interface: I2CPort
        High level i2c interface. Perform a complete i2c transaction and return the results. Writes the specified data to the device and then reads the requested bytes from it.
        Specified by:
        i2cTransaction in interface I2CPort
        Parameters:
        deviceAddress - The I2C device address.
        writeBuf - The buffer containing data to be written to the device.
        writeOffset - The offset of the data within the write buffer
        writeLen - The number of bytes to write.
        readBuf - The buffer to use for the transaction results
        readOffset - Location to write the results to
        readLen - The length of the read