|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lsst.ccs.drivers.ad.Cypress
org.lsst.ccs.drivers.ad.I2cBus
public class I2cBus
Routines to access an I2C device on an Analog Devices evaluation board
| Constructor Summary | |
|---|---|
I2cBus(org.lsst.ccs.drivers.usb.UsbComm com)
Constructor |
|
| Method Summary | |
|---|---|
void |
load(boolean force)
Loads memory from standard file |
int |
readRegister(int regnum)
Reads a register |
int |
readRegister(int regnum,
byte[] data)
Reads byte array from consecutive registers |
int |
readRegister2(int regnum)
Reads 16-bit value from a pair of registers |
int |
readRegister3(int regnum)
Reads 24-bit value from a triplet of registers |
void |
updateRegister(int regnum,
int mask,
int value)
Updates a register |
int |
writeRegister(int regnum,
byte[] data)
Writes byte array to consecutive registers |
void |
writeRegister(int regnum,
int value)
Writes a register |
| Methods inherited from class org.lsst.ccs.drivers.ad.Cypress |
|---|
load, readMemory, readMemory, setReset, writeMemory, writeMemory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public I2cBus(org.lsst.ccs.drivers.usb.UsbComm com)
throws javax.usb.UsbException
javax.usb.UsbException| Method Detail |
|---|
public int readRegister2(int regnum)
throws javax.usb.UsbException
regnum - The number of the first (high-order) register to read
javax.usb.UsbException
public int readRegister3(int regnum)
throws javax.usb.UsbException
regnum - The number of the first (high-order) register to read
javax.usb.UsbException
public int readRegister(int regnum,
byte[] data)
throws javax.usb.UsbException
regnum - The first register to readdata - The array of bytes to read intotimeout - The maximum time to wait (ms), or 0 for no timeout
javax.usb.UsbException
public int readRegister(int regnum)
throws javax.usb.UsbException
regnum - The register to readtimeout - The maximum time to wait (ms), or 0 for no timeout
javax.usb.UsbException
public int writeRegister(int regnum,
byte[] data)
throws javax.usb.UsbException
regnum - The first register to writedata - The array of bytes to write
javax.usb.UsbException
public void writeRegister(int regnum,
int value)
throws javax.usb.UsbException
regnum - The register to writevalue - The value to write
javax.usb.UsbException
public void updateRegister(int regnum,
int mask,
int value)
throws javax.usb.UsbException
regnum - The register to updatemask - The mask of bits to updatevalue - The value to write, under the mask
javax.usb.UsbException
public void load(boolean force)
throws javax.usb.UsbException
force - If true, force the load even if memory appears to be
already loaded correctly.
javax.usb.UsbException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||