writeRead
Write data to and read data from SPI device
Add-On Required: This feature requires the MATLAB Support Package for Raspberry Pi Hardware add-on.
Description
[
writes new data to, and reads existing data from, an SPI device. outputData
] = writeRead(myspidevice
,data
,dataPrecision
)
To read data from an SPI device, write data to the device. Supply the
data
argument with the number of values that you expect to
read.
The writeRead
method stops when it finishes writing and
reading the specified data from the device.
This method converts data of all other data types to uint8 for transmission.