|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
cork.net.i2c.I2CLineDriver
Default I2C Bus Master. Drives the physical I2C lines for the devices. This class should not be called directly, instead use the methods in the AbstractI2CDevice.
| Method Summary | |
void |
assertEvent(boolean active)
Line change even listener. |
java.lang.String |
getDeviceDestription()
Gets the destription attribute of the Device object |
java.lang.String |
getDeviceName()
Gets the title attribute of the Device object |
void |
read(I2CDevice device,
int id,
int[] buffer,
int count)
Reads data from the specified ID. |
void |
setBusIdalClockTick(boolean ticks)
Sets the busIdalClockTick attribute of the I2CLineDriver object |
void |
start(I2CDevice device)
Description of the Method |
void |
stop(I2CDevice device)
Signals stop communication on the bus. |
void |
tick(I2CDevice device)
ticks the SCL line once. |
void |
triggerEvent()
idle clock ticks... |
void |
write(I2CDevice device,
int id,
int[] buffer,
int count)
Writes data to the specified ID. |
| Methods inherited from interface cork.net.i2c.I2CBusMaster |
capture, isCaptured, release |
| Method Detail |
public void triggerEvent()
public void tick(I2CDevice device)
throws I2CException
tick in interface I2CBusMasterdevice - Description of ParameterI2CException - Description of Exception
public void stop(I2CDevice device)
throws I2CException
stop in interface I2CBusMasterdevice - the device calling the method. the device must have
first captured the bus master.I2CException - Description of Exceptionpublic void assertEvent(boolean active)
active - Description of Parameter
public void read(I2CDevice device,
int id,
int[] buffer,
int count)
throws I2CException
read in interface I2CBusMasterid - the id we're addressing the bytes to.buffer - the buffer that the bytes will be added to.count - the number of bytes to read into the buffer.device - the device wishing to read the BusMaster. This
device must have first captured the BusMaster.I2CException - throws an I2CException is the device has not
captured the BusMaster. Also thrown if the or if there was some other
problem reading from the bus.
public void write(I2CDevice device,
int id,
int[] buffer,
int count)
throws I2CException,
java.lang.ArrayIndexOutOfBoundsException
write in interface I2CBusMasterid - the id we're addressing the bytes
to.buffer - the buffer the the bytes will be
written from.count - the number of bytes ro write.device - the device wishing to write the
BusMaster. This device must have first captured the BusMaster.I2CException - throws an I2CException is the
device has not captured the BusMaster. or if there was some other
problem writing to the bus.java.lang.ArrayIndexOutOfBoundsException - if the count is larger than the
buffer, or the count os less than 1.
public void start(I2CDevice device)
throws I2CException
start in interface I2CBusMasterdevice - Description of ParameterI2CException - Description of Exceptionpublic java.lang.String getDeviceName()
getDeviceName in interface Devicepublic java.lang.String getDeviceDestription()
getDeviceDestription in interface Devicepublic void setBusIdalClockTick(boolean ticks)
ticks - The new busIdalClockTick value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||