Udostępnij za pośrednictwem


I2cTransferStatus Enum

Definition

Describes whether the data transfers that the ReadPartial, WritePartial, or WriteReadPartial method performed succeeded, or provides the reason that the transfers did not succeed.

public enum class I2cTransferStatus
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.DevicesLowLevelContract, 65536)]
enum class I2cTransferStatus
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.DevicesLowLevelContract), 65536)]
public enum I2cTransferStatus
var value = Windows.Devices.I2c.I2cTransferStatus.fullTransfer
Public Enum I2cTransferStatus
Inheritance
I2cTransferStatus
Attributes

Windows requirements

Device family
Windows IoT Extension SDK (introduced in 10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced in v1.0)

Fields

Name Value Description
FullTransfer 0

The data was entirely transferred. For WriteReadPartial, the data for both the write and the read operations was entirely transferred.

For this status code, the value of the I2cTransferResult.BytesTransferred member that the method returns is the same as the size of the buffer you specified when you called the method, or is equal to the sum of the sizes of two buffers that you specified for WriteReadPartial.

PartialTransfer 1

The I2 C device negatively acknowledged the data transfer before all of the data was transferred.

For this status code, the value of the I2cTransferResult.BytesTransferred member that the method returns is the number of bytes actually transferred. For WriteReadPartial, the value is the sum of the number of bytes that the operation wrote and the number of bytes that the operation read.

SlaveAddressNotAcknowledged 2

The bus address was not acknowledged.

For this status code, the value of the I2cTransferResult.BytesTransferred member that the method returns of the method is 0.

ClockStretchTimeout 3

The transfer failed due to the clock being stretched for too long. Ensure the clock line is not being held low.

UnknownError 4

The transfer failed for an unknown reason.

Applies to

See also