<?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=VSI_BlockWriteReadBytes</id>
		<title>VSI BlockWriteReadBytes - 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=VSI_BlockWriteReadBytes"/>
		<link rel="alternate" type="text/html" href="http://www.viewtool.com/wiki/index.php?title=VSI_BlockWriteReadBytes&amp;action=history"/>
		<updated>2026-06-11T13:03:53Z</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=VSI_BlockWriteReadBytes&amp;diff=276977&amp;oldid=prev</id>
		<title>Szmz: /* Prototype */</title>
		<link rel="alternate" type="text/html" href="http://www.viewtool.com/wiki/index.php?title=VSI_BlockWriteReadBytes&amp;diff=276977&amp;oldid=prev"/>
				<updated>2021-05-22T08:26:47Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Prototype&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:26, 22 May 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Prototype ====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Prototype ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;int32_t WINAPI VSI_BlockWriteReadBytes(int32_t DevType,int32_t DevIndex,int32_t SPIIndex,uint8_t *pWriteData,uint16_t WriteBlockSize,&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;br&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;int32_t WINAPI VSI_BlockWriteReadBytes(int32_t DevType,int32_t DevIndex,int32_t SPIIndex,uint8_t *pWriteData,uint16_t WriteBlockSize, uint8_t *pReadData,uint16_t ReadBlockSize,uint16_t BlockNum,uint32_t IntervalTime);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;uint8_t *pReadData,uint16_t ReadBlockSize,uint16_t BlockNum,uint32_t IntervalTime);&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Parameter ====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== Parameter ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Szmz</name></author>	</entry>

	<entry>
		<id>http://www.viewtool.com/wiki/index.php?title=VSI_BlockWriteReadBytes&amp;diff=276976&amp;oldid=prev</id>
		<title>Szmz: /* Example */</title>
		<link rel="alternate" type="text/html" href="http://www.viewtool.com/wiki/index.php?title=VSI_BlockWriteReadBytes&amp;diff=276976&amp;oldid=prev"/>
				<updated>2021-05-22T08:26:26Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 08:26, 22 May 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot; &gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; if(ReadBlockSize){&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; if(ReadBlockSize){&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; for(uint16_t i=0; i&amp;lt;ReadBlockSize; i++){&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; for(uint16_t i=0; i&amp;lt;ReadBlockSize; i++){&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;	&amp;#160; &lt;/del&gt;printf(&amp;quot;%x\n&amp;quot;, pReadData[i]);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &lt;/ins&gt;printf(&amp;quot;%x\n&amp;quot;, pReadData[i]);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;	&lt;/del&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &lt;/ins&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Szmz</name></author>	</entry>

	<entry>
		<id>http://www.viewtool.com/wiki/index.php?title=VSI_BlockWriteReadBytes&amp;diff=276975&amp;oldid=prev</id>
		<title>Szmz: Created page with &quot;Write/Read block data in USB-SPI master mode.  ==== Prototype ==== int32_t WINAPI VSI_BlockWriteReadBytes(int32_t DevType,int32_t DevIndex,int32_t SPIIndex,uint8_t *pWriteData...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.viewtool.com/wiki/index.php?title=VSI_BlockWriteReadBytes&amp;diff=276975&amp;oldid=prev"/>
				<updated>2021-05-22T08:26:00Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Write/Read block data in USB-SPI master mode.  ==== Prototype ==== int32_t WINAPI VSI_BlockWriteReadBytes(int32_t DevType,int32_t DevIndex,int32_t SPIIndex,uint8_t *pWriteData...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Write/Read block data in USB-SPI master mode.&lt;br /&gt;
&lt;br /&gt;
==== Prototype ====&lt;br /&gt;
int32_t WINAPI VSI_BlockWriteReadBytes(int32_t DevType,int32_t DevIndex,int32_t SPIIndex,uint8_t *pWriteData,uint16_t WriteBlockSize,&amp;lt;br&amp;gt;&lt;br /&gt;
uint8_t *pReadData,uint16_t ReadBlockSize,uint16_t BlockNum,uint32_t IntervalTime);&lt;br /&gt;
&lt;br /&gt;
==== Parameter ====&lt;br /&gt;
'''DevType''':Device type code. For detail, please refer to Device Type Definition Table.&amp;lt;br&amp;gt;&lt;br /&gt;
'''DevIndex''':Device index number. Index number 0 indicates only one device is connected with computer. &amp;lt;br&amp;gt;&lt;br /&gt;
In case multiple devices are connected, set index number corresponding to the devices required to be opened.&amp;lt;br&amp;gt;&lt;br /&gt;
'''SPIIndex''':SPI channel index number. Index 0 indicates channel 0,Index 1 indicates channel 1, ... &amp;lt;br&amp;gt;&lt;br /&gt;
'''pWriteData''':Buffer base address of data to write.&amp;lt;br&amp;gt;&lt;br /&gt;
'''WriteBlockSize''':Data bytes pointer to write in master mode. &amp;lt;br&amp;gt;&lt;br /&gt;
'''pReadData''':Buffer base address of data to read.&amp;lt;br&amp;gt;&lt;br /&gt;
'''ReadBlockSize''':Data bytes pointer received in master mode. 0 indicates no data has been received.&amp;lt;br&amp;gt;&lt;br /&gt;
'''BlockNum''':Block number to read.&amp;lt;br&amp;gt;&lt;br /&gt;
'''IntervalTime''':Interval time to execute write and read.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Return code ====&lt;br /&gt;
Program execution state. Parameter 0 indicates related function executes successfully. For other return codes' definition, please refer to Error Code Definition Table.&lt;br /&gt;
==== Example ====&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;quot;ControlSPI.h&amp;quot;&lt;br /&gt;
 int ret;&lt;br /&gt;
 uint8_t pWriteData[1024] = {0}; &lt;br /&gt;
 uint8_t WriteBlockSize=128;&lt;br /&gt;
 &lt;br /&gt;
 uint8_t pReadData[1024] = {0}; &lt;br /&gt;
 uint8_t ReadBlockSize=128; &lt;br /&gt;
 uint8_t BlockNum=1;&lt;br /&gt;
 uint16_t IntervalTime=100;&lt;br /&gt;
 &lt;br /&gt;
 for(uint16_t i=0; i&amp;lt;16){&lt;br /&gt;
    write_buffer[i]=i;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ret = VSI_BlockWriteReadBytes(VSI_USBSPI, 0, pWriteData, WriteBlockSize, pReadData, ReadBlockSize, BlockNum, IntervalTime);&lt;br /&gt;
 if (ret != ERR_SUCCESS){&lt;br /&gt;
   printf(&amp;quot;Block write/read data error!\n&amp;quot;);&lt;br /&gt;
   return ret;&lt;br /&gt;
 }&lt;br /&gt;
  if(ReadBlockSize){&lt;br /&gt;
    for(uint16_t i=0; i&amp;lt;ReadBlockSize; i++){&lt;br /&gt;
	  printf(&amp;quot;%x\n&amp;quot;, pReadData[i]);&lt;br /&gt;
	}&lt;br /&gt;
  }&lt;/div&gt;</summary>
		<author><name>Szmz</name></author>	</entry>

	</feed>