II2cDeviceProvider.WriteReadPartial(Byte[], Byte[]) 方法

定义

执行原子操作,将数据写入并读取设备连接到的集成线路 (I2 C) 总线中的数据,并返回有关可用于错误处理的操作成功的信息。

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

参数

writeBuffer

Byte[]

byte[]

一个缓冲区,其中包含要写入 I2 C 设备的数据。 此数据不应包含总线地址。

readBuffer

Byte[]

byte[]

要从 I2 C 总线读取数据的缓冲区。 缓冲区的长度确定要从设备请求的数据量。

返回

ProviderI2cTransferResult

一个结构,包含有关操作的读取和写入部分是否成功以及操作写入的实际字节数和操作读取的实际字节数的信息。

适用于