<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.viewtool.com/wiki/index.php?action=history&amp;feed=atom&amp;title=%E5%87%BD%E6%95%B0%EF%BC%9AVII_SlaveReadBytes</id>
		<title>函数：VII SlaveReadBytes - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.viewtool.com/wiki/index.php?action=history&amp;feed=atom&amp;title=%E5%87%BD%E6%95%B0%EF%BC%9AVII_SlaveReadBytes"/>
		<link rel="alternate" type="text/html" href="http://www.viewtool.com/wiki/index.php?title=%E5%87%BD%E6%95%B0%EF%BC%9AVII_SlaveReadBytes&amp;action=history"/>
		<updated>2026-05-09T23:35:41Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.viewtool.com/wiki/index.php?title=%E5%87%BD%E6%95%B0%EF%BC%9AVII_SlaveReadBytes&amp;diff=273556&amp;oldid=prev</id>
		<title>Xuzuolan: Created page with &quot;在从机模式下读取数据，若适配器接收到了数据，则调用该函数后会返回接收到的数据，否则返回ERR_READ_NO_DATA的错误。  ==== 原型 ====...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.viewtool.com/wiki/index.php?title=%E5%87%BD%E6%95%B0%EF%BC%9AVII_SlaveReadBytes&amp;diff=273556&amp;oldid=prev"/>
				<updated>2021-05-10T08:13:25Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;在从机模式下读取数据，若适配器接收到了数据，则调用该函数后会返回接收到的数据，否则返回ERR_READ_NO_DATA的错误。  ==== 原型 ====...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;在从机模式下读取数据，若适配器接收到了数据，则调用该函数后会返回接收到的数据，否则返回ERR_READ_NO_DATA的错误。&lt;br /&gt;
&lt;br /&gt;
==== 原型 ====&lt;br /&gt;
int32_t WINAPI VII_SlaveReadBytes(int32_t DevType,int32_t DevIndex,int32_t I2CIndex,uint8_t* pReadData,uint16_t *pLen);&lt;br /&gt;
==== 参数 ====&lt;br /&gt;
'''DevType''': 设备类型代码，具体取值请参考设备类型定义表。 &amp;lt;br&amp;gt;&lt;br /&gt;
'''DevIndex''': 设备索引号，若当前只有一个设备与电脑连接则索引号为0，若有多个设备与电脑连接则根据实际需要打开的设备设置对应的索引号。 &amp;lt;br&amp;gt;&lt;br /&gt;
'''I2CIndex''': 需要读数据的I2C通道，取值0或者1。 &amp;lt;br&amp;gt;&lt;br /&gt;
'''pReadData''': 数据缓冲区首地址。 &amp;lt;br&amp;gt;&lt;br /&gt;
'''pLen''': 读取到的有效数据字节数。 &amp;lt;br&amp;gt;&lt;br /&gt;
==== 返回值 ====&lt;br /&gt;
程序执行状态，0代表执行相应功能成功，其他返回值含义请参考错误码定义表。&lt;br /&gt;
==== 示例 ====&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;quot;ControlI2C.h&amp;quot;&lt;br /&gt;
 int ret,i;&lt;br /&gt;
 uint8_t read_buffer[512]={0};&lt;br /&gt;
 uint16_t SlaveReadLen;&lt;br /&gt;
 ret = VII_SlaveReadBytes(VII_USBI2C, 0, 0,read_buffer,&amp;amp;SlaveReadLen);&lt;br /&gt;
 if (ret != ERR_SUCCESS){&lt;br /&gt;
 printf(&amp;quot;Slave read data error!\n&amp;quot;);&lt;br /&gt;
 return ret;&lt;br /&gt;
 }else{&lt;br /&gt;
 printf(&amp;quot;Slave Read Data:\n&amp;quot;);&lt;br /&gt;
 for(i=0;i&amp;lt;SlaveReadLen;i++){&lt;br /&gt;
 printf(&amp;quot;%02X &amp;quot;,read_buffer[i]);&lt;br /&gt;
 }&lt;br /&gt;
 printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Xuzuolan</name></author>	</entry>

	</feed>