| Constructor and Description |
|---|
FT_4222_I2c_Slave(FT_4222_Device ft4222Device) |
| Modifier and Type | Method and Description |
|---|---|
int |
cmdGet(int wValue1,
int wValue2,
byte[] buf,
int datalen) |
int |
cmdSet(int wValue1,
int wValue2) |
int |
cmdSet(int wValue1,
int wValue2,
byte[] buf,
int datalen) |
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 |
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 cmdSet(int wValue1,
int wValue2)
public int cmdSet(int wValue1,
int wValue2,
byte[] buf,
int datalen)
public int cmdGet(int wValue1,
int wValue2,
byte[] buf,
int datalen)
public int init()
I2cSlavepublic int reset()
I2cSlavepublic int getAddress(int[] addr)
I2cSlavegetAddress in interface I2cSlaveaddr - The address of the I2C slave device.public int setAddress(int addr)
I2cSlavesetAddress in interface I2cSlaveaddr - The 7-bit address of the I2C slave device.public int read(byte[] buffer,
int sizeToTransfer,
int[] sizeTransferred)
I2cSlaveread in interface I2cSlavebuffer - 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)
I2cSlavewrite in interface I2cSlavebuffer - 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.