OpenCores
URL https://opencores.org/ocsvn/usb_fpga_2_14/usb_fpga_2_14/trunk

Subversion Repositories usb_fpga_2_14

[/] [usb_fpga_2_14/] [trunk/] [docs/] [java/] [ztex/] [Ztex1.html] - Rev 2

Compare with Previous | Blame | View Log

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc (version 1.7.0_79) on Wed Mar 22 19:20:12 CET 2017 -->
<title>Ztex1</title>
<meta name="date" content="2017-03-22">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Ztex1";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../ztex/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../ztex/UsbException.html" title="class in ztex"><span class="strong">Prev Class</span></a></li>
<li><a href="../ztex/Ztex1v1.html" title="class in ztex"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?ztex/Ztex1.html" target="_top">Frames</a></li>
<li><a href="Ztex1.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">ztex</div>
<h2 title="Class Ztex1" class="title">Class Ztex1</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>ztex.Ztex1</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../ztex/Ztex1v1.html" title="class in ztex">Ztex1v1</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">Ztex1</span>
extends java.lang.Object</pre>
<div class="block">This class implements the interface-independent part of the communication protocol for the interaction with the ZTEX firmware.<p>
 All firmware implementations that provide the ZTEX descriptor 1 are supported.
 A description of this descriptor can be found in <a href="../ztex/ZtexDevice1.html" title="class in ztex"><code>ZtexDevice1</code></a>.
 <p>
 The most important features of this class are the functions for uploading the firmware
 and the renumeration management.
 <p>
 The interface dependent part of the communication protocol (currently only one is supported)
 can be found in <a href="../ztex/Ztex1v1.html" title="class in ztex"><code>Ztex1v1</code></a>.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../ztex/ZtexDevice1.html" title="class in ztex"><code>ZtexDevice1</code></a>, 
<a href="../ztex/Ztex1v1.html" title="class in ztex"><code>Ztex1v1</code></a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#controlMsgTimeout">controlMsgTimeout</a></strong></code>
<div class="block">The timeout for  control messages in ms.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../ztex/Ztex1.html#Ztex1(ztex.ZtexDevice1)">Ztex1</a></strong>(<a href="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</a>&nbsp;pDev)</code>
<div class="block">Constructs an instance from a given device.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.nio.ByteBuffer</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#allocateByteBuffer(byte[])">allocateByteBuffer</a></strong>(byte[]&nbsp;buf)</code>
<div class="block">Utility function that creates a ByteBuffer from byte array.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.nio.ByteBuffer</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#allocateByteBuffer(byte[],%20int,%20int)">allocateByteBuffer</a></strong>(byte[]&nbsp;buf,
                  int&nbsp;offs,
                  int&nbsp;length)</code>
<div class="block">Utility function that creates a ByteBuffer from byte array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#bulkRead(int,%20byte[],%20int,%20long)">bulkRead</a></strong>(int&nbsp;ep,
        byte[]&nbsp;buf,
        int&nbsp;maxlen,
        long&nbsp;timeout)</code>
<div class="block">Wrapper method for LibUsb.bulkTransfer(DeviceHandle,byte,ByteBuffer,IntBuffer,long).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#bulkRead(int,%20java.nio.ByteBuffer,%20long)">bulkRead</a></strong>(int&nbsp;ep,
        java.nio.ByteBuffer&nbsp;buffer,
        long&nbsp;timeout)</code>
<div class="block">Wrapper method for LibUsb.bulkTransfer(DeviceHandle,byte,ByteBuffer,IntBuffer,long).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#bulkWrite(int,%20byte[],%20int,%20long)">bulkWrite</a></strong>(int&nbsp;ep,
         byte[]&nbsp;buf,
         int&nbsp;length,
         long&nbsp;timeout)</code>
<div class="block">Wrapper method for LibUsb.bulkTransfer(DeviceHandle,byte,ByteBuffer,IntBuffer,long).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#bulkWrite(int,%20java.nio.ByteBuffer,%20long)">bulkWrite</a></strong>(int&nbsp;ep,
         java.nio.ByteBuffer&nbsp;buffer,
         long&nbsp;timeout)</code>
<div class="block">Wrapper method for ibUsb.bulkTransfer(DeviceHandle,byte,ByteBuffer,IntBuffer,long).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#checkValid()">checkValid</a></strong>()</code>
<div class="block">Checks whether ZTEX descriptor 1 is available.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#claimInterface(int)">claimInterface</a></strong>(int&nbsp;iface)</code>
<div class="block">Claims an interface.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</a></code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#dev()">dev</a></strong>()</code>
<div class="block">Returns the corresponding <a href="../ztex/ZtexDevice1.html" title="class in ztex"><code>ZtexDevice1</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#dispose()">dispose</a></strong>()</code>
<div class="block">This should be called if the class is not used anymore.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#finalize()">finalize</a></strong>()</code>
<div class="block">Releases all resources.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#getInterfaceClaimed(int)">getInterfaceClaimed</a></strong>(int&nbsp;iface)</code>
<div class="block">Returns true if interface is claimed.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>org.usb4java.DeviceHandle</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#handle()">handle</a></strong>()</code>
<div class="block">Returns the USB file handle.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#init()">init</a></strong>()</code>
<div class="block">Initializates the class.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#releaseInterface(int)">releaseInterface</a></strong>(int&nbsp;iface)</code>
<div class="block">Releases an interface.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#resetDevice(boolean)">resetDevice</a></strong>(boolean&nbsp;force)</code>
<div class="block">Performs a configuration or bus reset.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#resetEzUsb()">resetEzUsb</a></strong>()</code>
<div class="block">Resets the EZ-USB and manages the renumeration process.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#setConfiguration(int)">setConfiguration</a></strong>(int&nbsp;config)</code>
<div class="block">Sets the configuration.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#toString()">toString</a></strong>()</code>
<div class="block">Returns a lot of useful information about the corresponding device.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#trySetConfiguration(int)">trySetConfiguration</a></strong>(int&nbsp;config)</code>
<div class="block">Tries to set the configuration.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#uploadFirmware(java.io.InputStream,%20java.lang.String,%20boolean)">uploadFirmware</a></strong>(java.io.InputStream&nbsp;imgIn,
              java.lang.String&nbsp;name,
              boolean&nbsp;force)</code>
<div class="block">Uploads the firmware to the EZ-USB and manages the renumeration process.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#uploadFirmware(java.lang.String,%20boolean)">uploadFirmware</a></strong>(java.lang.String&nbsp;imgFileName,
              boolean&nbsp;force)</code>
<div class="block">Uploads the firmware to the EZ-USB and manages the renumeration process.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#uploadFirmware(ztex.ZtexImgFile1,%20boolean)">uploadFirmware</a></strong>(<a href="../ztex/ZtexImgFile1.html" title="class in ztex">ZtexImgFile1</a>&nbsp;imgFile,
              boolean&nbsp;force)</code>
<div class="block">Uploads the firmware to the EZ-USB and manages the renumeration process.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#valid()">valid</a></strong>()</code>
<div class="block">Returns true if ZTEX descriptor 1 is available.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorCommand(int,%20java.lang.String)">vendorCommand</a></strong>(int&nbsp;cmd,
             java.lang.String&nbsp;func)</code>
<div class="block">Sends a vendor command with no payload data and no setup data to Endpoint 0 of the EZ-USB device.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorCommand(int,%20java.lang.String,%20int,%20int)">vendorCommand</a></strong>(int&nbsp;cmd,
             java.lang.String&nbsp;func,
             int&nbsp;value,
             int&nbsp;index)</code>
<div class="block">Sends a vendor command with no payload data to Endpoint 0 of the EZ-USB device.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorCommand(int,%20java.lang.String,%20int,%20int,%20byte[],%20int)">vendorCommand</a></strong>(int&nbsp;cmd,
             java.lang.String&nbsp;func,
             int&nbsp;value,
             int&nbsp;index,
             byte[]&nbsp;buf,
             int&nbsp;length)</code>
<div class="block">Sends a vendor command to Endpoint 0 of the EZ-USB device.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorCommand(int,%20java.lang.String,%20int,%20int,%20java.nio.ByteBuffer)">vendorCommand</a></strong>(int&nbsp;cmd,
             java.lang.String&nbsp;func,
             int&nbsp;value,
             int&nbsp;index,
             java.nio.ByteBuffer&nbsp;buf)</code>
<div class="block">Sends a vendor command to Endpoint 0 of the EZ-USB device.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorCommand2(int,%20java.lang.String,%20int,%20int,%20byte[],%20int)">vendorCommand2</a></strong>(int&nbsp;cmd,
              java.lang.String&nbsp;func,
              int&nbsp;value,
              int&nbsp;index,
              byte[]&nbsp;buf,
              int&nbsp;length)</code>
<div class="block">Sends a vendor command to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been sent.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorCommand2(int,%20java.lang.String,%20int,%20int,%20java.nio.ByteBuffer)">vendorCommand2</a></strong>(int&nbsp;cmd,
              java.lang.String&nbsp;func,
              int&nbsp;value,
              int&nbsp;index,
              java.nio.ByteBuffer&nbsp;buf)</code>
<div class="block">Sends a vendor command to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been sent.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorRequest(int,%20java.lang.String,%20byte[],%20int)">vendorRequest</a></strong>(int&nbsp;cmd,
             java.lang.String&nbsp;func,
             byte[]&nbsp;buf,
             int&nbsp;maxlen)</code>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorRequest(int,%20java.lang.String,%20java.nio.ByteBuffer)">vendorRequest</a></strong>(int&nbsp;cmd,
             java.lang.String&nbsp;func,
             java.nio.ByteBuffer&nbsp;buf)</code>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorRequest(int,%20java.lang.String,%20int,%20int,%20byte[],%20int)">vendorRequest</a></strong>(int&nbsp;cmd,
             java.lang.String&nbsp;func,
             int&nbsp;value,
             int&nbsp;index,
             byte[]&nbsp;buf,
             int&nbsp;maxlen)</code>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorRequest(int,%20java.lang.String,%20int,%20int,%20java.nio.ByteBuffer)">vendorRequest</a></strong>(int&nbsp;cmd,
             java.lang.String&nbsp;func,
             int&nbsp;value,
             int&nbsp;index,
             java.nio.ByteBuffer&nbsp;buf)</code>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorRequest2(int,%20java.lang.String,%20byte[],%20int)">vendorRequest2</a></strong>(int&nbsp;cmd,
              java.lang.String&nbsp;func,
              byte[]&nbsp;buf,
              int&nbsp;maxlen)</code>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been received.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorRequest2(int,%20java.lang.String,%20java.nio.ByteBuffer)">vendorRequest2</a></strong>(int&nbsp;cmd,
              java.lang.String&nbsp;func,
              java.nio.ByteBuffer&nbsp;buf)</code>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been received.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorRequest2(int,%20java.lang.String,%20int,%20int,%20byte[],%20int)">vendorRequest2</a></strong>(int&nbsp;cmd,
              java.lang.String&nbsp;func,
              int&nbsp;value,
              int&nbsp;index,
              byte[]&nbsp;buf,
              int&nbsp;maxlen)</code>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been received.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../ztex/Ztex1.html#vendorRequest2(int,%20java.lang.String,%20int,%20int,%20java.nio.ByteBuffer)">vendorRequest2</a></strong>(int&nbsp;cmd,
              java.lang.String&nbsp;func,
              int&nbsp;value,
              int&nbsp;index,
              java.nio.ByteBuffer&nbsp;buf)</code>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been received.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="controlMsgTimeout">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>controlMsgTimeout</h4>
<pre>public&nbsp;int controlMsgTimeout</pre>
<div class="block">The timeout for  control messages in ms.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="Ztex1(ztex.ZtexDevice1)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Ztex1</h4>
<pre>public&nbsp;Ztex1(<a href="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</a>&nbsp;pDev)
      throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Constructs an instance from a given device.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>pDev</code> - The given device.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if an communication error occurred.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="init()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>init</h4>
<pre>protected&nbsp;void&nbsp;init()
             throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Initializates the class.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if an communication error occurred.</dd></dl>
</li>
</ul>
<a name="dispose()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dispose</h4>
<pre>public&nbsp;void&nbsp;dispose()</pre>
<div class="block">This should be called if the class is not used anymore. 
 It closes the USB connection and releases all resources</div>
</li>
</ul>
<a name="finalize()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>finalize</h4>
<pre>protected&nbsp;void&nbsp;finalize()
                 throws java.lang.Throwable</pre>
<div class="block">Releases all resources.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>finalize</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.Throwable</code></dd></dl>
</li>
</ul>
<a name="handle()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handle</h4>
<pre>public final&nbsp;org.usb4java.DeviceHandle&nbsp;handle()</pre>
<div class="block">Returns the USB file handle.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the USB file handle.</dd></dl>
</li>
</ul>
<a name="dev()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dev</h4>
<pre>public final&nbsp;<a href="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</a>&nbsp;dev()</pre>
<div class="block">Returns the corresponding <a href="../ztex/ZtexDevice1.html" title="class in ztex"><code>ZtexDevice1</code></a>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the corresponding <a href="../ztex/ZtexDevice1.html" title="class in ztex"><code>ZtexDevice1</code></a>.</dd></dl>
</li>
</ul>
<a name="valid()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>valid</h4>
<pre>public&nbsp;boolean&nbsp;valid()</pre>
<div class="block">Returns true if ZTEX descriptor 1 is available.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if ZTEX descriptor 1 is available.</dd></dl>
</li>
</ul>
<a name="checkValid()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkValid</h4>
<pre>public&nbsp;void&nbsp;checkValid()
                throws <a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a></pre>
<div class="block">Checks whether ZTEX descriptor 1 is available.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a></code> - if ZTEX descriptor 1 is not available.</dd></dl>
</li>
</ul>
<a name="vendorCommand(int, java.lang.String, int, int, java.nio.ByteBuffer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorCommand</h4>
<pre>public&nbsp;int&nbsp;vendorCommand(int&nbsp;cmd,
                java.lang.String&nbsp;func,
                int&nbsp;value,
                int&nbsp;index,
                java.nio.ByteBuffer&nbsp;buf)
                  throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor command to Endpoint 0 of the EZ-USB device.
 The command may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The command number (0..255).</dd><dd><code>func</code> - The name of the command. This string is used for the generation of error messages.</dd><dd><code>value</code> - The value (0..65535), i.e bytes 2 and 3 of the setup data.</dd><dd><code>index</code> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.</dd><dd><code>buf</code> - The payload data buffer. The full buffer is sent, i.e. transfer size is equal to buffer capacity.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of bytes sent.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd></dl>
</li>
</ul>
<a name="vendorCommand(int, java.lang.String, int, int, byte[], int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorCommand</h4>
<pre>public&nbsp;int&nbsp;vendorCommand(int&nbsp;cmd,
                java.lang.String&nbsp;func,
                int&nbsp;value,
                int&nbsp;index,
                byte[]&nbsp;buf,
                int&nbsp;length)
                  throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor command to Endpoint 0 of the EZ-USB device.
 The command may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The command number (0..255).</dd><dd><code>func</code> - The name of the command. This string is used for the generation of error messages.</dd><dd><code>value</code> - The value (0..65535), i.e bytes 2 and 3 of the setup data.</dd><dd><code>index</code> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.</dd><dd><code>length</code> - The size of the payload data (0..65535), i.e. bytes 6 and 7 of the setup data.</dd><dd><code>buf</code> - The payload data buffer.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of bytes sent.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd></dl>
</li>
</ul>
<a name="vendorCommand(int, java.lang.String, int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorCommand</h4>
<pre>public&nbsp;int&nbsp;vendorCommand(int&nbsp;cmd,
                java.lang.String&nbsp;func,
                int&nbsp;value,
                int&nbsp;index)
                  throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor command with no payload data to Endpoint 0 of the EZ-USB device.
 The command may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The command number (0..255).</dd><dd><code>func</code> - The name of the command. This string is used for the generation of error messages.</dd><dd><code>value</code> - The value (0..65535), i.e bytes 2 and 3 of the setup data.</dd><dd><code>index</code> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of bytes sent.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd></dl>
</li>
</ul>
<a name="vendorCommand(int, java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorCommand</h4>
<pre>public&nbsp;int&nbsp;vendorCommand(int&nbsp;cmd,
                java.lang.String&nbsp;func)
                  throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor command with no payload data and no setup data to Endpoint 0 of the EZ-USB device.
 The command may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The command number (0..255).</dd><dd><code>func</code> - The name of the command. This string is used for the generation of error messages.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of bytes sent.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd></dl>
</li>
</ul>
<a name="vendorRequest(int, java.lang.String, int, int, java.nio.ByteBuffer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorRequest</h4>
<pre>public&nbsp;int&nbsp;vendorRequest(int&nbsp;cmd,
                java.lang.String&nbsp;func,
                int&nbsp;value,
                int&nbsp;index,
                java.nio.ByteBuffer&nbsp;buf)
                  throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device.
 The request may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The request number (0..255).</dd><dd><code>func</code> - The name of the request. This string is used for the generation of error messages.</dd><dd><code>value</code> - The value (0..65535), i.e bytes 2 and 3 of the setup data.</dd><dd><code>index</code> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.</dd><dd><code>buf</code> - The payload data buffer. Buffer capacity determines the length of the transfer.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of bytes received.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd></dl>
</li>
</ul>
<a name="vendorRequest(int, java.lang.String, int, int, byte[], int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorRequest</h4>
<pre>public&nbsp;int&nbsp;vendorRequest(int&nbsp;cmd,
                java.lang.String&nbsp;func,
                int&nbsp;value,
                int&nbsp;index,
                byte[]&nbsp;buf,
                int&nbsp;maxlen)
                  throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device.
 The request may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The request number (0..255).</dd><dd><code>func</code> - The name of the request. This string is used for the generation of error messages.</dd><dd><code>value</code> - The value (0..65535), i.e bytes 2 and 3 of the setup data.</dd><dd><code>index</code> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.</dd><dd><code>maxlen</code> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.</dd><dd><code>buf</code> - The payload data buffer.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of bytes received.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd></dl>
</li>
</ul>
<a name="vendorRequest(int, java.lang.String, java.nio.ByteBuffer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorRequest</h4>
<pre>public&nbsp;int&nbsp;vendorRequest(int&nbsp;cmd,
                java.lang.String&nbsp;func,
                java.nio.ByteBuffer&nbsp;buf)
                  throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device.
 The request may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The request number (0..255).</dd><dd><code>func</code> - The name of the request. This string is used for the generation of error messages.</dd><dd><code>buf</code> - The payload data buffer.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of bytes sent.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd></dl>
</li>
</ul>
<a name="vendorRequest(int, java.lang.String, byte[], int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorRequest</h4>
<pre>public&nbsp;int&nbsp;vendorRequest(int&nbsp;cmd,
                java.lang.String&nbsp;func,
                byte[]&nbsp;buf,
                int&nbsp;maxlen)
                  throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device.
 The request may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The request number (0..255).</dd><dd><code>func</code> - The name of the request. This string is used for the generation of error messages.</dd><dd><code>maxlen</code> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.</dd><dd><code>buf</code> - The payload data buffer.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of bytes sent.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd></dl>
</li>
</ul>
<a name="vendorCommand2(int, java.lang.String, int, int, java.nio.ByteBuffer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorCommand2</h4>
<pre>public&nbsp;void&nbsp;vendorCommand2(int&nbsp;cmd,
                  java.lang.String&nbsp;func,
                  int&nbsp;value,
                  int&nbsp;index,
                  java.nio.ByteBuffer&nbsp;buf)
                    throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor command to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been sent.
 The command may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The command number (0..255).</dd><dd><code>func</code> - The name of the command. This string is used for the generation of error messages.</dd><dd><code>value</code> - The value (0..65535), i.e bytes 2 and 3 of the setup data.</dd><dd><code>index</code> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.</dd><dd><code>buf</code> - The payload data buffer. The full buffer is sent, i.e. transfer size is equal to buffer capacity.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs or if not all of the payload has been sent.</dd></dl>
</li>
</ul>
<a name="vendorCommand2(int, java.lang.String, int, int, byte[], int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorCommand2</h4>
<pre>public&nbsp;void&nbsp;vendorCommand2(int&nbsp;cmd,
                  java.lang.String&nbsp;func,
                  int&nbsp;value,
                  int&nbsp;index,
                  byte[]&nbsp;buf,
                  int&nbsp;length)
                    throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor command to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been sent.
 The command may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The command number (0..255).</dd><dd><code>func</code> - The name of the command. This string is used for the generation of error messages.</dd><dd><code>value</code> - The value (0..65535), i.e bytes 2 and 3 of the setup data.</dd><dd><code>index</code> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.</dd><dd><code>length</code> - The size of the payload data (0..65535), i.e. bytes 6 and 7 of the setup data.</dd><dd><code>buf</code> - The payload data buffer.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs or if not all of the payload has been sent.</dd></dl>
</li>
</ul>
<a name="vendorRequest2(int, java.lang.String, int, int, java.nio.ByteBuffer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorRequest2</h4>
<pre>public&nbsp;void&nbsp;vendorRequest2(int&nbsp;cmd,
                  java.lang.String&nbsp;func,
                  int&nbsp;value,
                  int&nbsp;index,
                  java.nio.ByteBuffer&nbsp;buf)
                    throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been received.
 The request may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The request number (0..255).</dd><dd><code>func</code> - The name of the request. This string is used for the generation of error messages.</dd><dd><code>value</code> - The value (0..65535), i.e bytes 2 and 3 of the setup data.</dd><dd><code>index</code> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.</dd><dd><code>buf</code> - The payload data buffer. Buffer capacity determines the length of the transfer.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs or not all of the payload has been received.</dd></dl>
</li>
</ul>
<a name="vendorRequest2(int, java.lang.String, java.nio.ByteBuffer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorRequest2</h4>
<pre>public&nbsp;void&nbsp;vendorRequest2(int&nbsp;cmd,
                  java.lang.String&nbsp;func,
                  java.nio.ByteBuffer&nbsp;buf)
                    throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been received.
 The request may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The request number (0..255).</dd><dd><code>func</code> - The name of the request. This string is used for the generation of error messages.</dd><dd><code>buf</code> - The payload data buffer.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs or not all of the payload has been received.</dd></dl>
</li>
</ul>
<a name="vendorRequest2(int, java.lang.String, int, int, byte[], int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorRequest2</h4>
<pre>public&nbsp;void&nbsp;vendorRequest2(int&nbsp;cmd,
                  java.lang.String&nbsp;func,
                  int&nbsp;value,
                  int&nbsp;index,
                  byte[]&nbsp;buf,
                  int&nbsp;maxlen)
                    throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been received.
 The request may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The request number (0..255).</dd><dd><code>func</code> - The name of the request. This string is used for the generation of error messages.</dd><dd><code>value</code> - The value (0..65535), i.e bytes 2 and 3 of the setup data.</dd><dd><code>index</code> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.</dd><dd><code>maxlen</code> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.</dd><dd><code>buf</code> - The payload data buffer.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs or not all of the payload has been received.</dd></dl>
</li>
</ul>
<a name="vendorRequest2(int, java.lang.String, byte[], int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>vendorRequest2</h4>
<pre>public&nbsp;void&nbsp;vendorRequest2(int&nbsp;cmd,
                  java.lang.String&nbsp;func,
                  byte[]&nbsp;buf,
                  int&nbsp;maxlen)
                    throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <a href="../ztex/UsbException.html" title="class in ztex"><code>UsbException</code></a> if not all of the payload has been received.
 The request may be send multiple times until the <a href="../ztex/Ztex1.html#controlMsgTimeout"><code>controlMsgTimeout</code></a> is reached.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cmd</code> - The request number (0..255).</dd><dd><code>func</code> - The name of the request. This string is used for the generation of error messages.</dd><dd><code>maxlen</code> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.</dd><dd><code>buf</code> - The payload data buffer.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs or not all of the payload has been received.</dd></dl>
</li>
</ul>
<a name="bulkWrite(int, java.nio.ByteBuffer, long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bulkWrite</h4>
<pre>public&nbsp;int&nbsp;bulkWrite(int&nbsp;ep,
            java.nio.ByteBuffer&nbsp;buffer,
            long&nbsp;timeout)</pre>
<div class="block">Wrapper method for ibUsb.bulkTransfer(DeviceHandle,byte,ByteBuffer,IntBuffer,long).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ep</code> - The endpoint number.</dd><dd><code>buffer</code> - The payload data buffer. The whole buffer is transferred, i.e. transfer legth is equal to buffer capacity</dd><dd><code>timeout</code> - The timeout in ms</dd>
<dt><span class="strong">Returns:</span></dt><dd>The error code (<0) if an error occurred, otherwise the amount of transferred date</dd></dl>
</li>
</ul>
<a name="bulkWrite(int, byte[], int, long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bulkWrite</h4>
<pre>public&nbsp;int&nbsp;bulkWrite(int&nbsp;ep,
            byte[]&nbsp;buf,
            int&nbsp;length,
            long&nbsp;timeout)</pre>
<div class="block">Wrapper method for LibUsb.bulkTransfer(DeviceHandle,byte,ByteBuffer,IntBuffer,long).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ep</code> - The endpoint number.</dd><dd><code>buf</code> - The payload data buffer.</dd><dd><code>length</code> - The size of the payload data</dd><dd><code>timeout</code> - The timeout in ms</dd>
<dt><span class="strong">Returns:</span></dt><dd>The error code (<0) if an error occurred, otherwise the amount of transferred date</dd></dl>
</li>
</ul>
<a name="bulkRead(int, java.nio.ByteBuffer, long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bulkRead</h4>
<pre>public&nbsp;int&nbsp;bulkRead(int&nbsp;ep,
           java.nio.ByteBuffer&nbsp;buffer,
           long&nbsp;timeout)</pre>
<div class="block">Wrapper method for LibUsb.bulkTransfer(DeviceHandle,byte,ByteBuffer,IntBuffer,long).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ep</code> - The endpoint number.</dd><dd><code>buffer</code> - The payload data buffer. The transfer length is determined by buffer capacity.</dd><dd><code>timeout</code> - The timeout in ms</dd>
<dt><span class="strong">Returns:</span></dt><dd>The error code (<0) if an error occurred, otherwise the amount of transferred date</dd></dl>
</li>
</ul>
<a name="bulkRead(int, byte[], int, long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bulkRead</h4>
<pre>public&nbsp;int&nbsp;bulkRead(int&nbsp;ep,
           byte[]&nbsp;buf,
           int&nbsp;maxlen,
           long&nbsp;timeout)</pre>
<div class="block">Wrapper method for LibUsb.bulkTransfer(DeviceHandle,byte,ByteBuffer,IntBuffer,long).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ep</code> - The endpoint number.</dd><dd><code>buf</code> - The payload data buffer.</dd><dd><code>maxlen</code> - The size of the transfer.</dd><dd><code>timeout</code> - The timeout in ms</dd>
<dt><span class="strong">Returns:</span></dt><dd>The error code (<0) if an error occurred, otherwise the amount of transferred date</dd></dl>
</li>
</ul>
<a name="allocateByteBuffer(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocateByteBuffer</h4>
<pre>public static&nbsp;java.nio.ByteBuffer&nbsp;allocateByteBuffer(byte[]&nbsp;buf)</pre>
<div class="block">Utility function that creates a ByteBuffer from byte array.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - The byte array.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A ByteBuffer.</dd></dl>
</li>
</ul>
<a name="allocateByteBuffer(byte[], int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>allocateByteBuffer</h4>
<pre>public static&nbsp;java.nio.ByteBuffer&nbsp;allocateByteBuffer(byte[]&nbsp;buf,
                                     int&nbsp;offs,
                                     int&nbsp;length)</pre>
<div class="block">Utility function that creates a ByteBuffer from byte array.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - The byte array.</dd><dd><code>offs</code> - The offset of the first data in the byte array.</dd><dd><code>length</code> - Length of the The byte array.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A ByteBuffer.</dd></dl>
</li>
</ul>
<a name="setConfiguration(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setConfiguration</h4>
<pre>public&nbsp;void&nbsp;setConfiguration(int&nbsp;config)
                      throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Sets the configuration.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>config</code> - The configuration number (usually 1)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if an error occurs while attempting to set the configuration.</dd></dl>
</li>
</ul>
<a name="trySetConfiguration(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trySetConfiguration</h4>
<pre>public&nbsp;void&nbsp;trySetConfiguration(int&nbsp;config)</pre>
<div class="block">Tries to set the configuration.
 If an error occurs while attempting to set the configuration, a warning message is printed to stderr.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>config</code> - The configuration number (usually 1)</dd></dl>
</li>
</ul>
<a name="getInterfaceClaimed(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInterfaceClaimed</h4>
<pre>public&nbsp;boolean&nbsp;getInterfaceClaimed(int&nbsp;iface)</pre>
<div class="block">Returns true if interface is claimed.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>iface</code> - The interface number</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if interface is claimed</dd></dl>
</li>
</ul>
<a name="claimInterface(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>claimInterface</h4>
<pre>public&nbsp;void&nbsp;claimInterface(int&nbsp;iface)
                    throws <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></pre>
<div class="block">Claims an interface.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>iface</code> - The interface number (usually 0)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if an error occurs while attempting to claim the interface.</dd></dl>
</li>
</ul>
<a name="releaseInterface(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>releaseInterface</h4>
<pre>public&nbsp;void&nbsp;releaseInterface(int&nbsp;iface)</pre>
<div class="block">Releases an interface.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>iface</code> - The interface number (usually 0)</dd></dl>
</li>
</ul>
<a name="uploadFirmware(ztex.ZtexImgFile1, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uploadFirmware</h4>
<pre>public&nbsp;long&nbsp;uploadFirmware(<a href="../ztex/ZtexImgFile1.html" title="class in ztex">ZtexImgFile1</a>&nbsp;imgFile,
                  boolean&nbsp;force)
                    throws <a href="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</a>,
                           <a href="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</a>,
                           <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a>,
                           <a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a>,
                           <a href="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</a></pre>
<div class="block">Uploads the firmware to the EZ-USB and manages the renumeration process.
 <p>
 Before the firmware is uploaded the device is set into a reset state.
 After the upload the firmware is booted and the renumeration starts.
 During this process the device disappears from the bus and a new one 
 occurs which will be assigned to this class automatically (instead of the disappeared one).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>imgFile</code> - The firmware image.</dd><dd><code>force</code> - The compatibility check is skipped if true.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the upload time in ms.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</a></code> - if the given firmware is not compatible to the installed one, see <a href="../ztex/ZtexDevice1.html#compatible(int,%20int,%20int,%20int)"><code>ZtexDevice1.compatible(int,int,int,int)</code></a> (Upload can be enforced using the <tt>force</tt> parameter)</dd>
<dd><code><a href="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</a></code> - If an error occurred while attempting to upload the firmware.</dd>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd>
<dd><code><a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a></code> - if ZTEX descriptor 1 is not available.</dd>
<dd><code><a href="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</a></code> - if a device went lost after renumeration.</dd></dl>
</li>
</ul>
<a name="uploadFirmware(java.lang.String, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uploadFirmware</h4>
<pre>public&nbsp;long&nbsp;uploadFirmware(java.lang.String&nbsp;imgFileName,
                  boolean&nbsp;force)
                    throws <a href="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</a>,
                           <a href="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</a>,
                           <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a>,
                           <a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a>,
                           <a href="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</a></pre>
<div class="block">Uploads the firmware to the EZ-USB and manages the renumeration process.
 <p>
 Before the firmware is uploaded the device is set into a reset state.
 After the upload the firmware is booted and the renumeration starts.
 During this process the device disappears from the bus and a new one 
 occurs which will be assigned to this class automatically (instead of the disappeared one).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>imgFileName</code> - The file name of the firmware image in ihx or img format. The file can be a regular file or a system resource (e.g. a file from the current jar archive).</dd><dd><code>force</code> - The compatibility check is skipped if true.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the upload time in ms.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</a></code> - if the given firmware is not compatible to the installed one, see <a href="../ztex/ZtexDevice1.html#compatible(int,%20int,%20int,%20int)"><code>ZtexDevice1.compatible(int,int,int,int)</code></a> (Upload can be enforced using the <tt>force</tt> parameter)</dd>
<dd><code><a href="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</a></code> - If an error occurred while attempting to upload the firmware.</dd>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd>
<dd><code><a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a></code> - if ZTEX descriptor 1 is not available.</dd>
<dd><code><a href="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</a></code> - if a device went lost after renumeration.</dd></dl>
</li>
</ul>
<a name="uploadFirmware(java.io.InputStream, java.lang.String, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uploadFirmware</h4>
<pre>public&nbsp;long&nbsp;uploadFirmware(java.io.InputStream&nbsp;imgIn,
                  java.lang.String&nbsp;name,
                  boolean&nbsp;force)
                    throws <a href="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</a>,
                           <a href="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</a>,
                           <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a>,
                           <a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a>,
                           <a href="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</a></pre>
<div class="block">Uploads the firmware to the EZ-USB and manages the renumeration process.
 <p>
 Before the firmware is uploaded the device is set into a reset state.
 After the upload the firmware is booted and the renumeration starts.
 During this process the device disappears from the bus and a new one 
 occurs which will be assigned to this class automatically (instead of the disappeared one).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>imgIn</code> - Input stream from which the img file is read.</dd><dd><code>name</code> - Name of the input.</dd><dd><code>force</code> - The compatibility check is skipped if true.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the upload time in ms.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</a></code> - if the given firmware is not compatible to the installed one, see <a href="../ztex/ZtexDevice1.html#compatible(int,%20int,%20int,%20int)"><code>ZtexDevice1.compatible(int,int,int,int)</code></a> (Upload can be enforced using the <tt>force</tt> parameter)</dd>
<dd><code><a href="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</a></code> - If an error occurred while attempting to upload the firmware.</dd>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd>
<dd><code><a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a></code> - if ZTEX descriptor 1 is not available.</dd>
<dd><code><a href="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</a></code> - if a device went lost after renumeration.</dd></dl>
</li>
</ul>
<a name="resetEzUsb()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetEzUsb</h4>
<pre>public&nbsp;void&nbsp;resetEzUsb()
                throws <a href="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</a>,
                       <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a>,
                       <a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a>,
                       <a href="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</a></pre>
<div class="block">Resets the EZ-USB and manages the renumeration process.
 <p>
 After the reset the renumeration starts.
 During this process the device disappears from the bus and a new one 
 occurs which will be assigned to this class automatically (instead of the disappeared one).</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</a></code> - If an error occurred while attempting to upload the firmware.</dd>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd>
<dd><code><a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a></code> - if ZTEX descriptor 1 is not available.</dd>
<dd><code><a href="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</a></code> - if a device went lost after renumeration.</dd></dl>
</li>
</ul>
<a name="resetDevice(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resetDevice</h4>
<pre>public&nbsp;void&nbsp;resetDevice(boolean&nbsp;force)
                 throws <a href="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</a>,
                        <a href="../ztex/UsbException.html" title="class in ztex">UsbException</a>,
                        <a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a>,
                        <a href="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</a></pre>
<div class="block">Performs a configuration or bus reset. This method is used to synchronize data toggles at start-up of the host software.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>force</code> - True enforces a bus reset. By default a configuration reset is tried first and if it fails, a bus reset is performed.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../ztex/UsbException.html" title="class in ztex">UsbException</a></code> - if a communication error occurs.</dd>
<dd><code><a href="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</a></code></dd>
<dd><code><a href="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</a></code></dd>
<dd><code><a href="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</a></code></dd></dl>
</li>
</ul>
<a name="toString()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
<div class="block">Returns a lot of useful information about the corresponding device.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a lot of useful information about the corresponding device.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../ztex/package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../ztex/UsbException.html" title="class in ztex"><span class="strong">Prev Class</span></a></li>
<li><a href="../ztex/Ztex1v1.html" title="class in ztex"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?ztex/Ztex1.html" target="_top">Frames</a></li>
<li><a href="Ztex1.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.