public interface I2CPort extends IOPort, BasicSensorPort
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_IO
Maximum read/write request length
|
BLACK, BLANK_INDEX, BLUE, BLUE_INDEX, BROWN, GREEN, GREEN_INDEX, MAX_TYPE, MIN_TYPE, MODE_RAW, NXT_ADC_RES, RED, RED_INDEX, TYPE_ANGLE, TYPE_COLORBLUE, TYPE_COLORFULL, TYPE_COLORGREEN, TYPE_COLORNONE, TYPE_COLORRED, TYPE_CUSTOM, TYPE_HIGHSPEED, TYPE_HIGHSPEED_9V, TYPE_HISPEED, TYPE_LIGHT_ACTIVE, TYPE_LIGHT_INACTIVE, TYPE_LOWSPEED, TYPE_LOWSPEED_9V, TYPE_NO_SENSOR, TYPE_REFLECTION, TYPE_SOUND_DB, TYPE_SOUND_DBA, TYPE_SWITCH, TYPE_TEMPERATURE, WHITE, YELLOW| Modifier and Type | Method and Description |
|---|---|
void |
i2cTransaction(int deviceAddress,
byte[] writeBuf,
int writeOffset,
int writeLen,
byte[] readBuf,
int readOffset,
int readLen)
High level i2c interface.
|
close, getName, setPinModegetMode, getType, setMode, setType, setTypeAndModestatic final int MAX_IO
void i2cTransaction(int deviceAddress,
byte[] writeBuf,
int writeOffset,
int writeLen,
byte[] readBuf,
int readOffset,
int readLen)
deviceAddress - The I2C device address.writeBuf - The buffer containing data to be written to the device.writeOffset - The offset of the data within the write bufferwriteLen - The number of bytes to write.readBuf - The buffer to use for the transaction resultsreadOffset - Location to write the results toreadLen - The length of the read