Share via


SPI.WriteRead Method (Byte[], Byte[], Int32)

Writes an array of bytes to the interface, and reads an array of bytes from the interface into a specified location in the read buffer.

Namespace: Microsoft.SPOT.Hardware
Assembly: Microsoft.SPOT.Hardware (in microsoft.spot.hardware.dll)

Syntax

[MethodImplAttribute]
public void WriteRead (
         byte[] writeBuffer,
         ref byte[] readBuffer,
         intreadOffset
)

Parameters

  • writeBuffer
    The buffer that will write to the interface.
  • readBuffer
    The buffer that will store the data that is read from the interface.
  • readOffset
    The read offset, which is the number of write transactions that will occur before the first read transaction starts.

Remarks

You must size the buffer correctly, according to the specific protocol for the hardware device. Note that this protocol varies from one device to another.

This method uses the interface in 8-bit mode.

Version Information

Available in .NET Micro Framework version 2.0, 2.5

See Also

Reference

SPI Class
SPI Members
Microsoft.SPOT.Hardware Namespace