|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cork.net.i2c.I2CBusMasterFactory
The Factory knows how to create copies of the system BusMaster and how to set its properties. To change the properties of the I2C lines, use the properties specified.
There are 4 properties that can be set in JemBuilder to change the
configuration of the I2C bus:
The list that follows shows the bit ID/interrupt ID for the specified pin:
Field Summary | |
static int |
DEFAULT_BUS_TIMEOUT
The defualt bus timeout value is: 500 millis. |
static int |
DEFAULT_INTERRUPT_PIN_ID
The defualt INT (interrupt) pin is InterruptController.GPIOA_BIT0_INTERRUPT |
static int |
DEFAULT_SCL_PIN_ID
The defualt SCL pin is GpioPin.GPIOB_BIT4 |
static int |
DEFAULT_SDA_PIN_ID
The defualt SDA pin is GpioPin.GPIOB_BIT5 |
static java.lang.String |
I2C_BUS_TIMEOUT
The system property string to use in order the change the timeout for the I2C bus in milliseconds. |
static java.lang.String |
I2C_INT_PIN_ID
The system property string to use in order the change the INT (interrupt line) pin for the I2C bus. |
static java.lang.String |
I2C_SCL_PIN_ID
The system property string to use in order the change the SCL pin for the I2C bus. |
static java.lang.String |
I2C_SDA_PIN_ID
The system property string to use in order the change the SDA pin for the I2C bus. |
Method Summary | |
static I2CBusMaster |
getBusMasterInstance(int compatibility)
Returns a singleton instance of the bus master for all devices. |
java.lang.String |
getDeviceDestription()
Gets the destription attribute of the Device object |
java.lang.String |
getDeviceName()
Gets the title attribute of the Device object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String I2C_SDA_PIN_ID
cork.i2c.sda.pin.id
public static final java.lang.String I2C_SCL_PIN_ID
cork.i2c.scl.pin.id
public static final java.lang.String I2C_INT_PIN_ID
cork.i2c.scl.pin.id
public static final java.lang.String I2C_BUS_TIMEOUT
cork.i2c.bus.timeout
public static final int DEFAULT_SDA_PIN_ID
public static final int DEFAULT_SCL_PIN_ID
public static final int DEFAULT_INTERRUPT_PIN_ID
public static final int DEFAULT_BUS_TIMEOUT
Method Detail |
public static final I2CBusMaster getBusMasterInstance(int compatibility) throws DeviceException, java.lang.IllegalArgumentException
compatibility
- Description of Parameterjava.lang.IllegalArgumentException
- if the pins where changed
via. the system properties, and there was an error getting the pin ID.DeviceException
- Throws a device exception is
the pins being used for the I2C bus are already in use by another
application.public java.lang.String getDeviceName()
getDeviceName
in interface Device
public java.lang.String getDeviceDestription()
getDeviceDestription
in interface Device
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |