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 总线读取数据的缓冲区。 缓冲区的长度决定了要从设备请求的数据量。

返回

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

适用于