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

定义

执行原子操作,将数据写入设备连接的集成电路 (I2 C) 总线,然后从中读取数据,并在写入和读取操作之间发送重启条件。

public:
 void WriteRead(Platform::Array <byte> ^ writeBuffer, Platform::Array <byte> ^ readBuffer);
void WriteRead(winrt::array_view <byte> const& writeBuffer, winrt::array_view <byte> & readBuffer);
public void WriteRead(byte[] writeBuffer, byte[] readBuffer);
function writeRead(writeBuffer, readBuffer)
Public Sub WriteRead (writeBuffer As Byte(), readBuffer As Byte())

参数

writeBuffer

Byte[]

byte[]

包含要写入 I2 C 设备的数据的缓冲区。 此数据不应包括总线地址。

readBuffer

Byte[]

byte[]

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

注解

错误代码

0x80070002

未确认巴士地址。

0x8007045D

I2 C 设备在读取整个缓冲区之前否定了数据传输。

适用于