I2cTransferResult I2cTransferResult I2cTransferResult I2cTransferResult I2cTransferResult Struct

Definition

Provides information about whether the data transfers that the @Windows.Devices.I2c.I2cDevice.ReadPartial(System.Byte[])?text=ReadPartial, @Windows.Devices.I2c.I2cDevice.WritePartial(System.Byte[])?text=WritePartial, or @Windows.Devices.I2c.I2cDevice.WriteReadPartial(System.Byte[],System.Byte[])?text=WriteReadPartial method performed succeeded, and the actual number of bytes the method transferred.

public : struct I2cTransferResult
struct winrt::Windows::Devices::I2c::I2cTransferResult
public struct I2cTransferResult
Public Structure I2cTransferResult
var i2cTransferResult = {

   bytesTransferred: /* Your value */,

   status: /* Your value */

}
Attributes

Windows 10 requirements

Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)

Fields

BytesTransferred BytesTransferred BytesTransferred BytesTransferred BytesTransferred

The actual number of bytes that the operation actually transferred. The following table describes what this value represents for each method.

MethodDescription
@Windows.Devices.I2c.I2cDevice.ReadPartial(System.Byte[])?text=ReadPartial The actual number of bytes that the read operation read into the buffer. If the value of the **Status** member is **I2CTransferStatus.PartialTransfer**, this value may be less than the number of bytes in the buffer that you specified in the *buffer* parameter.
@Windows.Devices.I2c.I2cDevice.WritePartial(System.Byte[])?text=WritePartial The actual number of bytes that the write operation transferred to the I2 C device. If the value of the **Status** member is **I2CTransferStatus.PartialTransfer**, this value may be less than the number of bytes in the buffer that you specified in the *buffer* parameter.
@Windows.Devices.I2c.I2cDevice.WriteReadPartial(System.Byte[],System.Byte[])?text=WriteReadPartial The actual number of bytes that the operation transferred, which is the sum of the number of bytes that the operation wrote and the number of bytes that the operation read. If the value of the **Status** member is **I2CTransferStatus.PartialTransfer**, this value may be less than the sum of lengths of the buffers that you specified in the *writeBuffer* and *readBuffer* parameters.
Status Status Status Status Status

An enumeration value that indicates if the read or write operation transferred the full number of bytes that the method requested, or the reason that the full transfer did not succeed. For @Windows.Devices.I2c.I2cDevice.WriteReadPartial(System.Byte[],System.Byte[])?text=WriteReadPartial, the value indicates whether the data for both the write and the read operations was entirely transferred.

See also