Class GbtGrandParent.I2c

    • Constructor Summary

      Constructors 
      Constructor Description
      I2c()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void get​(byte smbBus, byte smbAddress, java.nio.ByteBuffer offsetBB, byte[] i2cBuf)
      Does an I2C multi-byte read transaction.
      void getChunk​(byte smbBus, byte smbAddress, short nbytes, byte[] i2cBuf, int offset)
      Does an I2C multi-byte read transaction.
      abstract void prepareMulti​(byte smbBus, byte smbAddress)
      Prepares an I2C multi-byte read transaction.
      abstract void prepareMulti​(byte smbBus, byte smbAddress, java.nio.ByteBuffer i2cBB)
      Prepares an I2C multi-byte write transaction.
      abstract void put​(byte smbBus, byte smbAddress, java.nio.ByteBuffer offsetBB, byte[] i2cBuf)
      Does an I2C multi-byte write transaction.
      abstract void put​(java.nio.ByteBuffer smbBB)
      Does an I2C multi-byte write transaction.
      void putChunk​(byte smbBus, byte smbAddress, java.nio.ByteBuffer i2cBB)
      Does an I2C multi-byte write transaction.
      abstract void readMulti​(byte smbBus, short nbytes, byte[] i2cBuf, int offset)
      Sets up and launches a prepared I2C multi-byte read transaction.
      abstract void writeMulti​(byte smbBus, int nbytes)
      Sets up and launches a prepared I2C multi-byte write transaction.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • I2c

        I2c()
    • Method Detail

      • put

        public abstract void put​(java.nio.ByteBuffer smbBB)
        Description copied from interface: I2cIo

        Does an I2C multi-byte write transaction.

        Specified by:
        put in interface I2cIo
        Parameters:
        smbBB - A ByteBuffer containing the target address, register pointer and register value data.
      • put

        public abstract void put​(byte smbBus,
                                 byte smbAddress,
                                 java.nio.ByteBuffer offsetBB,
                                 byte[] i2cBuf)
        Description copied from interface: I2cIo

        Does an I2C multi-byte write transaction.

        Specified by:
        put in interface I2cIo
        Parameters:
        smbBus - The bus number of the SMB/I2C target.
        smbAddress - The address of the SMB/I2C target.
        offsetBB - The ByteBuffer containing the register offset.
        i2cBuf - The buffer containing the data.
      • get

        public abstract void get​(byte smbBus,
                                 byte smbAddress,
                                 java.nio.ByteBuffer offsetBB,
                                 byte[] i2cBuf)
        Description copied from interface: I2cIo

        Does an I2C multi-byte read transaction.

        Specified by:
        get in interface I2cIo
        Parameters:
        smbBus - The bus number of the SMB/I2C target.
        smbAddress - The address of the SMB/I2C target.
        offsetBB - ByteBuffer containing the offset where to start writing into i2cBuf.
        i2cBuf - A buffer to receive the data.
      • prepareMulti

        public abstract void prepareMulti​(byte smbBus,
                                          byte smbAddress,
                                          java.nio.ByteBuffer i2cBB)
        Description copied from interface: I2cIo

        Prepares an I2C multi-byte write transaction.

        Specified by:
        prepareMulti in interface I2cIo
        Parameters:
        smbBus - The bus number of the SMB/I2C target.
        smbAddress - The address of the SMB/I2C target.
        i2cBB - The ByteBuffer containing the I2C transaction.
      • prepareMulti

        public abstract void prepareMulti​(byte smbBus,
                                          byte smbAddress)
        Description copied from interface: I2cIo

        Prepares an I2C multi-byte read transaction.

        Specified by:
        prepareMulti in interface I2cIo
        Parameters:
        smbBus - The bus number of the SMB/I2C target.
        smbAddress - The address of the SMB/I2C target.
      • writeMulti

        public abstract void writeMulti​(byte smbBus,
                                        int nbytes)
        Description copied from interface: I2cIo

        Sets up and launches a prepared I2C multi-byte write transaction.

        Specified by:
        writeMulti in interface I2cIo
        Parameters:
        smbBus - The SMB/I2C bus number.
        nbytes - The number of bytes to transfer.
      • readMulti

        public abstract void readMulti​(byte smbBus,
                                       short nbytes,
                                       byte[] i2cBuf,
                                       int offset)
        Description copied from interface: I2cIo

        Sets up and launches a prepared I2C multi-byte read transaction.

        Specified by:
        readMulti in interface I2cIo
        Parameters:
        smbBus - The SMB/I2C bus number.
        nbytes - The number of bytes to transfer.
        i2cBuf - A buffer to receive the data.
        offset - The offset where to start writing into i2cBuf.
      • putChunk

        public void putChunk​(byte smbBus,
                             byte smbAddress,
                             java.nio.ByteBuffer i2cBB)

        Does an I2C multi-byte write transaction.

        Parameters:
        smbBus - The SMB/I2C bus number.
        smbAddress - The address of the SMB/I2C target.
        i2cBB - The ByteBuffer containing the I2C transaction.
      • getChunk

        public void getChunk​(byte smbBus,
                             byte smbAddress,
                             short nbytes,
                             byte[] i2cBuf,
                             int offset)

        Does an I2C multi-byte read transaction.

        Parameters:
        smbBus - The SMB/I2C bus number.
        smbAddress - The address of the SMB/I2C target.
        nbytes - The number of bytes to transfer.
        i2cBuf - A buffer to receive the data.
        offset - The offset where to start writing into i2cBuf.