public interface I2C extends MetaWearBoard.Module
Modifier and Type | Interface and Description |
---|---|
static interface |
I2C.SourceSelector
Selector for the I2C data sources
|
Modifier and Type | Method and Description |
---|---|
AsyncOperation<byte[]> |
readData(byte deviceAddr,
byte registerAddr,
byte numBytes)
Read data via the I2C bus and stream result to user.
|
void |
readData(byte deviceAddr,
byte registerAddr,
byte numBytes,
byte id)
Read data via the I2C bus.
|
I2C.SourceSelector |
routeData()
Initiates the creation of a data route
|
void |
writeData(byte deviceAddr,
byte registerAddr,
byte[] data)
Write data via the I2C bus without attaching a user id to the data.
|
void writeData(byte deviceAddr, byte registerAddr, byte[] data)
deviceAddr
- Device to write toregisterAddr
- Device's register to write todata
- Data to write, up to 10 bytesAsyncOperation<byte[]> readData(byte deviceAddr, byte registerAddr, byte numBytes)
deviceAddr
- Device to read fromregisterAddr
- Device's register to readnumBytes
- Number of bytes to readvoid readData(byte deviceAddr, byte registerAddr, byte numBytes, byte id)
deviceAddr
- Device to read fromregisterAddr
- Device's register to readnumBytes
- User id identifying the dataid
- Number of bytes to readI2C.SourceSelector.fromId(byte, byte)
I2C.SourceSelector routeData()