public class SPIManager
extends java.lang.Object
This manager allows applications to list the available SPI interfaces and
create SPI devices to read/write.
Unless noted, all SPI API methods require the
com.digi.android.permission.SPI permission. If your application does
not have this permission it will not have access to any SPI service feature.
SPI| Constructor and Description |
|---|
SPIManager(android.content.Context context)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
SPI |
createSPI(int interfaceNumber,
int slaveDevice)
Creates and returns an
SPI object with the given interface and
slave device. |
int[] |
listInterfaces()
Lists all the available SPI interface numbers.
|
int[] |
listSlaveDevices(int interfaceNumber)
Lists all the available slave devices of the given SPI interface number.
|
public SPIManager(android.content.Context context)
Instantiates a new object of type SPIManager with the given context.
context - The context to get the internal SPI handler.java.lang.NullPointerException - If context == null.public SPI createSPI(int interfaceNumber, int slaveDevice)
SPI object with the given interface and
slave device.interfaceNumber - Number of the SPI interface adaptor to use.slaveDevice - SPI slave device to communicate with.java.lang.IllegalArgumentException - If interfaceNumber < 0 or
if slaveDevice < 0.listInterfaces(),
SPIpublic int[] listInterfaces()
public int[] listSlaveDevices(int interfaceNumber)
interfaceNumber - The number of the SPI interface to get its slaves.