Share via


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

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

'Declaration
Public Sub WriteRead ( _
    writeBuffer As Byte(), _
    readBuffer As Byte(), _
    startReadOffset As Integer _
)
public void WriteRead(
    byte[] writeBuffer,
    byte[] readBuffer,
    int startReadOffset
)
public:
void WriteRead(
    array<unsigned char>^ writeBuffer, 
    array<unsigned char>^ readBuffer, 
    int startReadOffset
)
member WriteRead : 
        writeBuffer:byte[] * 
        readBuffer:byte[] * 
        startReadOffset:int -> unit 
public function WriteRead(
    writeBuffer : byte[], 
    readBuffer : byte[], 
    startReadOffset : int
)

Parameters

  • writeBuffer
    Type: array<System. . :: . .Byte> [] () [] []
    The buffer that will write to the interface.
  • readBuffer
    Type: array<System. . :: . .Byte> [] () [] []
    The buffer that will store the data that is read from the interface.
  • startReadOffset
    Type: System. . :: . .Int32
    The offset in time, measured in transacted elements from writeBuffer, when to start reading back data into readBuffer.

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.

.NET Framework Security

See Also

Reference

SPI Class

WriteRead Overload

Microsoft.SPOT.Hardware Namespace