Constructor and Description |
---|
FT_4222_I2c_Slave(FT_4222_Device ft4222Device) |
Modifier and Type | Method and Description |
---|---|
int |
getAddress(int[] addr)
Get the address of the I2C slave device.
|
int |
init()
Initialize FT4222H as an I2C slave.
|
int |
read(byte[] buffer,
int sizeToTransfer,
int[] sizeTransferred)
Read data from the buffer of I2C slave device.
|
int |
reset()
Reset the I2C slave device.
|
int |
setAddress(int addr)
Set the address of the I2C slave device.
|
int |
setClockStretch(boolean bValue)
Set clock stretch enable
|
int |
write(byte[] buffer,
int sizeToTransfer,
int[] sizeTransferred)
Write data to the I2C slave device.
|
public FT_4222_I2c_Slave(FT_4222_Device ft4222Device)
public int init()
public int reset()
public int getAddress(int[] addr)
getAddress
in interface I2cSlave
addr
- The address of the I2C slave device.public int setAddress(int addr)
setAddress
in interface I2cSlave
addr
- The 7-bit address of the I2C slave device.public int read(byte[] buffer, int sizeToTransfer, int[] sizeTransferred)
read
in interface I2cSlave
buffer
- Buffer array that receives the data from the device.sizeToTransfer
- Number of bytes to read from the device.sizeTransferred
- The actual number of bytes read from the device.public int write(byte[] buffer, int sizeToTransfer, int[] sizeTransferred)
write
in interface I2cSlave
buffer
- Buffer array that contains the data to be written to the devicesizeToTransfer
- Number of bytes to write to the device.sizeTransferred
- The actual number of bytes written to the device.public int setClockStretch(boolean bValue)
bValue
- true for enable and false for disable