public interface SpiDevice
| Modifier and Type | Field and Description |
|---|---|
static SpiMode |
DEFAULT_SPI_MODE |
static int |
DEFAULT_SPI_SPEED |
static int |
MAX_SUPPORTED_BYTES |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
write(byte... data)
Attempts to read/write data through this SPI device
|
byte[] |
write(byte[] data,
int start,
int length)
Attempts to read/write data through this SPI device
|
ByteBuffer |
write(ByteBuffer data)
Attempts to read/write data through this SPI device
|
byte[] |
write(InputStream input)
Attempts to read/write data through this SPI device
|
int |
write(InputStream input,
OutputStream output)
Attempts to read/write data through this SPI device
|
short[] |
write(short... data)
Attempts to read/write data through this SPI device
|
short[] |
write(short[] data,
int start,
int length)
Attempts to read/write data through this SPI device
|
String |
write(String data,
Charset charset)
Attempts to read/write data through this SPI device
|
String |
write(String data,
String charset)
Attempts to read/write data through this SPI device
|
static final SpiMode DEFAULT_SPI_MODE
static final int DEFAULT_SPI_SPEED
static final int MAX_SUPPORTED_BYTES
String write(String data, Charset charset) throws IOException
data - bytes (encoded in string) to write to the SPI devicecharset - character encoding for bytes in stringIOExceptionString write(String data, String charset) throws IOException
data - bytes (encoded in string) to write to the SPI devicecharset - character encoding for bytes in stringIOExceptionByteBuffer write(ByteBuffer data) throws IOException
data - bytes to write to the SPI deviceIOExceptionbyte[] write(InputStream input) throws IOException
input - input stream to read from to get
bytes to write to the SPI deviceIOExceptionint write(InputStream input, OutputStream output) throws IOException
input - input stream to read from to get
bytes to write to the SPI deviceoutput - output stream to write bytes
read from the SPI deviceIOExceptionbyte[] write(byte[] data, int start, int length) throws IOException
data - bytes to write to the SPI devicestart - start index position in the data buffer to start writing fromlength - length of bytes to write from the data bufferIOExceptionbyte[] write(byte... data) throws IOException
data - bytes to write to the SPI deviceIOExceptionshort[] write(short[] data, int start, int length) throws IOException
data - bytes to write to the SPI devicestart - start index position in the data buffer to start writing fromlength - length of bytes to write from the data bufferIOExceptionshort[] write(short... data) throws IOException
data - bytes to write to the SPI device (Note: short value should not exceed 255.)IOExceptionCopyright © 2012–2019 Pi4J. All rights reserved.