public class I2CManager
extends java.lang.Object
This manager allows applications to list the available I2C interfaces and
create I2C
devices to read/write.
Unless noted, all I2C API methods require the
com.digi.android.permission.I2C
permission. If your application does
not have this permission it will not have access to any I2C service feature.
I2C
Constructor | Description |
---|---|
I2CManager(android.content.Context context) |
Modifier and Type | Method | Description |
---|---|---|
I2C |
createI2C(int interfaceNumber) |
Creates and returns an
I2C object with the given interface number. |
int[] |
listInterfaces() |
Lists all available I2C interface numbers in the device.
|
public I2C createI2C(int interfaceNumber)
I2C
object with the given interface number.interfaceNumber
- Number of the I2C interface to use.java.lang.IllegalArgumentException
- If interfaceNumber < 0
.listInterfaces()
,
I2C
public int[] listInterfaces()