Package cbsw.lhcb.pdmdb
Class GbtGrandParent.I2c
- java.lang.Object
-
- cbsw.lhcb.pdmdb.GbtGrandParent.I2c
-
- All Implemented Interfaces:
I2cIo
- Direct Known Subclasses:
GbtxParent.I2c
,GbtxSca.I2c
,LpGbtParent.I2c
- Enclosing class:
- GbtGrandParent
abstract class GbtGrandParent.I2c extends java.lang.Object implements I2cIo
-
-
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.
-
-
-
Method Detail
-
put
public abstract void put(java.nio.ByteBuffer smbBB)
Description copied from interface:I2cIo
Does an I2C multi-byte write transaction.
-
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.
-
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.
-
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 interfaceI2cIo
- 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 interfaceI2cIo
- 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 interfaceI2cIo
- 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.
-
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.
-
-