Class GbtxSca.I2c

    • Constructor Summary

      Constructors 
      Constructor Description
      I2c()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void get​(byte smbBus, byte smbAddress, java.nio.ByteBuffer offsetBB, byte[] i2cBuf)
      Does an I2C multi-byte read transaction.
      void prepareMulti​(byte smbBus, byte smbAddress)
      Prepares an I2C multi-byte read transaction.
      void prepareMulti​(byte smbBus, byte smbAddress, java.nio.ByteBuffer i2cBB)
      Prepares an I2C multi-byte write transaction.
      void put​(byte smbBus, byte smbAddress, java.nio.ByteBuffer offsetBB, byte[] i2cBuf)
      Does an I2C multi-byte write transaction.
      void put​(java.nio.ByteBuffer smbBB)
      Does an I2C multi-byte write transaction.
      void readMulti​(byte smbBus, short nbytes, byte[] i2cBuf, int offset)
      Sets up and launches a prepared I2C multi-byte read transaction.
      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 void put​(java.nio.ByteBuffer smbBB)
        Description copied from interface: I2cIo

        Does an I2C multi-byte write transaction.

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

        public 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
        Specified by:
        put in class GbtGrandParent.I2c
        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 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
        Specified by:
        get in class GbtGrandParent.I2c
        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 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
        Specified by:
        prepareMulti in class GbtGrandParent.I2c
        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 void prepareMulti​(byte smbBus,
                                 byte smbAddress)
        Description copied from interface: I2cIo

        Prepares an I2C multi-byte read transaction.

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

        public 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
        Specified by:
        writeMulti in class GbtGrandParent.I2c
        Parameters:
        smbBus - The SMB/I2C bus number.
        nbytes - The number of bytes to transfer.
      • readMulti

        public 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
        Specified by:
        readMulti in class GbtGrandParent.I2c
        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.