Line 1... |
Line 1... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!--NewPage-->
|
<!--NewPage-->
|
<HTML>
|
<HTML>
|
<HEAD>
|
<HEAD>
|
<!-- Generated by javadoc (build 1.6.0_02) on Wed Sep 29 21:04:05 CEST 2010 -->
|
<!-- Generated by javadoc (build 1.6.0_02) on Mon Jul 18 15:52:41 CEST 2011 -->
|
<TITLE>
|
<TITLE>
|
LibusbJava
|
LibusbJava
|
</TITLE>
|
</TITLE>
|
|
|
<META NAME="date" CONTENT="2010-09-29">
|
<META NAME="date" CONTENT="2011-07-18">
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
|
|
<SCRIPT type="text/javascript">
|
<SCRIPT type="text/javascript">
|
function windowTitle()
|
function windowTitle()
|
Line 223... |
Line 223... |
<B>Method Summary</B></FONT></TH>
|
<B>Method Summary</B></FONT></TH>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_bulk_read(int, int, byte[], int, int)">usb_bulk_read</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_bulk_read(long, int, byte[], int, int)">usb_bulk_read</A></B>(long dev_handle,
|
int ep,
|
int ep,
|
byte[] bytes,
|
byte[] bytes,
|
int size,
|
int size,
|
int timeout)</CODE>
|
int timeout)</CODE>
|
|
|
Line 235... |
Line 235... |
Performs a bulk read request to the endpoint specified by ep.</TD>
|
Performs a bulk read request to the endpoint specified by ep.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_bulk_write(int, int, byte[], int, int)">usb_bulk_write</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_bulk_write(long, int, byte[], int, int)">usb_bulk_write</A></B>(long dev_handle,
|
int ep,
|
int ep,
|
byte[] bytes,
|
byte[] bytes,
|
int size,
|
int size,
|
int timeout)</CODE>
|
int timeout)</CODE>
|
|
|
Line 247... |
Line 247... |
Performs a bulk write request to the endpoint specified by ep.</TD>
|
Performs a bulk write request to the endpoint specified by ep.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_claim_interface(int, int)">usb_claim_interface</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_claim_interface(long, int)">usb_claim_interface</A></B>(long dev_handle,
|
int interface_)</CODE>
|
int interface_)</CODE>
|
|
|
<BR>
|
<BR>
|
Claim an interface of a device.</TD>
|
Claim an interface of a device.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_clear_halt(int, int)">usb_clear_halt</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_clear_halt(long, int)">usb_clear_halt</A></B>(long dev_handle,
|
int ep)</CODE>
|
int ep)</CODE>
|
|
|
<BR>
|
<BR>
|
Clears any halt status on an endpoint.</TD>
|
Clears any halt status on an endpoint.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_close(int)">usb_close</A></B>(int dev_handle)</CODE>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_close(long)">usb_close</A></B>(long dev_handle)</CODE>
|
|
|
<BR>
|
<BR>
|
<code>usb_close</code> closes a device opened with
|
<code>usb_close</code> closes a device opened with
|
<code>usb_open</code>.</TD>
|
<code>usb_open</code>.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_control_msg(int, int, int, int, int, byte[], int, int)">usb_control_msg</A></B>(int dev_handle,
|
<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 dev_handle,
|
int requesttype,
|
int requesttype,
|
int request,
|
int request,
|
int value,
|
int value,
|
int index,
|
int index,
|
byte[] bytes,
|
byte[] bytes,
|
Line 313... |
Line 313... |
<code>usb_get_busses</code> returns a tree of descriptor objects.</TD>
|
<code>usb_get_busses</code> returns a tree of descriptor objects.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static java.lang.String</CODE></FONT></TD>
|
<CODE>static java.lang.String</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_descriptor_by_endpoint(int, int, byte, byte, int)">usb_get_descriptor_by_endpoint</A></B>(int dev_handle,
|
<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 dev_handle,
|
int ep,
|
int ep,
|
byte type,
|
byte type,
|
byte index,
|
byte index,
|
int size)</CODE>
|
int size)</CODE>
|
|
|
Line 326... |
Line 326... |
of the descriptor from the control pipe identified by ep.</TD>
|
of the descriptor from the control pipe identified by ep.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static java.lang.String</CODE></FONT></TD>
|
<CODE>static java.lang.String</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_descriptor(int, byte, byte, int)">usb_get_descriptor</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_descriptor(long, byte, byte, int)">usb_get_descriptor</A></B>(long dev_handle,
|
byte type,
|
byte type,
|
byte index,
|
byte index,
|
int size)</CODE>
|
int size)</CODE>
|
|
|
<BR>
|
<BR>
|
Line 338... |
Line 338... |
of the descriptor from the default control pipe.</TD>
|
of the descriptor from the default control pipe.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static java.lang.String</CODE></FONT></TD>
|
<CODE>static java.lang.String</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_string_simple(int, int)">usb_get_string_simple</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_string_simple(long, int)">usb_get_string_simple</A></B>(long dev_handle,
|
int index)</CODE>
|
int index)</CODE>
|
|
|
<BR>
|
<BR>
|
<code>usb_get_string_simple</code> is a wrapper around
|
<code>usb_get_string_simple</code> is a wrapper around
|
<code>usb_get_string</code> that retrieves the string description
|
<code>usb_get_string</code> that retrieves the string description
|
specified by index in the first language for the descriptor.</TD>
|
specified by index in the first language for the descriptor.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static java.lang.String</CODE></FONT></TD>
|
<CODE>static java.lang.String</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_string(int, int, int)">usb_get_string</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_string(long, int, int)">usb_get_string</A></B>(long dev_handle,
|
int index,
|
int index,
|
int langid)</CODE>
|
int langid)</CODE>
|
|
|
<BR>
|
<BR>
|
Retrieves the string descriptor specified by index and langid from a
|
Retrieves the string descriptor specified by index and langid from a
|
Line 369... |
Line 369... |
structures.</TD>
|
structures.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_interrupt_read(int, int, byte[], int, int)">usb_interrupt_read</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_interrupt_read(long, int, byte[], int, int)">usb_interrupt_read</A></B>(long dev_handle,
|
int ep,
|
int ep,
|
byte[] bytes,
|
byte[] bytes,
|
int size,
|
int size,
|
int timeout)</CODE>
|
int timeout)</CODE>
|
|
|
Line 381... |
Line 381... |
Performs a interrupt read request to the endpoint specified by ep.</TD>
|
Performs a interrupt read request to the endpoint specified by ep.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_interrupt_write(int, int, byte[], int, int)">usb_interrupt_write</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_interrupt_write(long, int, byte[], int, int)">usb_interrupt_write</A></B>(long dev_handle,
|
int ep,
|
int ep,
|
byte[] bytes,
|
byte[] bytes,
|
int size,
|
int size,
|
int timeout)</CODE>
|
int timeout)</CODE>
|
|
|
<BR>
|
<BR>
|
Performs an interrupt write request to the endpoint specified by ep.</TD>
|
Performs an interrupt write request to the endpoint specified by ep.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static 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> dev)</CODE>
|
<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> dev)</CODE>
|
|
|
<BR>
|
<BR>
|
<code>usb_open</code> is to be used to open up a device for use.</TD>
|
<code>usb_open</code> is to be used to open up a device for use.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_release_interface(int, int)">usb_release_interface</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_release_interface(long, int)">usb_release_interface</A></B>(long dev_handle,
|
int interface_)</CODE>
|
int interface_)</CODE>
|
|
|
<BR>
|
<BR>
|
Releases a previously claimed interface</TD>
|
Releases a previously claimed interface</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_reset(int)">usb_reset</A></B>(int dev_handle)</CODE>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_reset(long)">usb_reset</A></B>(long dev_handle)</CODE>
|
|
|
<BR>
|
<BR>
|
Resets a device by sending a RESET down the port it is connected to.</TD>
|
Resets a device by sending a RESET down the port it is connected to.</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_set_altinterface(int, int)">usb_set_altinterface</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_set_altinterface(long, int)">usb_set_altinterface</A></B>(long dev_handle,
|
int alternate)</CODE>
|
int alternate)</CODE>
|
|
|
<BR>
|
<BR>
|
Sets the active alternate setting of the current interface</TD>
|
Sets the active alternate setting of the current interface</TD>
|
</TR>
|
</TR>
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
<CODE>static int</CODE></FONT></TD>
|
<CODE>static int</CODE></FONT></TD>
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_set_configuration(int, int)">usb_set_configuration</A></B>(int dev_handle,
|
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_set_configuration(long, int)">usb_set_configuration</A></B>(long dev_handle,
|
int configuration)</CODE>
|
int configuration)</CODE>
|
|
|
<BR>
|
<BR>
|
Sets the active configuration of a device</TD>
|
Sets the active configuration of a device</TD>
|
</TR>
|
</TR>
|
Line 695... |
Line 695... |
<HR>
|
<HR>
|
|
|
<A NAME="usb_open(ch.ntb.usb.Usb_Device)"><!-- --></A><H3>
|
<A NAME="usb_open(ch.ntb.usb.Usb_Device)"><!-- --></A><H3>
|
usb_open</H3>
|
usb_open</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_open</B>(<A HREF="../../../ch/ntb/usb/Usb_Device.html" title="class in ch.ntb.usb">Usb_Device</A> dev)</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> dev)</PRE>
|
<DL>
|
<DL>
|
<DD><code>usb_open</code> is to be used to open up a device for use.
|
<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
|
<code>usb_open</code> must be called before attempting to perform any
|
operations to the device.
|
operations to the device.
|
<P>
|
<P>
|
Line 709... |
Line 709... |
error has occurred.</DL>
|
error has occurred.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_close(int)"><!-- --></A><H3>
|
<A NAME="usb_close(long)"><!-- --></A><H3>
|
usb_close</H3>
|
usb_close</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_close</B>(int dev_handle)</PRE>
|
public static int <B>usb_close</B>(long dev_handle)</PRE>
|
<DL>
|
<DL>
|
<DD><code>usb_close</code> closes a device opened with
|
<DD><code>usb_close</code> closes a device opened with
|
<code>usb_open</code>.
|
<code>usb_open</code>.
|
<P>
|
<P>
|
<DD><DL>
|
<DD><DL>
|
Line 724... |
Line 724... |
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_set_configuration(int, int)"><!-- --></A><H3>
|
<A NAME="usb_set_configuration(long, int)"><!-- --></A><H3>
|
usb_set_configuration</H3>
|
usb_set_configuration</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_set_configuration</B>(int dev_handle,
|
public static int <B>usb_set_configuration</B>(long dev_handle,
|
int configuration)</PRE>
|
int configuration)</PRE>
|
<DL>
|
<DL>
|
<DD>Sets the active configuration of a device
|
<DD>Sets the active configuration of a device
|
<P>
|
<P>
|
<DD><DL>
|
<DD><DL>
|
Line 740... |
Line 740... |
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_set_altinterface(int, int)"><!-- --></A><H3>
|
<A NAME="usb_set_altinterface(long, int)"><!-- --></A><H3>
|
usb_set_altinterface</H3>
|
usb_set_altinterface</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_set_altinterface</B>(int dev_handle,
|
public static int <B>usb_set_altinterface</B>(long dev_handle,
|
int alternate)</PRE>
|
int alternate)</PRE>
|
<DL>
|
<DL>
|
<DD>Sets the active alternate setting of the current interface
|
<DD>Sets the active alternate setting of the current interface
|
<P>
|
<P>
|
<DD><DL>
|
<DD><DL>
|
Line 756... |
Line 756... |
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_clear_halt(int, int)"><!-- --></A><H3>
|
<A NAME="usb_clear_halt(long, int)"><!-- --></A><H3>
|
usb_clear_halt</H3>
|
usb_clear_halt</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_clear_halt</B>(int dev_handle,
|
public static int <B>usb_clear_halt</B>(long dev_handle,
|
int ep)</PRE>
|
int ep)</PRE>
|
<DL>
|
<DL>
|
<DD>Clears any halt status on an endpoint.
|
<DD>Clears any halt status on an endpoint.
|
<P>
|
<P>
|
<DD><DL>
|
<DD><DL>
|
Line 771... |
Line 771... |
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_reset(int)"><!-- --></A><H3>
|
<A NAME="usb_reset(long)"><!-- --></A><H3>
|
usb_reset</H3>
|
usb_reset</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_reset</B>(int dev_handle)</PRE>
|
public static int <B>usb_reset</B>(long dev_handle)</PRE>
|
<DL>
|
<DL>
|
<DD>Resets a device by sending a RESET down the port it is connected to.<br>
|
<DD>Resets a device by sending a RESET down the port it is connected to.<br>
|
<br>
|
<br>
|
<b>Causes re-enumeration:</b> After calling <code>usb_reset</code>,
|
<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
|
the device will need to re-enumerate and thusly, requires you to find the
|
Line 790... |
Line 790... |
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_claim_interface(int, int)"><!-- --></A><H3>
|
<A NAME="usb_claim_interface(long, int)"><!-- --></A><H3>
|
usb_claim_interface</H3>
|
usb_claim_interface</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_claim_interface</B>(int dev_handle,
|
public static int <B>usb_claim_interface</B>(long dev_handle,
|
int interface_)</PRE>
|
int interface_)</PRE>
|
<DL>
|
<DL>
|
<DD>Claim an interface of a device.<br>
|
<DD>Claim an interface of a device.<br>
|
<br>
|
<br>
|
<b>Must be called!:</b> <code>usb_claim_interface</code> must be
|
<b>Must be called!:</b> <code>usb_claim_interface</code> must be
|
Line 810... |
Line 810... |
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_release_interface(int, int)"><!-- --></A><H3>
|
<A NAME="usb_release_interface(long, int)"><!-- --></A><H3>
|
usb_release_interface</H3>
|
usb_release_interface</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_release_interface</B>(int dev_handle,
|
public static int <B>usb_release_interface</B>(long dev_handle,
|
int interface_)</PRE>
|
int interface_)</PRE>
|
<DL>
|
<DL>
|
<DD>Releases a previously claimed interface
|
<DD>Releases a previously claimed interface
|
<P>
|
<P>
|
<DD><DL>
|
<DD><DL>
|
Line 826... |
Line 826... |
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_control_msg(int, int, int, int, int, byte[], int, int)"><!-- --></A><H3>
|
<A NAME="usb_control_msg(long, int, int, int, int, byte[], int, int)"><!-- --></A><H3>
|
usb_control_msg</H3>
|
usb_control_msg</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_control_msg</B>(int dev_handle,
|
public static int <B>usb_control_msg</B>(long dev_handle,
|
int requesttype,
|
int requesttype,
|
int request,
|
int request,
|
int value,
|
int value,
|
int index,
|
int index,
|
byte[] bytes,
|
byte[] bytes,
|
Line 848... |
Line 848... |
<DT><B>Returns:</B><DD>the number of bytes written/read or < 0 on error.</DL>
|
<DT><B>Returns:</B><DD>the number of bytes written/read or < 0 on error.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_get_string(int, int, int)"><!-- --></A><H3>
|
<A NAME="usb_get_string(long, int, int)"><!-- --></A><H3>
|
usb_get_string</H3>
|
usb_get_string</H3>
|
<PRE>
|
<PRE>
|
public static java.lang.String <B>usb_get_string</B>(int dev_handle,
|
public static java.lang.String <B>usb_get_string</B>(long dev_handle,
|
int index,
|
int index,
|
int langid)</PRE>
|
int langid)</PRE>
|
<DL>
|
<DL>
|
<DD>Retrieves the string descriptor specified by index and langid from a
|
<DD>Retrieves the string descriptor specified by index and langid from a
|
device.
|
device.
|
Line 865... |
Line 865... |
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
|
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_get_string_simple(int, int)"><!-- --></A><H3>
|
<A NAME="usb_get_string_simple(long, int)"><!-- --></A><H3>
|
usb_get_string_simple</H3>
|
usb_get_string_simple</H3>
|
<PRE>
|
<PRE>
|
public static java.lang.String <B>usb_get_string_simple</B>(int dev_handle,
|
public static java.lang.String <B>usb_get_string_simple</B>(long dev_handle,
|
int index)</PRE>
|
int index)</PRE>
|
<DL>
|
<DL>
|
<DD><code>usb_get_string_simple</code> is a wrapper around
|
<DD><code>usb_get_string_simple</code> is a wrapper around
|
<code>usb_get_string</code> that retrieves the string description
|
<code>usb_get_string</code> that retrieves the string description
|
specified by index in the first language for the descriptor.
|
specified by index in the first language for the descriptor.
|
Line 882... |
Line 882... |
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
|
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_get_descriptor(int, byte, byte, int)"><!-- --></A><H3>
|
<A NAME="usb_get_descriptor(long, byte, byte, int)"><!-- --></A><H3>
|
usb_get_descriptor</H3>
|
usb_get_descriptor</H3>
|
<PRE>
|
<PRE>
|
public static java.lang.String <B>usb_get_descriptor</B>(int dev_handle,
|
public static java.lang.String <B>usb_get_descriptor</B>(long dev_handle,
|
byte type,
|
byte type,
|
byte index,
|
byte index,
|
int size)</PRE>
|
int size)</PRE>
|
<DL>
|
<DL>
|
<DD>Retrieves a descriptor from the device identified by the type and index
|
<DD>Retrieves a descriptor from the device identified by the type and index
|
of the descriptor from the default control pipe.<br>
|
of the descriptor from the default control pipe.<br>
|
<br>
|
<br>
|
See <A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_descriptor_by_endpoint(int, int, byte, byte, int)"><CODE>usb_get_descriptor_by_endpoint(int, int, byte, byte, int)</CODE></A>
|
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.
|
for a function that allows the control endpoint to be specified.
|
<P>
|
<P>
|
<DD><DL>
|
<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
|
<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)
|
resulting String)
|
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
|
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_get_descriptor_by_endpoint(int, int, byte, byte, int)"><!-- --></A><H3>
|
<A NAME="usb_get_descriptor_by_endpoint(long, int, byte, byte, int)"><!-- --></A><H3>
|
usb_get_descriptor_by_endpoint</H3>
|
usb_get_descriptor_by_endpoint</H3>
|
<PRE>
|
<PRE>
|
public static java.lang.String <B>usb_get_descriptor_by_endpoint</B>(int dev_handle,
|
public static java.lang.String <B>usb_get_descriptor_by_endpoint</B>(long dev_handle,
|
int ep,
|
int ep,
|
byte type,
|
byte type,
|
byte index,
|
byte index,
|
int size)</PRE>
|
int size)</PRE>
|
<DL>
|
<DL>
|
Line 924... |
Line 924... |
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
|
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_bulk_write(int, int, byte[], int, int)"><!-- --></A><H3>
|
<A NAME="usb_bulk_write(long, int, byte[], int, int)"><!-- --></A><H3>
|
usb_bulk_write</H3>
|
usb_bulk_write</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_bulk_write</B>(int dev_handle,
|
public static int <B>usb_bulk_write</B>(long dev_handle,
|
int ep,
|
int ep,
|
byte[] bytes,
|
byte[] bytes,
|
int size,
|
int size,
|
int timeout)</PRE>
|
int timeout)</PRE>
|
<DL>
|
<DL>
|
Line 942... |
Line 942... |
<DT><B>Returns:</B><DD>the number of bytes written on success or < 0 on error.</DL>
|
<DT><B>Returns:</B><DD>the number of bytes written on success or < 0 on error.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_bulk_read(int, int, byte[], int, int)"><!-- --></A><H3>
|
<A NAME="usb_bulk_read(long, int, byte[], int, int)"><!-- --></A><H3>
|
usb_bulk_read</H3>
|
usb_bulk_read</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_bulk_read</B>(int dev_handle,
|
public static int <B>usb_bulk_read</B>(long dev_handle,
|
int ep,
|
int ep,
|
byte[] bytes,
|
byte[] bytes,
|
int size,
|
int size,
|
int timeout)</PRE>
|
int timeout)</PRE>
|
<DL>
|
<DL>
|
Line 960... |
Line 960... |
<DT><B>Returns:</B><DD>the number of bytes read on success or < 0 on error.</DL>
|
<DT><B>Returns:</B><DD>the number of bytes read on success or < 0 on error.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_interrupt_write(int, int, byte[], int, int)"><!-- --></A><H3>
|
<A NAME="usb_interrupt_write(long, int, byte[], int, int)"><!-- --></A><H3>
|
usb_interrupt_write</H3>
|
usb_interrupt_write</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_interrupt_write</B>(int dev_handle,
|
public static int <B>usb_interrupt_write</B>(long dev_handle,
|
int ep,
|
int ep,
|
byte[] bytes,
|
byte[] bytes,
|
int size,
|
int size,
|
int timeout)</PRE>
|
int timeout)</PRE>
|
<DL>
|
<DL>
|
Line 978... |
Line 978... |
<DT><B>Returns:</B><DD>the number of bytes written on success or < 0 on error.</DL>
|
<DT><B>Returns:</B><DD>the number of bytes written on success or < 0 on error.</DL>
|
</DD>
|
</DD>
|
</DL>
|
</DL>
|
<HR>
|
<HR>
|
|
|
<A NAME="usb_interrupt_read(int, int, byte[], int, int)"><!-- --></A><H3>
|
<A NAME="usb_interrupt_read(long, int, byte[], int, int)"><!-- --></A><H3>
|
usb_interrupt_read</H3>
|
usb_interrupt_read</H3>
|
<PRE>
|
<PRE>
|
public static int <B>usb_interrupt_read</B>(int dev_handle,
|
public static int <B>usb_interrupt_read</B>(long dev_handle,
|
int ep,
|
int ep,
|
byte[] bytes,
|
byte[] bytes,
|
int size,
|
int size,
|
int timeout)</PRE>
|
int timeout)</PRE>
|
<DL>
|
<DL>
|