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 stringIOException
String write(String data, String charset) throws IOException
data
- bytes (encoded in string) to write to the SPI devicecharset
- character encoding for bytes in stringIOException
ByteBuffer write(ByteBuffer data) throws IOException
data
- bytes to write to the SPI deviceIOException
byte[] write(InputStream input) throws IOException
input
- input stream to read from to get
bytes to write to the SPI deviceIOException
int 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 deviceIOException
byte[] 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 bufferIOException
byte[] write(byte... data) throws IOException
data
- bytes to write to the SPI deviceIOException
short[] 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 bufferIOException
short[] write(short... data) throws IOException
data
- bytes to write to the SPI device (Note: short value should not exceed 255.)IOException
Copyright © 2012–2019 Pi4J. All rights reserved.