Package cbsw.lhcb.pdmdb
Class GbtxSca.I2c
- java.lang.Object
-
- cbsw.lhcb.pdmdb.GbtGrandParent.I2c
-
- cbsw.lhcb.pdmdb.GbtxSca.I2c
-
- All Implemented Interfaces:
I2cIo
- Enclosing class:
- GbtxSca
class GbtxSca.I2c extends GbtGrandParent.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 cbsw.lhcb.pdmdb.GbtGrandParent.I2c
getChunk, putChunk
-
-
-
-
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 interfaceI2cIo
- Specified by:
put
in classGbtGrandParent.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 interfaceI2cIo
- Specified by:
put
in classGbtGrandParent.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 interfaceI2cIo
- Specified by:
get
in classGbtGrandParent.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 interfaceI2cIo
- Specified by:
prepareMulti
in classGbtGrandParent.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 interfaceI2cIo
- Specified by:
prepareMulti
in classGbtGrandParent.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 interfaceI2cIo
- Specified by:
writeMulti
in classGbtGrandParent.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 interfaceI2cIo
- Specified by:
readMulti
in classGbtGrandParent.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.
-
-