|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.wagner_ibw.iow.i2c.AbstractI2CDevice | +--de.wagner_ibw.iow.i2c.PCF8570
This is the implemenation of the PCF8570P device
Field Summary | |
static int |
CLASS
Group 1 part of slave address for PCF8570 (PCF8570 device specific constant). |
static java.lang.String |
NAME
PCF8570 device specific constants. |
int |
RAM_SIZE
Capacity of this RAM. |
Fields inherited from class de.wagner_ibw.iow.i2c.AbstractI2CDevice |
devAdr, iow, MAX_I2C_LENGTH, monitor, readQueue, writeAckQueue |
Constructor Summary | |
PCF8570(int deviceAddress)
Constructor |
Method Summary | |
private void |
checkAddress(int address)
|
boolean |
equals(java.lang.Object o)
Indicates whether some other PCF8570 object is "equal to" this one. |
void |
fillRam(int pattern)
Fills the whole ram with the specified pattern. |
int |
hashCode()
Returns a hash code value for this PCF8570 object. |
int |
read(int address)
|
int[] |
readPage(int address,
int length)
|
void |
setIowDevice(AbstractIowDevcie iow)
Sets the reference to an iow device for write report operations. |
java.lang.String |
toString()
Returns Information about this PCF8570 as String. |
void |
write(int address,
int data)
|
void |
writePage(int address,
int[] data)
|
Methods inherited from class de.wagner_ibw.iow.i2c.AbstractI2CDevice |
getI2cAddress, getName, readI2C, reportReceived, setMonitor, writeI2C |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String NAME
public final int RAM_SIZE
public static final int CLASS
Constructor Detail |
public PCF8570(int deviceAddress) throws java.lang.Exception
deviceAddress
- Group 2 part of slave address (possible values 0...7).
java.lang.Exception
- If anything goes wrong.Method Detail |
public int read(int address) throws java.lang.Exception, java.lang.IllegalArgumentException
address
-
java.lang.Exception
- If any transmission error occurred.
java.lang.IllegalArgumentException
public void write(int address, int data) throws java.lang.Exception, java.lang.IllegalArgumentException
address
- data
-
java.lang.Exception
- If any transmission error occurred.
java.lang.IllegalArgumentException
public void writePage(int address, int[] data) throws java.lang.Exception, java.lang.IllegalArgumentException
address
- data
-
java.lang.Exception
- If any transmission error occurred.
java.lang.IllegalArgumentException
public int[] readPage(int address, int length) throws java.lang.Exception, java.lang.IllegalArgumentException
java.lang.Exception
java.lang.IllegalArgumentException
public void fillRam(int pattern) throws java.lang.Exception
pattern
- Pattern that fills the ram.
java.lang.Exception
- If any transmission error occurred.public void setIowDevice(AbstractIowDevcie iow)
I2CDevice
setIowDevice
in interface I2CDevice
setIowDevice
in class AbstractI2CDevice
iow
- Instance of an iow device.public java.lang.String toString()
toString
in class AbstractI2CDevice
public boolean equals(java.lang.Object o)
equals
in class AbstractI2CDevice
public int hashCode()
hashCode
in class AbstractI2CDevice
private void checkAddress(int address) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |