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/] [ch/] [ntb/] [usb/] [LibusbJava.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>
LibusbJava
</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="LibusbJava";
    }
}
</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="../../../ch/ntb/usb/LibLoader.html" title="class in ch.ntb.usb"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../ch/ntb/usb/USB.html" title="class in ch.ntb.usb"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?ch/ntb/usb/LibusbJava.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="LibusbJava.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">
ch.ntb.usb</FONT>
<BR>
Class LibusbJava</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>ch.ntb.usb.LibusbJava</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>LibusbJava</B><DT>extends java.lang.Object</DL>
</PRE>
 
<P>
This class represents the Java Native Interface to the shared library which
 is (with some exceptions) a one-to-one representation of the libusb API.<br>
 <br>
 <h1>Project Description</h1>
 Java libusb is a Java wrapper for the libusb and libusb-win32 USB library.
 
 <a href="http://libusb.sourceforge.net/">libusb</a> aim is to create a
 library for use by user level applications to access USB devices regardless
 of OS.<br>
 <a href="http://libusb-win32.sourceforge.net/">Libusb-win32</a> is a port of
 the USB library <a href="http://libusb.sourceforge.net/">libusb</a> to the
 Windows operating systems. The library allows user space applications to
 access any USB device on Windows in a generic way without writing any line of
 kernel driver code.<br>
 <br>
 The API description of this class has been copied from the <a
 href="http://libusb.sourceforge.net/documentation.html">libusb documentation</a>
 and adapted where neccessary.<br>
<P>
 
<P>
<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>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_BAD_FILE_DESCRIPTOR">ERROR_BAD_FILE_DESCRIPTOR</A></B></CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_BUSY">ERROR_BUSY</A></B></CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_INVALID_PARAMETER">ERROR_INVALID_PARAMETER</A></B></CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_IO_ERROR">ERROR_IO_ERROR</A></B></CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_NO_SUCH_DEVICE_OR_ADDRESS">ERROR_NO_SUCH_DEVICE_OR_ADDRESS</A></B></CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_NOT_ENOUGH_MEMORY">ERROR_NOT_ENOUGH_MEMORY</A></B></CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_SUCCESS">ERROR_SUCCESS</A></B></CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_TIMEDOUT">ERROR_TIMEDOUT</A></B></CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</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="../../../ch/ntb/usb/LibusbJava.html#LibusbJava()">LibusbJava</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_bulk_read(long, int, byte[], int, int)">usb_bulk_read</A></B>(long&nbsp;dev_handle,
              int&nbsp;ep,
              byte[]&nbsp;bytes,
              int&nbsp;size,
              int&nbsp;timeout)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs a bulk read request to the endpoint specified by ep.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_bulk_write(long, int, byte[], int, int)">usb_bulk_write</A></B>(long&nbsp;dev_handle,
               int&nbsp;ep,
               byte[]&nbsp;bytes,
               int&nbsp;size,
               int&nbsp;timeout)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs a bulk write request to the endpoint specified by ep.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_claim_interface(long, int)">usb_claim_interface</A></B>(long&nbsp;dev_handle,
                    int&nbsp;interface_)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Claim an interface of a device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_clear_halt(long, int)">usb_clear_halt</A></B>(long&nbsp;dev_handle,
               int&nbsp;ep)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears any halt status on an endpoint.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_close(long)">usb_close</A></B>(long&nbsp;dev_handle)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>usb_close</code> closes a device opened with
 <code>usb_open</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_control_msg(long, int, int, int, int, byte[], int, int)">usb_control_msg</A></B>(long&nbsp;dev_handle,
                int&nbsp;requesttype,
                int&nbsp;request,
                int&nbsp;value,
                int&nbsp;index,
                byte[]&nbsp;bytes,
                int&nbsp;size,
                int&nbsp;timeout)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs a control request to the default control pipe on a device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_find_busses()">usb_find_busses</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>usb_find_busses</code> will find all of the busses on the system.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_find_devices()">usb_find_devices</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>usb_find_devices</code> will find all of the devices on each bus.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../ch/ntb/usb/Usb_Bus.html" title="class in ch.ntb.usb">Usb_Bus</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_busses()">usb_get_busses</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>usb_get_busses</code> returns a tree of descriptor objects.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_descriptor_by_endpoint(long, int, byte, byte, int)">usb_get_descriptor_by_endpoint</A></B>(long&nbsp;dev_handle,
                               int&nbsp;ep,
                               byte&nbsp;type,
                               byte&nbsp;index,
                               int&nbsp;size)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves a descriptor from the device identified by the type and index
 of the descriptor from the control pipe identified by ep.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_descriptor(long, byte, byte, int)">usb_get_descriptor</A></B>(long&nbsp;dev_handle,
                   byte&nbsp;type,
                   byte&nbsp;index,
                   int&nbsp;size)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves a descriptor from the device identified by the type and index
 of the descriptor from the default control pipe.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_string_simple(long, int)">usb_get_string_simple</A></B>(long&nbsp;dev_handle,
                      int&nbsp;index)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>usb_get_string_simple</code> is a wrapper around
 <code>usb_get_string</code> that retrieves the string description
 specified by index in the first language for the descriptor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_string(long, int, int)">usb_get_string</A></B>(long&nbsp;dev_handle,
               int&nbsp;index,
               int&nbsp;langid)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the string descriptor specified by index and langid from a
 device.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_init()">usb_init</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Just like the name implies, <code>usb_init</code> sets up some internal
 structures.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_interrupt_read(long, int, byte[], int, int)">usb_interrupt_read</A></B>(long&nbsp;dev_handle,
                   int&nbsp;ep,
                   byte[]&nbsp;bytes,
                   int&nbsp;size,
                   int&nbsp;timeout)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs a interrupt read request to the endpoint specified by ep.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_interrupt_write(long, int, byte[], int, int)">usb_interrupt_write</A></B>(long&nbsp;dev_handle,
                    int&nbsp;ep,
                    byte[]&nbsp;bytes,
                    int&nbsp;size,
                    int&nbsp;timeout)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs an interrupt write request to the endpoint specified by ep.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_open(ch.ntb.usb.Usb_Device)">usb_open</A></B>(<A HREF="../../../ch/ntb/usb/Usb_Device.html" title="class in ch.ntb.usb">Usb_Device</A>&nbsp;dev)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>usb_open</code> is to be used to open up a device for use.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_release_interface(long, int)">usb_release_interface</A></B>(long&nbsp;dev_handle,
                      int&nbsp;interface_)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Releases a previously claimed interface</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_reset(long)">usb_reset</A></B>(long&nbsp;dev_handle)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets a device by sending a RESET down the port it is connected to.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_set_altinterface(long, int)">usb_set_altinterface</A></B>(long&nbsp;dev_handle,
                     int&nbsp;alternate)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the active alternate setting of the current interface</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_set_configuration(long, int)">usb_set_configuration</A></B>(long&nbsp;dev_handle,
                      int&nbsp;configuration)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the active configuration of a device</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_set_debug(int)">usb_set_debug</A></B>(int&nbsp;level)</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the debugging level of libusb.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_strerror()">usb_strerror</A></B>()</CODE>
 
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the error string after an error occured.</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, finalize, getClass, hashCode, notify, notifyAll, toString, 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="ERROR_SUCCESS"><!-- --></A><H3>
ERROR_SUCCESS</H3>
<PRE>
public static int <B>ERROR_SUCCESS</B></PRE>
<DL>
<DD>System error codes.<br>
 This list is not complete! For more error codes see the file 'errorno.h'
 on your system.
<P>
<DL>
</DL>
</DL>
<HR>
 
<A NAME="ERROR_BAD_FILE_DESCRIPTOR"><!-- --></A><H3>
ERROR_BAD_FILE_DESCRIPTOR</H3>
<PRE>
public static int <B>ERROR_BAD_FILE_DESCRIPTOR</B></PRE>
<DL>
<DD>System error codes.<br>
 This list is not complete! For more error codes see the file 'errorno.h'
 on your system.
<P>
<DL>
</DL>
</DL>
<HR>
 
<A NAME="ERROR_NO_SUCH_DEVICE_OR_ADDRESS"><!-- --></A><H3>
ERROR_NO_SUCH_DEVICE_OR_ADDRESS</H3>
<PRE>
public static int <B>ERROR_NO_SUCH_DEVICE_OR_ADDRESS</B></PRE>
<DL>
<DD>System error codes.<br>
 This list is not complete! For more error codes see the file 'errorno.h'
 on your system.
<P>
<DL>
</DL>
</DL>
<HR>
 
<A NAME="ERROR_BUSY"><!-- --></A><H3>
ERROR_BUSY</H3>
<PRE>
public static int <B>ERROR_BUSY</B></PRE>
<DL>
<DD>System error codes.<br>
 This list is not complete! For more error codes see the file 'errorno.h'
 on your system.
<P>
<DL>
</DL>
</DL>
<HR>
 
<A NAME="ERROR_INVALID_PARAMETER"><!-- --></A><H3>
ERROR_INVALID_PARAMETER</H3>
<PRE>
public static int <B>ERROR_INVALID_PARAMETER</B></PRE>
<DL>
<DD>System error codes.<br>
 This list is not complete! For more error codes see the file 'errorno.h'
 on your system.
<P>
<DL>
</DL>
</DL>
<HR>
 
<A NAME="ERROR_TIMEDOUT"><!-- --></A><H3>
ERROR_TIMEDOUT</H3>
<PRE>
public static int <B>ERROR_TIMEDOUT</B></PRE>
<DL>
<DD>System error codes.<br>
 This list is not complete! For more error codes see the file 'errorno.h'
 on your system.
<P>
<DL>
</DL>
</DL>
<HR>
 
<A NAME="ERROR_IO_ERROR"><!-- --></A><H3>
ERROR_IO_ERROR</H3>
<PRE>
public static int <B>ERROR_IO_ERROR</B></PRE>
<DL>
<DD>System error codes.<br>
 This list is not complete! For more error codes see the file 'errorno.h'
 on your system.
<P>
<DL>
</DL>
</DL>
<HR>
 
<A NAME="ERROR_NOT_ENOUGH_MEMORY"><!-- --></A><H3>
ERROR_NOT_ENOUGH_MEMORY</H3>
<PRE>
public static int <B>ERROR_NOT_ENOUGH_MEMORY</B></PRE>
<DL>
<DD>System error codes.<br>
 This list is not complete! For more error codes see the file 'errorno.h'
 on your system.
<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="LibusbJava()"><!-- --></A><H3>
LibusbJava</H3>
<PRE>
public <B>LibusbJava</B>()</PRE>
<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="usb_set_debug(int)"><!-- --></A><H3>
usb_set_debug</H3>
<PRE>
public static void <B>usb_set_debug</B>(int&nbsp;level)</PRE>
<DL>
<DD>Sets the debugging level of libusb.<br>
 
 The range is from 0 to 255, where 0 disables debug output and 255 enables
 all output. On application start, debugging is disabled (0).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>level</CODE> - 0 to 255</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_init()"><!-- --></A><H3>
usb_init</H3>
<PRE>
public static void <B>usb_init</B>()</PRE>
<DL>
<DD>Just like the name implies, <code>usb_init</code> sets up some internal
 structures. <code>usb_init</code> must be called before any other
 libusb functions.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_find_busses()"><!-- --></A><H3>
usb_find_busses</H3>
<PRE>
public static int <B>usb_find_busses</B>()</PRE>
<DL>
<DD><code>usb_find_busses</code> will find all of the busses on the system.
<P>
<DD><DL>
 
<DT><B>Returns:</B><DD>the number of changes since previous call to this function (total
         of new busses and busses removed).</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_find_devices()"><!-- --></A><H3>
usb_find_devices</H3>
<PRE>
public static int <B>usb_find_devices</B>()</PRE>
<DL>
<DD><code>usb_find_devices</code> will find all of the devices on each bus.
 This should be called after <code>usb_find_busses</code>.
<P>
<DD><DL>
 
<DT><B>Returns:</B><DD>the number of changes since the previous call to this function
         (total of new device and devices removed).</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_get_busses()"><!-- --></A><H3>
usb_get_busses</H3>
<PRE>
public static <A HREF="../../../ch/ntb/usb/Usb_Bus.html" title="class in ch.ntb.usb">Usb_Bus</A> <B>usb_get_busses</B>()</PRE>
<DL>
<DD><code>usb_get_busses</code> returns a tree of descriptor objects.<br>
 The tree represents the bus structure with devices, configurations,
 interfaces and endpoints. Note that this is only a copy. To refresh the
 information, <code>usb_get_busses()</code> must be called again.<br>
 The name of the objects contained in the tree is starting with
 <code>Usb_</code>.
<P>
<DD><DL>
 
<DT><B>Returns:</B><DD>the structure of all busses and devices. <code>Note:</code> The
         java objects are copies of the C structs.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_open(ch.ntb.usb.Usb_Device)"><!-- --></A><H3>
usb_open</H3>
<PRE>
public static long <B>usb_open</B>(<A HREF="../../../ch/ntb/usb/Usb_Device.html" title="class in ch.ntb.usb">Usb_Device</A>&nbsp;dev)</PRE>
<DL>
<DD><code>usb_open</code> is to be used to open up a device for use.
 <code>usb_open</code> must be called before attempting to perform any
 operations to the device.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev</CODE> - The device to open.
<DT><B>Returns:</B><DD>a handle used in future communication with the device. 0 if an
         error has occurred.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_close(long)"><!-- --></A><H3>
usb_close</H3>
<PRE>
public static int <B>usb_close</B>(long&nbsp;dev_handle)</PRE>
<DL>
<DD><code>usb_close</code> closes a device opened with
 <code>usb_open</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_set_configuration(long, int)"><!-- --></A><H3>
usb_set_configuration</H3>
<PRE>
public static int <B>usb_set_configuration</B>(long&nbsp;dev_handle,
                                        int&nbsp;configuration)</PRE>
<DL>
<DD>Sets the active configuration of a device
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>configuration</CODE> - The value as specified in the descriptor field
            bConfigurationValue.
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_set_altinterface(long, int)"><!-- --></A><H3>
usb_set_altinterface</H3>
<PRE>
public static int <B>usb_set_altinterface</B>(long&nbsp;dev_handle,
                                       int&nbsp;alternate)</PRE>
<DL>
<DD>Sets the active alternate setting of the current interface
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>alternate</CODE> - The value as specified in the descriptor field
            bAlternateSetting.
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_clear_halt(long, int)"><!-- --></A><H3>
usb_clear_halt</H3>
<PRE>
public static int <B>usb_clear_halt</B>(long&nbsp;dev_handle,
                                 int&nbsp;ep)</PRE>
<DL>
<DD>Clears any halt status on an endpoint.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>ep</CODE> - The value specified in the descriptor field bEndpointAddress.
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_reset(long)"><!-- --></A><H3>
usb_reset</H3>
<PRE>
public static int <B>usb_reset</B>(long&nbsp;dev_handle)</PRE>
<DL>
<DD>Resets a device by sending a RESET down the port it is connected to.<br>
 <br>
 <b>Causes re-enumeration:</b> After calling <code>usb_reset</code>,
 the device will need to re-enumerate and thusly, requires you to find the
 new device and open a new handle. The handle used to call
 <code>usb_reset</code> will no longer work.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_claim_interface(long, int)"><!-- --></A><H3>
usb_claim_interface</H3>
<PRE>
public static int <B>usb_claim_interface</B>(long&nbsp;dev_handle,
                                      int&nbsp;interface_)</PRE>
<DL>
<DD>Claim an interface of a device.<br>
 <br>
 <b>Must be called!:</b> <code>usb_claim_interface</code> must be
 called before you perform any operations related to this interface (like
 <code>usb_set_altinterface, usb_bulk_write</code>, etc).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>interface_</CODE> - The value as specified in the descriptor field
            bInterfaceNumber.
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_release_interface(long, int)"><!-- --></A><H3>
usb_release_interface</H3>
<PRE>
public static int <B>usb_release_interface</B>(long&nbsp;dev_handle,
                                        int&nbsp;interface_)</PRE>
<DL>
<DD>Releases a previously claimed interface
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>interface_</CODE> - The value as specified in the descriptor field
            bInterfaceNumber.
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_control_msg(long, int, int, int, int, byte[], int, int)"><!-- --></A><H3>
usb_control_msg</H3>
<PRE>
public static int <B>usb_control_msg</B>(long&nbsp;dev_handle,
                                  int&nbsp;requesttype,
                                  int&nbsp;request,
                                  int&nbsp;value,
                                  int&nbsp;index,
                                  byte[]&nbsp;bytes,
                                  int&nbsp;size,
                                  int&nbsp;timeout)</PRE>
<DL>
<DD>Performs a control request to the default control pipe on a device. The
 parameters mirror the types of the same name in the USB specification.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>requesttype</CODE> - <DD><CODE>request</CODE> - <DD><CODE>value</CODE> - <DD><CODE>index</CODE> - <DD><CODE>bytes</CODE> - <DD><CODE>size</CODE> - <DD><CODE>timeout</CODE> - 
<DT><B>Returns:</B><DD>the number of bytes written/read or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_get_string(long, int, int)"><!-- --></A><H3>
usb_get_string</H3>
<PRE>
public static java.lang.String <B>usb_get_string</B>(long&nbsp;dev_handle,
                                              int&nbsp;index,
                                              int&nbsp;langid)</PRE>
<DL>
<DD>Retrieves the string descriptor specified by index and langid from a
 device.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>index</CODE> - <DD><CODE>langid</CODE> - 
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_get_string_simple(long, int)"><!-- --></A><H3>
usb_get_string_simple</H3>
<PRE>
public static java.lang.String <B>usb_get_string_simple</B>(long&nbsp;dev_handle,
                                                     int&nbsp;index)</PRE>
<DL>
<DD><code>usb_get_string_simple</code> is a wrapper around
 <code>usb_get_string</code> that retrieves the string description
 specified by index in the first language for the descriptor.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>index</CODE> - 
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_get_descriptor(long, byte, byte, int)"><!-- --></A><H3>
usb_get_descriptor</H3>
<PRE>
public static java.lang.String <B>usb_get_descriptor</B>(long&nbsp;dev_handle,
                                                  byte&nbsp;type,
                                                  byte&nbsp;index,
                                                  int&nbsp;size)</PRE>
<DL>
<DD>Retrieves a descriptor from the device identified by the type and index
 of the descriptor from the default control pipe.<br>
 <br>
 See <A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_descriptor_by_endpoint(long, int, byte, byte, int)"><CODE>usb_get_descriptor_by_endpoint(long, int, byte, byte, int)</CODE></A>
 for a function that allows the control endpoint to be specified.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>type</CODE> - <DD><CODE>index</CODE> - <DD><CODE>size</CODE> - number of charactes which will be retrieved (the length of the
            resulting String)
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_get_descriptor_by_endpoint(long, int, byte, byte, int)"><!-- --></A><H3>
usb_get_descriptor_by_endpoint</H3>
<PRE>
public static java.lang.String <B>usb_get_descriptor_by_endpoint</B>(long&nbsp;dev_handle,
                                                              int&nbsp;ep,
                                                              byte&nbsp;type,
                                                              byte&nbsp;index,
                                                              int&nbsp;size)</PRE>
<DL>
<DD>Retrieves a descriptor from the device identified by the type and index
 of the descriptor from the control pipe identified by ep.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>ep</CODE> - <DD><CODE>type</CODE> - <DD><CODE>index</CODE> - <DD><CODE>size</CODE> - number of charactes which will be retrieved (the length of the
            resulting String)
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_bulk_write(long, int, byte[], int, int)"><!-- --></A><H3>
usb_bulk_write</H3>
<PRE>
public static int <B>usb_bulk_write</B>(long&nbsp;dev_handle,
                                 int&nbsp;ep,
                                 byte[]&nbsp;bytes,
                                 int&nbsp;size,
                                 int&nbsp;timeout)</PRE>
<DL>
<DD>Performs a bulk write request to the endpoint specified by ep.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>ep</CODE> - <DD><CODE>bytes</CODE> - <DD><CODE>size</CODE> - <DD><CODE>timeout</CODE> - 
<DT><B>Returns:</B><DD>the number of bytes written on success or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_bulk_read(long, int, byte[], int, int)"><!-- --></A><H3>
usb_bulk_read</H3>
<PRE>
public static int <B>usb_bulk_read</B>(long&nbsp;dev_handle,
                                int&nbsp;ep,
                                byte[]&nbsp;bytes,
                                int&nbsp;size,
                                int&nbsp;timeout)</PRE>
<DL>
<DD>Performs a bulk read request to the endpoint specified by ep.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>ep</CODE> - <DD><CODE>bytes</CODE> - <DD><CODE>size</CODE> - <DD><CODE>timeout</CODE> - 
<DT><B>Returns:</B><DD>the number of bytes read on success or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_interrupt_write(long, int, byte[], int, int)"><!-- --></A><H3>
usb_interrupt_write</H3>
<PRE>
public static int <B>usb_interrupt_write</B>(long&nbsp;dev_handle,
                                      int&nbsp;ep,
                                      byte[]&nbsp;bytes,
                                      int&nbsp;size,
                                      int&nbsp;timeout)</PRE>
<DL>
<DD>Performs an interrupt write request to the endpoint specified by ep.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>ep</CODE> - <DD><CODE>bytes</CODE> - <DD><CODE>size</CODE> - <DD><CODE>timeout</CODE> - 
<DT><B>Returns:</B><DD>the number of bytes written on success or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_interrupt_read(long, int, byte[], int, int)"><!-- --></A><H3>
usb_interrupt_read</H3>
<PRE>
public static int <B>usb_interrupt_read</B>(long&nbsp;dev_handle,
                                     int&nbsp;ep,
                                     byte[]&nbsp;bytes,
                                     int&nbsp;size,
                                     int&nbsp;timeout)</PRE>
<DL>
<DD>Performs a interrupt read request to the endpoint specified by ep.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>ep</CODE> - <DD><CODE>bytes</CODE> - <DD><CODE>size</CODE> - <DD><CODE>timeout</CODE> - 
<DT><B>Returns:</B><DD>the number of bytes read on success or < 0 on error.</DL>
</DD>
</DL>
<HR>
 
<A NAME="usb_strerror()"><!-- --></A><H3>
usb_strerror</H3>
<PRE>
public static java.lang.String <B>usb_strerror</B>()</PRE>
<DL>
<DD>Returns the error string after an error occured.
<P>
<DD><DL>
 
<DT><B>Returns:</B><DD>the last error sring.</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="../../../ch/ntb/usb/LibLoader.html" title="class in ch.ntb.usb"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../ch/ntb/usb/USB.html" title="class in ch.ntb.usb"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?ch/ntb/usb/LibusbJava.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="LibusbJava.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.