cbox.hw
Class I2CPort

java.lang.Object
  extended by cbox.hw.I2CPort

public class I2CPort
extends Object

Low level I2C functions. Direct access to I2C hardware.

Author:
Martin Wolf

Field Summary
static int I2C_READ
           
static int I2C_WRITE
           
 
Constructor Summary
I2CPort()
           
 
Method Summary
 int i2cBusy()
          Low-level method to test if I2C connection is busy.
static int i2cBusyById(int aPortId)
          Low-level method to test if I2C connection is busy.
 void i2cDisable()
          Low-level method to disable I2C on the port.
static void i2cDisableById(int aPortId)
          Low-level method to disable I2C on the port.
 void i2cEnable()
          Low-level method to enable I2C on the port.
static void i2cEnableById(int aPortId)
          Low-level method to enable I2C on the port.
 int i2cStart(int address, int internalAddress, int numInternalBytes, byte[] buffer, int numBytes, int transferType)
          Low-level method to start an I2C transaction.
static int i2cStartById(int aPortId, int address, int internalAddress, int numInternalBytes, byte[] buffer, int numBytes, int transferType)
          Low-level method to start an I2C transaction.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Field Detail

I2C_WRITE

public static final int I2C_WRITE
See Also:
Constant Field Values

I2C_READ

public static final int I2C_READ
See Also:
Constant Field Values
Constructor Detail

I2CPort

public I2CPort()
Method Detail

i2cEnableById

public static void i2cEnableById(int aPortId)
Low-level method to enable I2C on the port.


i2cDisableById

public static void i2cDisableById(int aPortId)
Low-level method to disable I2C on the port.


i2cBusyById

public static int i2cBusyById(int aPortId)
Low-level method to test if I2C connection is busy.


i2cStartById

public static int i2cStartById(int aPortId,
                               int address,
                               int internalAddress,
                               int numInternalBytes,
                               byte[] buffer,
                               int numBytes,
                               int transferType)
Low-level method to start an I2C transaction.


i2cEnable

public void i2cEnable()
Low-level method to enable I2C on the port.


i2cDisable

public void i2cDisable()
Low-level method to disable I2C on the port.


i2cBusy

public int i2cBusy()
Low-level method to test if I2C connection is busy.


i2cStart

public int i2cStart(int address,
                    int internalAddress,
                    int numInternalBytes,
                    byte[] buffer,
                    int numBytes,
                    int transferType)
Low-level method to start an I2C transaction.