Share via


II2cDeviceProvider.WriteReadPartial(Byte[], Byte[]) Method

Definition

Performs an atomic operation to write data to and then read data from the inter-integrated circuit (I2 C) bus on which the device is connected, and returns information about the success of the operation that you can use for error handling.

public:
 ProviderI2cTransferResult WriteReadPartial(Platform::Array <byte> ^ writeBuffer, Platform::Array <byte> ^ readBuffer);
ProviderI2cTransferResult WriteReadPartial(winrt::array_view <byte> const& writeBuffer, winrt::array_view <byte> & readBuffer);
public ProviderI2cTransferResult WriteReadPartial(byte[] writeBuffer, byte[] readBuffer);
function writeReadPartial(writeBuffer, readBuffer)
Public Function WriteReadPartial (writeBuffer As Byte(), readBuffer As Byte()) As ProviderI2cTransferResult

Parameters

writeBuffer

Byte[]

byte[]

A buffer that contains the data that you want to write to the I2 C device. This data should not include the bus address.

readBuffer

Byte[]

byte[]

The buffer to which you want to read the data from the I2 C bus. The length of the buffer determines how much data to request from the device.

Returns

A structure that contains information about whether both the read and write parts of the operation succeeded and the sum of the actual number of bytes that the operation wrote and the actual number of bytes that the operation read.

Applies to