I2cDevice.WriteRead(Byte[], Byte[]) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
执行原子操作,将数据写入设备 (连接的 I 2 C) 总线,然后从连接设备的 I2 C 总线的集成线路中写入数据,并在写入操作和读取操作之间发送重启条件。
public:
virtual void WriteRead(Platform::Array <byte> ^ writeBuffer, Platform::Array <byte> ^ readBuffer) = WriteRead;
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 总线读取数据的缓冲区。 缓冲区的长度决定了要从设备请求的数据量。
Windows 要求
应用功能 |
lowLevel
|
注解
错误代码
0x80070002
未确认总线地址。
0x8007045D
I2 C 设备在读取整个缓冲区之前消极地确认了数据传输。