⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 igorusb_dll_help.htm

📁 单片机AT90S系列 制作简易USB接口(软件模拟,无usb硬件)。
💻 HTM
📖 第 1 页 / 共 3 页
字号:
</b></font></i>= 3;<br>
&nbsp; <font color="#000080">Public Const</font><font color="#000080"> </font><i><font color="#800000">OVERRUN_ERROR <b>
</b></font></i>= 4;</p>
<p><font color="#000080">Public Declare Function</font> <b><a href="#DoGetInfraCode">DoGetInfraCode</a></b><b><a href="#DoGetInfraCode">
</a></b>Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByRef</font> <font color="#800000"><i><b>TimeCodeDiagram</b></i></font><b><font color="#800000"><i>
</i></font><font color="#000080">As Any</font></b>, <font color="#000080">ByVal</font> 
<font color="#800000"><i><b>DummyInt</b></i></font>
<b><font color="#000080">As Long</font></b>, <font color="#000080">ByRef</font><font color="#800000">
<b><i>DiagramLength </i></b></font><b><font color="#000080">As Long</font></b>) <font color="#0000FF"><b>As
Long</b></font><br>
<font color="#000080">Public </font><font color="#000080">Declare Function</font> <b><a href="#DoSetDataPortDirection">DoSetDataPortDirection</a></b><b><a href="#DoGetInfraCode">
</a></b> Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByVal</font> <font color="#800000"><i><b>DirectionByte</b></i></font><b><font color="#800000"><i>
</i></font></b><b><font color="#000080">As Byte</font></b>) <font color="#0000FF"><b>As
Long</b></font><br>
<font color="#000080">Public </font><font color="#000080">Declare Function</font> <b><a href="#DoGetDataPortDirection">DoGetDataPortDirection</a></b><b><a href="#DoGetInfraCode">
</a></b> Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByRef</font> <font color="#800000"><i><b>DataDirectionByte
</b></i></font><b><font color="#000080">As Byte</font></b>) <font color="#0000FF"><b>As
Long</b></font><br>
<font color="#000080">Public </font><font color="#000080">Declare Function</font> <b><a href="#DoSetOutDataPort">DoSetOutDataPort</a></b><b><a href="#DoGetInfraCode">
</a></b> Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByVal</font> <font color="#800000"><i><b>DataOutByte</b></i></font><b><font color="#800000"><i>
</i></font></b><b><font color="#000080">As Byte</font></b>) <font color="#0000FF"><b>As
Long</b></font><br>
<font color="#000080">Public </font><font color="#000080">Declare Function</font> <b><a href="#DoGetOutDataPort">DoGetOutDataPort</a></b><b><a href="#DoGetInfraCode">
</a></b> Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByRef</font> <font color="#800000"><i><b>DataOutByte</b></i></font><b><font color="#800000"><i>
</i></font></b><b><font color="#000080">As Byte</font></b>) <font color="#0000FF"><b>As
Long</b></font><br>
<font color="#000080">Public </font><font color="#000080">Declare Function</font> <b><a href="#DoGetInDataPort">DoGetInDataPort</a></b><b><a href="#DoGetInfraCode">
</a></b> Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByRef</font> <font color="#800000"><i><b>DataInByte
</b></i></font><b><font color="#000080">As Byte</font></b>) <font color="#0000FF"><b>As
Long</b></font><br>
<font color="#000080">Public </font><font color="#000080">Declare Function</font> <b><a href="#DoEEPROMRead">DoEEPROMRead</a></b><b><a href="#DoGetInfraCode">
</a></b> Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByVal</font> <font color="#800000"><i><b>Address</b></i></font><b><font color="#800000"><i>
</i></font></b><b><font color="#000080">As Byte</font></b>, <font color="#000080">ByRef</font><font color="#800000">
<i><b>DataInByte</b></i></font><b><font color="#800000"><i> </i></font></b><b><font color="#000080">As Byte</font></b>)
<font color="#0000FF"><b>As Long</b></font><br>
<font color="#000080">Public </font><font color="#000080">Declare Function</font> <b><a href="#DoEEPROMWrite">DoEEPROMWrite</a></b><b><a href="#DoGetInfraCode">
</a></b> Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByVal</font> <font color="#800000"><i><b>Address</b></i></font><b><font color="#800000"><i>
</i></font></b><b><font color="#000080">As Byte</font></b>, <font color="#000080">ByVal</font><font color="#800000">
<i><b>DataOutByte</b></i></font><b><font color="#800000"><i> </i></font><font color="#000080">As Byte</font></b>)
<font color="#0000FF"><b>As Long</b></font><br>
<font color="#000080">Public </font><font color="#000080">Declare Function</font> <b><a href="#DoRS232Send">DoRS232Send</a></b><b><a href="#DoGetInfraCode">
</a></b> Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByVal</font> <font color="#800000"><i><b>DataOutByte</b></i></font><b><font color="#800000"><i>
</i></font></b><b><font color="#000080">As Byte</font></b>) <font color="#0000FF"><b>As
Long</b></font><br>
<font color="#000080">Public </font><font color="#000080">Declare Function</font> <b><a href="#DoRS232Read">DoRS232Read</a></b><b><a href="#DoGetInfraCode">
</a></b> Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByRef</font> <font color="#800000"><i><b>DataInByte</b></i></font><b><font color="#800000"><i>
</i></font></b><b><font color="#000080">As Byte</font></b>) <font color="#0000FF"><b>As
Long<br>
</b></font><font color="#000080">Public </font><font color="#000080">Declare Function</font> <b><a href="#DoGetRS232Baud">DoSetRS232Baud</a></b><b><a href="#DoGetInfraCode">
</a></b> Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByVal</font> <b><i><font color="#800000">BaudRate</font></i></b>
<b><font color="#000080">As Long</font></b>) <font color="#0000FF"><b>As Long</b></font><br>
<font color="#000080">Public </font><font color="#000080">Declare Function</font> <b><a href="#DoGetRS232Baud">DoGetRS232Baud</a></b><b><a href="#DoGetInfraCode">
</a></b> Lib &quot;IgorUSB.dll&quot; (<font color="#000080">ByRef</font> <font color="#800000"><i><b>BaudRate
</b></i></font><b><font color="#000080">As Long</font></b>) <font color="#0000FF"><b>As
Long</b></font></p>
<hr>
<hr>
<p><font color="#000080">
function</font> <b><a name="DoGetInfraCode">DoGetInfraCode</a></b>(<font color="#000080">var</font>
<font color="#800000"><i><b>TimeCodeDiagram</b></i></font>:<font color="#000080"><b>array of
byte</b></font>; <font color="#000080"> var</font> <font color="#800000"><i><b>DiagramLength</b></i></font>:<font color="#000080"><b>integer</b></font>):<font color="#0000FF"><b>integer</b></font>;
<font color="#000080"> stdcall</font> <font color="#000080"> external</font> <font color="#800000"><i><b> IgorUSBDLL</b></i></font> name '<font color="#FF00FF">DoGetInfraCode</font>';</p>
<p>&nbsp;&nbsp;&nbsp; Function reads last received Infrared Code from
microcontrollers infrared buffer and frees this infrared buffer.<br>
<u>Parameters</u><br>
&nbsp;&nbsp; <i>TimeCodeDiagram</i>&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [out] Array of bytes for infrared
code storing. Every byte in this array represents duration of one signal level (H or
L level). Duration<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is in 85.3us steps (e.g. number 10
represents 853us duration of L or H level). Last number in array (with index <i>DiagramLength</i>)
has<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; L level and the levels alternates in array (LHL.....HLHLHL).
Maximum length of this array is 256.<br>
&nbsp;&nbsp;&nbsp; <i>DiagramLength<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </i>[out] Length of returned <i>TimeCodeDiagram</i>
array.
If <i>DiagramLength=0</i> then no code was received since last request.</p>
<p><u>Return values</u><b><br>
&nbsp;&nbsp;&nbsp; </b>If the function succeeds, the return value is <i>NO_ERROR</i>.<br>
<i><b><font color="#800000">&nbsp;&nbsp;&nbsp;</font></b></i> If the function
fails, the return value is <i>DEVICE_NOT_PRESENT</i> (device is disconnected).</p>
<p><u>Notes:</u><br>
&nbsp;&nbsp;&nbsp; Microcontroller stores infrared code into its internal
buffer. If another code was received before reading stored code from
microcontroller<br>
&nbsp;&nbsp;&nbsp; by this function, then the second (3-th, 4-th, ...) code are
lost.</p>
<hr>
<p><font color="#000080">
function</font> <b><a name="DoSetDataPortDirection">DoSetDataPortDirection</a></b>(<font color="#800000"><i><b>DirectionByte</b></i></font>:<font color="#000080"><b>byte</b></font>):<font color="#0000FF"><b>integer</b></font>;
<font color="#000080"> stdcall</font>;</p>
<p>&nbsp;&nbsp;&nbsp; Function sets transfer direction of microcontroller data
pins (D0-D7).<br>
Parameters<br>
&nbsp;&nbsp; <i>DirectionByte</i>&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [in] Byte which bits represents
direction of given microcontroller pin. Bit value 1 represents output and bit
value 0 represents input.</p>
<p><u>Return values</u><b><br>
&nbsp;&nbsp;&nbsp; </b>If the function succeeds, the return value is <i>NO_ERROR</i>.<br>
<i><b><font color="#800000">&nbsp;&nbsp;&nbsp;</font></b></i> If the function
fails, the return value is <i>DEVICE_NOT_PRESENT</i> (device is disconnected).</p>
<hr>
<p><font color="#000080">
function</font> <b><a name="DoGetDataPortDirection">DoGetDataPortDirection</a></b>(<font color="#000080">var</font>
<font color="#800000"><i><b>DataDirectionByte</b></i></font>:<font color="#000080"><b>byte</b></font>):<font color="#0000FF"><b>integer</b></font>;
<font color="#000080"> stdcall;</font> </p>
<p>&nbsp;&nbsp;&nbsp; Function reads transfer direction of microcontroller data
pins (D0-D7).<br>
<u>Parameters</u><br>
&nbsp;&nbsp; <i>DataDirectionByte</i><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [in] Byte which bits represents
direction of microcontroller data pins.&nbsp;Bit value 1 represents output and bit
value 0 represents input.</p>
<p><u>Return values</u><b><br>
&nbsp;&nbsp;&nbsp; </b>If the function succeeds, the return value is <i>NO_ERROR</i>.<br>
<i><b><font color="#800000">&nbsp;&nbsp;&nbsp;</font></b></i> If the function
fails, the return value is <i>DEVICE_NOT_PRESENT</i> (device is disconnected).</p>
<hr>
<p><font color="#000080">
function</font> <b><a name="DoSetOutDataPort">DoSetOutDataPort</a></b>(<font color="#800000"><i><b>DataOutByte</b></i></font>:<font color="#000080"><b>byte</b></font>):<font color="#0000FF"><b>integer</b></font>;
<font color="#000080"> stdcall</font>;</p>
<p>&nbsp;&nbsp;&nbsp; Function sets given state on microcontroller output data
pins or set pull-up resistors on microcontroller input data pins (D0-D7).<br>
<u>Parameters</u><br>
&nbsp;&nbsp; <i>DataOutByte</i><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [in] Byte which bits represents
output levels on data pins - if pins are in output direction. If data pin(s) are in input
direction<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then bit value 1 switch on pull-up
resistor and bit value 0 switch off pull-up resistor (high impedance input) on
input data pin.</p>
<p><u>Return values</u><b><br>
&nbsp;&nbsp;&nbsp; </b>If the function succeeds, the return value is <i>NO_ERROR</i>.<br>
<i><b><font color="#800000">&nbsp;&nbsp;&nbsp;</font></b></i> If the function
fails, the return value is <i>DEVICE_NOT_PRESENT</i> (device is disconnected).</p>
<hr>
<p><font color="#000080">
function</font> <b><a name="DoGetOutDataPort">DoGetOutDataPort</a></b>(<font color="#000080">var</font>
<font color="#800000"><i><b>DataOutByte</b></i></font>:<font color="#000080"><b>byte</b></font>):<font color="#0000FF"><b>integer</b></font>;
<font color="#000080"> stdcall</font>;</p>
<p>&nbsp;&nbsp;&nbsp; Function reads state of microcontroller output
level/pull-up values.<br>
<u>Parameters</u><br>
&nbsp;&nbsp; <i>DataOutByte</i><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [out] Byte which bits represents
output levels written to data pins - if pins are in output direction. If pin(s) are

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -