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

Subversion Repositories usb_fpga_2_04

[/] [usb_fpga_2_04/] [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>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_18) on Wed Oct 30 21:18:13 CET 2013 -->
<TITLE>
Ztex1
</TITLE>
 
<META NAME="date" CONTENT="2013-10-30">
 
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
 
<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Ztex1";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
 
</HEAD>
 
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
 
 
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
 
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../ztex/UsbException.html" title="class in ztex"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../ztex/Ztex1v1.html" title="class in ztex"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../index.html?ztex/Ztex1.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Ztex1.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
 
 
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
 
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
ztex</FONT>
<BR>
Class Ztex1</H2>
<PRE>
java.lang.Object
  <IMG SRC="../resources/inherit.gif" ALT="extended by "><B>ztex.Ztex1</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../ztex/Ztex1v1.html" title="class in ztex">Ztex1v1</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>Ztex1</B><DT>extends java.lang.Object</DL>
</PRE>
 
<P>
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>.
<P>
 
<P>
<DL>
<DT><B>See Also:</B><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></DL>
<HR>
 
<P>
<!-- =========== FIELD SUMMARY =========== -->
 
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#certainWorkarounds">certainWorkarounds</A></B></CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Setting to true enables certain workarounds, e.g. to deal with bad driver/OS implementations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#controlMsgTimeout">controlMsgTimeout</A></B></CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The timeout for  control messages in ms.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
 
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../ztex/Ztex1.html#Ztex1(ztex.ZtexDevice1)">Ztex1</A></B>(<A HREF="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</A>&nbsp;pDev)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an instance from a given device.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
 
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#checkValid()">checkValid</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether ZTEX descriptor 1 is available.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#claimInterface(int)">claimInterface</A></B>(int&nbsp;iface)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Claims an interface.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#dev()">dev</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the corresponding <A HREF="../ztex/ZtexDevice1.html" title="class in ztex"><CODE>ZtexDevice1</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#finalize()">finalize</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The destructor closes the USB file handle.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#getInterfaceClaimed(int)">getInterfaceClaimed</A></B>(int&nbsp;iface)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if interface is claimed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#handle()">handle</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the USB file handle.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#init()">init</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializates the class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#releaseInterface(int)">releaseInterface</A></B>(int&nbsp;iface)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Releases an interface.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#resetEzUsb()">resetEzUsb</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets the EZ-USB and manages the renumeration process.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#setConfiguration(int)">setConfiguration</A></B>(int&nbsp;config)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the configuration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#toString()">toString</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a lot of useful information about the corresponding device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#trySetConfiguration(int)">trySetConfiguration</A></B>(int&nbsp;config)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tries to set the configuration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#uploadFirmware(java.io.InputStream, java.lang.String, boolean)">uploadFirmware</A></B>(java.io.InputStream&nbsp;ihxIn,
               java.lang.String&nbsp;name,
               boolean&nbsp;force)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uploads the firmware to the EZ-USB and manages the renumeration process.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#uploadFirmware(java.lang.String, boolean)">uploadFirmware</A></B>(java.lang.String&nbsp;ihxFileName,
               boolean&nbsp;force)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uploads the firmware to the EZ-USB and manages the renumeration process.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#uploadFirmware(ztex.ZtexIhxFile1, boolean)">uploadFirmware</A></B>(<A HREF="../ztex/ZtexIhxFile1.html" title="class in ztex">ZtexIhxFile1</A>&nbsp;ihxFile,
               boolean&nbsp;force)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uploads the firmware to the EZ-USB and manages the renumeration process.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#valid()">valid</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if ZTEX descriptor 1 is available.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand(int, java.lang.String)">vendorCommand</A></B>(int&nbsp;cmd,
              java.lang.String&nbsp;func)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor command with no payload data and no setup data to Endpoint 0 of the EZ-USB device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand(int, java.lang.String, int, int)">vendorCommand</A></B>(int&nbsp;cmd,
              java.lang.String&nbsp;func,
              int&nbsp;value,
              int&nbsp;index)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor command with no payload data to Endpoint 0 of the EZ-USB device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand(int, java.lang.String, int, int, byte[], int)">vendorCommand</A></B>(int&nbsp;cmd,
              java.lang.String&nbsp;func,
              int&nbsp;value,
              int&nbsp;index,
              byte[]&nbsp;buf,
              int&nbsp;length)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor command to Endpoint 0 of the EZ-USB device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand2(int, java.lang.String, int, int, byte[], int)">vendorCommand2</A></B>(int&nbsp;cmd,
               java.lang.String&nbsp;func,
               int&nbsp;value,
               int&nbsp;index,
               byte[]&nbsp;buf,
               int&nbsp;length)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest(int, java.lang.String, byte[], int)">vendorRequest</A></B>(int&nbsp;cmd,
              java.lang.String&nbsp;func,
              byte[]&nbsp;buf,
              int&nbsp;maxlen)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor request to Endpoint 0 of the EZ-USB device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest(int, java.lang.String, int, int, byte[], int)">vendorRequest</A></B>(int&nbsp;cmd,
              java.lang.String&nbsp;func,
              int&nbsp;value,
              int&nbsp;index,
              byte[]&nbsp;buf,
              int&nbsp;maxlen)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor request to Endpoint 0 of the EZ-USB device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest2(int, java.lang.String, byte[], int)">vendorRequest2</A></B>(int&nbsp;cmd,
               java.lang.String&nbsp;func,
               byte[]&nbsp;buf,
               int&nbsp;maxlen)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest2(int, java.lang.String, int, int, byte[], int)">vendorRequest2</A></B>(int&nbsp;cmd,
               java.lang.String&nbsp;func,
               int&nbsp;value,
               int&nbsp;index,
               byte[]&nbsp;buf,
               int&nbsp;maxlen)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
 
<!-- ============ FIELD DETAIL =========== -->
 
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
 
<A NAME="certainWorkarounds"><!-- --></A><H3>
certainWorkarounds</H3>
<PRE>
public boolean <B>certainWorkarounds</B></PRE>
<DL>
<DD>Setting to true enables certain workarounds, e.g. to deal with bad driver/OS implementations.
<P>
<DL>
</DL>
</DL>
<HR>
 
<A NAME="controlMsgTimeout"><!-- --></A><H3>
controlMsgTimeout</H3>
<PRE>
public int <B>controlMsgTimeout</B></PRE>
<DL>
<DD>The timeout for  control messages in ms.
<P>
<DL>
</DL>
</DL>
 
<!-- ========= CONSTRUCTOR DETAIL ======== -->
 
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
 
<A NAME="Ztex1(ztex.ZtexDevice1)"><!-- --></A><H3>
Ztex1</H3>
<PRE>
public <B>Ztex1</B>(<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>
<DL>
<DD>Constructs an instance from a given device.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>pDev</CODE> - The given device.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if an communication error occurred.</DL>
</DL>
 
<!-- ============ METHOD DETAIL ========== -->
 
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
 
<A NAME="init()"><!-- --></A><H3>
init</H3>
<PRE>
protected void <B>init</B>()
             throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
<DL>
<DD>Initializates the class.
<P>
<DD><DL>
 
<DT><B>Throws:</B>
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if an communication error occurred.</DL>
</DD>
</DL>
<HR>
 
<A NAME="finalize()"><!-- --></A><H3>
finalize</H3>
<PRE>
protected void <B>finalize</B>()</PRE>
<DL>
<DD>The destructor closes the USB file handle.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>finalize</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
 
<A NAME="handle()"><!-- --></A><H3>
handle</H3>
<PRE>
public final long <B>handle</B>()</PRE>
<DL>
<DD>Returns the USB file handle.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
 
<A NAME="dev()"><!-- --></A><H3>
dev</H3>
<PRE>
public final <A HREF="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</A> <B>dev</B>()</PRE>
<DL>
<DD>Returns the corresponding <A HREF="../ztex/ZtexDevice1.html" title="class in ztex"><CODE>ZtexDevice1</CODE></A>.
<P>
<DD><DL>
 
<DT><B>Returns:</B><DD>the corresponding <A HREF="../ztex/ZtexDevice1.html" title="class in ztex"><CODE>ZtexDevice1</CODE></A>.</DL>
</DD>
</DL>
<HR>
 
<A NAME="valid()"><!-- --></A><H3>
valid</H3>
<PRE>
public boolean <B>valid</B>()</PRE>
<DL>
<DD>Returns true if ZTEX descriptor 1 is available.
<P>
<DD><DL>
 
<DT><B>Returns:</B><DD>true if ZTEX descriptor 1 is available.</DL>
</DD>
</DL>
<HR>
 
<A NAME="checkValid()"><!-- --></A><H3>
checkValid</H3>
<PRE>
public void <B>checkValid</B>()
                throws <A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></PRE>
<DL>
<DD>Checks whether ZTEX descriptor 1 is available.
<P>
<DD><DL>
 
<DT><B>Throws:</B>
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.</DL>
</DD>
</DL>
<HR>
 
<A NAME="vendorCommand(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
vendorCommand</H3>
<PRE>
public int <B>vendorCommand</B>(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>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The command number (0..255).<DD><CODE>func</CODE> - The name of the command. This string is used for the generation of error messages.<DD><CODE>value</CODE> - The value (0..65535), i.e bytes 2 and 3 of the setup data.<DD><CODE>index</CODE> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.<DD><CODE>length</CODE> - The size of the payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
<DT><B>Returns:</B><DD>the number of bytes sent.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
</DD>
</DL>
<HR>
 
<A NAME="vendorCommand(int, java.lang.String, int, int)"><!-- --></A><H3>
vendorCommand</H3>
<PRE>
public int <B>vendorCommand</B>(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>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The command number (0..255).<DD><CODE>func</CODE> - The name of the command. This string is used for the generation of error messages.<DD><CODE>value</CODE> - The value (0..65535), i.e bytes 2 and 3 of the setup data.<DD><CODE>index</CODE> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.
<DT><B>Returns:</B><DD>the number of bytes sent.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
</DD>
</DL>
<HR>
 
<A NAME="vendorCommand(int, java.lang.String)"><!-- --></A><H3>
vendorCommand</H3>
<PRE>
public int <B>vendorCommand</B>(int&nbsp;cmd,
                         java.lang.String&nbsp;func)
                  throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The command number (0..255).<DD><CODE>func</CODE> - The name of the command. This string is used for the generation of error messages.
<DT><B>Returns:</B><DD>the number of bytes sent.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
</DD>
</DL>
<HR>
 
<A NAME="vendorRequest(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
vendorRequest</H3>
<PRE>
public int <B>vendorRequest</B>(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>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The request number (0..255).<DD><CODE>func</CODE> - The name of the request. This string is used for the generation of error messages.<DD><CODE>value</CODE> - The value (0..65535), i.e bytes 2 and 3 of the setup data.<DD><CODE>index</CODE> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.<DD><CODE>maxlen</CODE> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
<DT><B>Returns:</B><DD>the number of bytes received.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
</DD>
</DL>
<HR>
 
<A NAME="vendorRequest(int, java.lang.String, byte[], int)"><!-- --></A><H3>
vendorRequest</H3>
<PRE>
public int <B>vendorRequest</B>(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>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The request number (0..255).<DD><CODE>func</CODE> - The name of the request. This string is used for the generation of error messages.<DD><CODE>maxlen</CODE> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
<DT><B>Returns:</B><DD>the number of bytes sent.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
</DD>
</DL>
<HR>
 
<A NAME="vendorCommand2(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
vendorCommand2</H3>
<PRE>
public void <B>vendorCommand2</B>(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>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The command number (0..255).<DD><CODE>func</CODE> - The name of the command. This string is used for the generation of error messages.<DD><CODE>value</CODE> - The value (0..65535), i.e bytes 2 and 3 of the setup data.<DD><CODE>index</CODE> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.<DD><CODE>length</CODE> - The size of the payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
<DT><B>Throws:</B>
<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.</DL>
</DD>
</DL>
<HR>
 
<A NAME="vendorRequest2(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
vendorRequest2</H3>
<PRE>
public void <B>vendorRequest2</B>(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>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The request number (0..255).<DD><CODE>func</CODE> - The name of the request. This string is used for the generation of error messages.<DD><CODE>value</CODE> - The value (0..65535), i.e bytes 2 and 3 of the setup data.<DD><CODE>index</CODE> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.<DD><CODE>maxlen</CODE> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
<DT><B>Throws:</B>
<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.</DL>
</DD>
</DL>
<HR>
 
<A NAME="vendorRequest2(int, java.lang.String, byte[], int)"><!-- --></A><H3>
vendorRequest2</H3>
<PRE>
public void <B>vendorRequest2</B>(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>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The request number (0..255).<DD><CODE>func</CODE> - The name of the request. This string is used for the generation of error messages.<DD><CODE>maxlen</CODE> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
<DT><B>Throws:</B>
<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.</DL>
</DD>
</DL>
<HR>
 
<A NAME="setConfiguration(int)"><!-- --></A><H3>
setConfiguration</H3>
<PRE>
public void <B>setConfiguration</B>(int&nbsp;config)
                      throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
<DL>
<DD>Sets the configuration.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>config</CODE> - The configuration number (usually 1)
<DT><B>Throws:</B>
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if an error occurs while attempting to set the configuration.</DL>
</DD>
</DL>
<HR>
 
<A NAME="trySetConfiguration(int)"><!-- --></A><H3>
trySetConfiguration</H3>
<PRE>
public void <B>trySetConfiguration</B>(int&nbsp;config)</PRE>
<DL>
<DD>Tries to set the configuration.
 If an error occurs while attempting to set the configuration, a warning messaage is printed to stderr.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>config</CODE> - The configuration number (usually 1)</DL>
</DD>
</DL>
<HR>
 
<A NAME="getInterfaceClaimed(int)"><!-- --></A><H3>
getInterfaceClaimed</H3>
<PRE>
public boolean <B>getInterfaceClaimed</B>(int&nbsp;iface)</PRE>
<DL>
<DD>Returns true if interface is claimed.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>iface</CODE> - The interface number
<DT><B>Returns:</B><DD>true if interface is claimed</DL>
</DD>
</DL>
<HR>
 
<A NAME="claimInterface(int)"><!-- --></A><H3>
claimInterface</H3>
<PRE>
public void <B>claimInterface</B>(int&nbsp;iface)
                    throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
<DL>
<DD>Claims an interface.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>iface</CODE> - The interface number (usually 0)
<DT><B>Throws:</B>
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if an error occurs while attempting to claim the interface.</DL>
</DD>
</DL>
<HR>
 
<A NAME="releaseInterface(int)"><!-- --></A><H3>
releaseInterface</H3>
<PRE>
public void <B>releaseInterface</B>(int&nbsp;iface)</PRE>
<DL>
<DD>Releases an interface.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>iface</CODE> - The interface number (usually 0)</DL>
</DD>
</DL>
<HR>
 
<A NAME="uploadFirmware(ztex.ZtexIhxFile1, boolean)"><!-- --></A><H3>
uploadFirmware</H3>
<PRE>
public long <B>uploadFirmware</B>(<A HREF="../ztex/ZtexIhxFile1.html" title="class in ztex">ZtexIhxFile1</A>&nbsp;ihxFile,
                           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>
<DL>
<DD>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).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ihxFile</CODE> - The firmware image.<DD><CODE>force</CODE> - The compatibility check is skipped if true.
<DT><B>Returns:</B><DD>the upload time in ms.
<DT><B>Throws:</B>
<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, int, int, int)"><CODE>ZtexDevice1.compatible(int,int,int,int)</CODE></A> (Upload can be enforced using the <tt>force</tt> parameter)
<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><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.
<DD><CODE><A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></CODE> - if a device went lost after renumeration.</DL>
</DD>
</DL>
<HR>
 
<A NAME="uploadFirmware(java.lang.String, boolean)"><!-- --></A><H3>
uploadFirmware</H3>
<PRE>
public long <B>uploadFirmware</B>(java.lang.String&nbsp;ihxFileName,
                           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>
<DL>
<DD>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).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ihxFileName</CODE> - The file name of the firmware image in ihx format. The file can be a regular file or a system resource (e.g. a file from the current jar archive).<DD><CODE>force</CODE> - The compatibility check is skipped if true.
<DT><B>Returns:</B><DD>the upload time in ms.
<DT><B>Throws:</B>
<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, int, int, int)"><CODE>ZtexDevice1.compatible(int,int,int,int)</CODE></A> (Upload can be enforced using the <tt>force</tt> parameter)
<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><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.
<DD><CODE><A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></CODE> - if a device went lost after renumeration.</DL>
</DD>
</DL>
<HR>
 
<A NAME="uploadFirmware(java.io.InputStream, java.lang.String, boolean)"><!-- --></A><H3>
uploadFirmware</H3>
<PRE>
public long <B>uploadFirmware</B>(java.io.InputStream&nbsp;ihxIn,
                           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>
<DL>
<DD>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).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ihxIn</CODE> - Input stream from which the ihx file is read.<DD><CODE>name</CODE> - Name of the input.<DD><CODE>force</CODE> - The compatibility check is skipped if true.
<DT><B>Returns:</B><DD>the upload time in ms.
<DT><B>Throws:</B>
<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, int, int, int)"><CODE>ZtexDevice1.compatible(int,int,int,int)</CODE></A> (Upload can be enforced using the <tt>force</tt> parameter)
<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><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.
<DD><CODE><A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></CODE> - if a device went lost after renumeration.</DL>
</DD>
</DL>
<HR>
 
<A NAME="resetEzUsb()"><!-- --></A><H3>
resetEzUsb</H3>
<PRE>
public void <B>resetEzUsb</B>()
                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>
<DL>
<DD>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).
<P>
<DD><DL>
 
<DT><B>Throws:</B>
<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><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.
<DD><CODE><A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></CODE> - if a device went lost after renumeration.</DL>
</DD>
</DL>
<HR>
 
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns a lot of useful information about the corresponding device.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
 
<DT><B>Returns:</B><DD>a lot of useful information about the corresponding device.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
 
 
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
 
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../ztex/UsbException.html" title="class in ztex"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../ztex/Ztex1v1.html" title="class in ztex"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../index.html?ztex/Ztex1.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Ztex1.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
 
 
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
 
<HR>
 
</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.