public interface I2CSMBusInterface extends Closeable
Modifier and Type | Interface and Description |
---|---|
static class |
I2CSMBusInterface.NotSupportedException |
Modifier and Type | Field and Description |
---|---|
static int |
MAX_I2C_BLOCK_SIZE |
Modifier and Type | Method and Description |
---|---|
byte[] |
blockProcessCall(int register,
byte[] data,
int length)
SMBus Block Write - Block Read Process Call
SMBus Block Write - Block Read Process Call was introduced in
Revision 2.0 of the specification.
|
void |
close() |
short |
processCall(int register,
short data)
SMBus Process Call:
This command selects a device register (through the Comm byte), sends
16 bits of data to it, and reads 16 bits of data in return.
|
byte[] |
readBlockData(int register)
SMBus Block Read: i2c_smbus_read_block_data()
This command reads a block of up to 32 bytes from a device, from a
designated register that is specified through the Comm byte.
|
byte |
readByte()
SMBus Receive Byte: i2c_smbus_read_byte()
This reads a single byte from a device, without specifying a device
register.
|
byte |
readByteData(int register)
SMBus Read Byte: i2c_smbus_read_byte_data()
This reads a single byte from a device, from a designated register.
|
byte[] |
readBytes(int length) |
byte[] |
readI2CBlockData(int register,
int length)
I2C Block Read: i2c_smbus_read_i2c_block_data()
This command reads a block of bytes from a device, from a
designated register that is specified through the Comm byte.
|
short |
readWordData(int register)
SMBus Read Word: i2c_smbus_read_word_data()
This operation is very like Read Byte; again, data is read from a
device, from a designated register that is specified through the Comm
byte.
|
void |
writeBlockData(int register,
byte[] data)
SMBus Block Write: i2c_smbus_write_block_data()
The opposite of the Block Read command, this writes up to 32 bytes to
a device, to a designated register that is specified through the
Comm byte.
|
void |
writeByte(byte data)
SMBus Send Byte: i2c_smbus_write_byte()
This operation is the reverse of Receive Byte: it sends a single byte
to a device.
|
void |
writeByteData(int register,
byte data)
SMBus Write Byte: i2c_smbus_write_byte_data()
This writes a single byte to a device, to a designated register.
|
void |
writeBytes(byte[] data) |
void |
writeI2CBlockData(int register,
byte[] data)
I2C Block Write: i2c_smbus_write_i2c_block_data()
The opposite of the Block Read command, this writes bytes to
a device, to a designated register that is specified through the
Comm byte.
|
void |
writeWordData(int register,
short data)
SMBus Write Word: i2c_smbus_write_word_data()
This is the opposite of the Read Word operation.
|
static final int MAX_I2C_BLOCK_SIZE
void close()
close
in interface AutoCloseable
close
in interface Closeable
byte readByte()
void writeByte(byte data)
data
- value to writebyte[] readBytes(int length)
void writeBytes(byte[] data)
byte readByteData(int register)
register
- the register to read fromvoid writeByteData(int register, byte data)
register
- the register to write todata
- value to writeshort readWordData(int register)
register
- the register to read fromvoid writeWordData(int register, short data)
register
- the register to write todata
- value to writeshort processCall(int register, short data)
register
- the register to write to / read fromdata
- value to writebyte[] readBlockData(int register)
register
- the register to read fromvoid writeBlockData(int register, byte[] data)
register
- the register to write todata
- values to writebyte[] blockProcessCall(int register, byte[] data, int length)
register
- the register to write todata
- data to writelength
- Lengthbyte[] readI2CBlockData(int register, int length)
register
- the register to read fromlength
- amount of data to readvoid writeI2CBlockData(int register, byte[] data)
register
- the register to write todata
- values to writeCopyright © 2016–2017 mattjlewis. All rights reserved.