Connection.WriteAndRead Method
Sends and receives data on the SPI connection.

WriteAndRead(
bytes()
as UInt8,
leaveCsLow
as Boolean)
as UInt8()
Parameters
- bytes()
- The bytes to send.
- leaveCsLow
- Set to true if wanting to leave CS at low.
Returns
- UInt8()
- Equal amount of bytes to the sent bytes is received.
Remarks
The way SPI protocol works then there is always equal amount of bytes sent as there are received. Which may be dummy bytes of course.
This method can throw SPIException.
See Also
Connection Class