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

Subversion Repositories usb_fpga_1_11

[/] [usb_fpga_1_11/] [trunk/] [docs/] [java/] [ch/] [ntb/] [usb/] [LibusbJava.html] - Blame information for rev 3

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<!--NewPage-->
3
<HTML>
4
<HEAD>
5 3 ZTEX
<!-- Generated by javadoc (build 1.6.0_02) on Wed Sep 29 21:04:05 CEST 2010 -->
6 2 ZTEX
<TITLE>
7
LibusbJava
8
</TITLE>
9
 
10 3 ZTEX
<META NAME="date" CONTENT="2010-09-29">
11 2 ZTEX
 
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
13
 
14
<SCRIPT type="text/javascript">
15
function windowTitle()
16
{
17
    if (location.href.indexOf('is-external=true') == -1) {
18
        parent.document.title="LibusbJava";
19
    }
20
}
21
</SCRIPT>
22
<NOSCRIPT>
23
</NOSCRIPT>
24
 
25
</HEAD>
26
 
27
<BODY BGCOLOR="white" onload="windowTitle();">
28
<HR>
29
 
30
 
31
<!-- ========= START OF TOP NAVBAR ======= -->
32
<A NAME="navbar_top"><!-- --></A>
33
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35
<TR>
36
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37
<A NAME="navbar_top_firstrow"><!-- --></A>
38
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39
  <TR ALIGN="center" VALIGN="top">
40
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
44
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
45
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
46
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
47
  </TR>
48
</TABLE>
49
</TD>
50
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51
</EM>
52
</TD>
53
</TR>
54
 
55
<TR>
56
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57
&nbsp;<A HREF="../../../ch/ntb/usb/LibLoader.html" title="class in ch.ntb.usb"><B>PREV CLASS</B></A>&nbsp;
58
&nbsp;<A HREF="../../../ch/ntb/usb/USB.html" title="class in ch.ntb.usb"><B>NEXT CLASS</B></A></FONT></TD>
59
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60
  <A HREF="../../../index.html?ch/ntb/usb/LibusbJava.html" target="_top"><B>FRAMES</B></A>  &nbsp;
61
&nbsp;<A HREF="LibusbJava.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
62
&nbsp;<SCRIPT type="text/javascript">
63
  <!--
64
  if(window==top) {
65
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
66
  }
67
  //-->
68
</SCRIPT>
69
<NOSCRIPT>
70
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
71
</NOSCRIPT>
72
 
73
 
74
</FONT></TD>
75
</TR>
76
<TR>
77
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78
  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>
79
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80
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>
81
</TR>
82
</TABLE>
83
<A NAME="skip-navbar_top"></A>
84
<!-- ========= END OF TOP NAVBAR ========= -->
85
 
86
<HR>
87
<!-- ======== START OF CLASS DATA ======== -->
88
<H2>
89
<FONT SIZE="-1">
90
ch.ntb.usb</FONT>
91
<BR>
92
Class LibusbJava</H2>
93
<PRE>
94
java.lang.Object
95
  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>ch.ntb.usb.LibusbJava</B>
96
</PRE>
97
<HR>
98
<DL>
99
<DT><PRE>public class <B>LibusbJava</B><DT>extends java.lang.Object</DL>
100
</PRE>
101
 
102
<P>
103
This class represents the Java Native Interface to the shared library which
104
 is (with some exceptions) a one-to-one representation of the libusb API.<br>
105
 <br>
106
 <h1>Project Description</h1>
107
 Java libusb is a Java wrapper for the libusb and libusb-win32 USB library.
108
 
109
 <a href="http://libusb.sourceforge.net/">libusb</a> aim is to create a
110
 library for use by user level applications to access USB devices regardless
111
 of OS.<br>
112
 <a href="http://libusb-win32.sourceforge.net/">Libusb-win32</a> is a port of
113
 the USB library <a href="http://libusb.sourceforge.net/">libusb</a> to the
114
 Windows operating systems. The library allows user space applications to
115
 access any USB device on Windows in a generic way without writing any line of
116
 kernel driver code.<br>
117
 <br>
118
 The API description of this class has been copied from the <a
119
 href="http://libusb.sourceforge.net/documentation.html">libusb documentation</a>
120
 and adapted where neccessary.<br>
121
<P>
122
 
123
<P>
124
<HR>
125
 
126
<P>
127
<!-- =========== FIELD SUMMARY =========== -->
128
 
129
<A NAME="field_summary"><!-- --></A>
130
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
131
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
132
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
133
<B>Field Summary</B></FONT></TH>
134
</TR>
135
<TR BGCOLOR="white" CLASS="TableRowColor">
136
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
137
<CODE>static&nbsp;int</CODE></FONT></TD>
138
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_BAD_FILE_DESCRIPTOR">ERROR_BAD_FILE_DESCRIPTOR</A></B></CODE>
139
 
140
<BR>
141
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
142
</TR>
143
<TR BGCOLOR="white" CLASS="TableRowColor">
144
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
145
<CODE>static&nbsp;int</CODE></FONT></TD>
146
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_BUSY">ERROR_BUSY</A></B></CODE>
147
 
148
<BR>
149
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
150
</TR>
151
<TR BGCOLOR="white" CLASS="TableRowColor">
152
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
153
<CODE>static&nbsp;int</CODE></FONT></TD>
154
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_INVALID_PARAMETER">ERROR_INVALID_PARAMETER</A></B></CODE>
155
 
156
<BR>
157
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
158
</TR>
159
<TR BGCOLOR="white" CLASS="TableRowColor">
160
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
161
<CODE>static&nbsp;int</CODE></FONT></TD>
162
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_IO_ERROR">ERROR_IO_ERROR</A></B></CODE>
163
 
164
<BR>
165
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
166
</TR>
167
<TR BGCOLOR="white" CLASS="TableRowColor">
168
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
169
<CODE>static&nbsp;int</CODE></FONT></TD>
170
<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>
171
 
172
<BR>
173
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
174
</TR>
175
<TR BGCOLOR="white" CLASS="TableRowColor">
176
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
177
<CODE>static&nbsp;int</CODE></FONT></TD>
178
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_NOT_ENOUGH_MEMORY">ERROR_NOT_ENOUGH_MEMORY</A></B></CODE>
179
 
180
<BR>
181
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
182
</TR>
183
<TR BGCOLOR="white" CLASS="TableRowColor">
184
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
185
<CODE>static&nbsp;int</CODE></FONT></TD>
186
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_SUCCESS">ERROR_SUCCESS</A></B></CODE>
187
 
188
<BR>
189
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
190
</TR>
191
<TR BGCOLOR="white" CLASS="TableRowColor">
192
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
193
<CODE>static&nbsp;int</CODE></FONT></TD>
194
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#ERROR_TIMEDOUT">ERROR_TIMEDOUT</A></B></CODE>
195
 
196
<BR>
197
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System error codes.</TD>
198
</TR>
199
</TABLE>
200
&nbsp;
201
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
202
 
203
<A NAME="constructor_summary"><!-- --></A>
204
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
205
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
206
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
207
<B>Constructor Summary</B></FONT></TH>
208
</TR>
209
<TR BGCOLOR="white" CLASS="TableRowColor">
210
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#LibusbJava()">LibusbJava</A></B>()</CODE>
211
 
212
<BR>
213
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
214
</TR>
215
</TABLE>
216
&nbsp;
217
<!-- ========== METHOD SUMMARY =========== -->
218
 
219
<A NAME="method_summary"><!-- --></A>
220
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
221
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
222
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
223
<B>Method Summary</B></FONT></TH>
224
</TR>
225
<TR BGCOLOR="white" CLASS="TableRowColor">
226
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
227
<CODE>static&nbsp;int</CODE></FONT></TD>
228
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_bulk_read(int, int, byte[], int, int)">usb_bulk_read</A></B>(int&nbsp;dev_handle,
229
              int&nbsp;ep,
230
              byte[]&nbsp;bytes,
231
              int&nbsp;size,
232
              int&nbsp;timeout)</CODE>
233
 
234
<BR>
235
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs a bulk read request to the endpoint specified by ep.</TD>
236
</TR>
237
<TR BGCOLOR="white" CLASS="TableRowColor">
238
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
239
<CODE>static&nbsp;int</CODE></FONT></TD>
240
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_bulk_write(int, int, byte[], int, int)">usb_bulk_write</A></B>(int&nbsp;dev_handle,
241
               int&nbsp;ep,
242
               byte[]&nbsp;bytes,
243
               int&nbsp;size,
244
               int&nbsp;timeout)</CODE>
245
 
246
<BR>
247
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs a bulk write request to the endpoint specified by ep.</TD>
248
</TR>
249
<TR BGCOLOR="white" CLASS="TableRowColor">
250
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
251
<CODE>static&nbsp;int</CODE></FONT></TD>
252
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_claim_interface(int, int)">usb_claim_interface</A></B>(int&nbsp;dev_handle,
253
                    int&nbsp;interface_)</CODE>
254
 
255
<BR>
256
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Claim an interface of a device.</TD>
257
</TR>
258
<TR BGCOLOR="white" CLASS="TableRowColor">
259
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
260
<CODE>static&nbsp;int</CODE></FONT></TD>
261
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_clear_halt(int, int)">usb_clear_halt</A></B>(int&nbsp;dev_handle,
262
               int&nbsp;ep)</CODE>
263
 
264
<BR>
265
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears any halt status on an endpoint.</TD>
266
</TR>
267
<TR BGCOLOR="white" CLASS="TableRowColor">
268
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
269
<CODE>static&nbsp;int</CODE></FONT></TD>
270
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_close(int)">usb_close</A></B>(int&nbsp;dev_handle)</CODE>
271
 
272
<BR>
273
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>usb_close</code> closes a device opened with
274
 <code>usb_open</code>.</TD>
275
</TR>
276
<TR BGCOLOR="white" CLASS="TableRowColor">
277
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
278
<CODE>static&nbsp;int</CODE></FONT></TD>
279
<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&nbsp;dev_handle,
280
                int&nbsp;requesttype,
281
                int&nbsp;request,
282
                int&nbsp;value,
283
                int&nbsp;index,
284
                byte[]&nbsp;bytes,
285
                int&nbsp;size,
286
                int&nbsp;timeout)</CODE>
287
 
288
<BR>
289
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs a control request to the default control pipe on a device.</TD>
290
</TR>
291
<TR BGCOLOR="white" CLASS="TableRowColor">
292
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
293
<CODE>static&nbsp;int</CODE></FONT></TD>
294
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_find_busses()">usb_find_busses</A></B>()</CODE>
295
 
296
<BR>
297
&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>
298
</TR>
299
<TR BGCOLOR="white" CLASS="TableRowColor">
300
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
301
<CODE>static&nbsp;int</CODE></FONT></TD>
302
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_find_devices()">usb_find_devices</A></B>()</CODE>
303
 
304
<BR>
305
&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>
306
</TR>
307
<TR BGCOLOR="white" CLASS="TableRowColor">
308
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
309
<CODE>static&nbsp;<A HREF="../../../ch/ntb/usb/Usb_Bus.html" title="class in ch.ntb.usb">Usb_Bus</A></CODE></FONT></TD>
310
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_busses()">usb_get_busses</A></B>()</CODE>
311
 
312
<BR>
313
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>usb_get_busses</code> returns a tree of descriptor objects.</TD>
314
</TR>
315
<TR BGCOLOR="white" CLASS="TableRowColor">
316
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
317
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
318
<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&nbsp;dev_handle,
319
                               int&nbsp;ep,
320
                               byte&nbsp;type,
321
                               byte&nbsp;index,
322
                               int&nbsp;size)</CODE>
323
 
324
<BR>
325
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves a descriptor from the device identified by the type and index
326
 of the descriptor from the control pipe identified by ep.</TD>
327
</TR>
328
<TR BGCOLOR="white" CLASS="TableRowColor">
329
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
330
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
331
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_descriptor(int, byte, byte, int)">usb_get_descriptor</A></B>(int&nbsp;dev_handle,
332
                   byte&nbsp;type,
333
                   byte&nbsp;index,
334
                   int&nbsp;size)</CODE>
335
 
336
<BR>
337
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves a descriptor from the device identified by the type and index
338
 of the descriptor from the default control pipe.</TD>
339
</TR>
340
<TR BGCOLOR="white" CLASS="TableRowColor">
341
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
342
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
343
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_string_simple(int, int)">usb_get_string_simple</A></B>(int&nbsp;dev_handle,
344
                      int&nbsp;index)</CODE>
345
 
346
<BR>
347
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<code>usb_get_string_simple</code> is a wrapper around
348
 <code>usb_get_string</code> that retrieves the string description
349
 specified by index in the first language for the descriptor.</TD>
350
</TR>
351
<TR BGCOLOR="white" CLASS="TableRowColor">
352
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
353
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
354
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_get_string(int, int, int)">usb_get_string</A></B>(int&nbsp;dev_handle,
355
               int&nbsp;index,
356
               int&nbsp;langid)</CODE>
357
 
358
<BR>
359
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the string descriptor specified by index and langid from a
360
 device.</TD>
361
</TR>
362
<TR BGCOLOR="white" CLASS="TableRowColor">
363
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
364
<CODE>static&nbsp;void</CODE></FONT></TD>
365
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_init()">usb_init</A></B>()</CODE>
366
 
367
<BR>
368
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Just like the name implies, <code>usb_init</code> sets up some internal
369
 structures.</TD>
370
</TR>
371
<TR BGCOLOR="white" CLASS="TableRowColor">
372
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
373
<CODE>static&nbsp;int</CODE></FONT></TD>
374
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_interrupt_read(int, int, byte[], int, int)">usb_interrupt_read</A></B>(int&nbsp;dev_handle,
375
                   int&nbsp;ep,
376
                   byte[]&nbsp;bytes,
377
                   int&nbsp;size,
378
                   int&nbsp;timeout)</CODE>
379
 
380
<BR>
381
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs a interrupt read request to the endpoint specified by ep.</TD>
382
</TR>
383
<TR BGCOLOR="white" CLASS="TableRowColor">
384
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
385
<CODE>static&nbsp;int</CODE></FONT></TD>
386
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_interrupt_write(int, int, byte[], int, int)">usb_interrupt_write</A></B>(int&nbsp;dev_handle,
387
                    int&nbsp;ep,
388
                    byte[]&nbsp;bytes,
389
                    int&nbsp;size,
390
                    int&nbsp;timeout)</CODE>
391
 
392
<BR>
393
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs an interrupt write request to the endpoint specified by ep.</TD>
394
</TR>
395
<TR BGCOLOR="white" CLASS="TableRowColor">
396
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
397
<CODE>static&nbsp;int</CODE></FONT></TD>
398
<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>
399
 
400
<BR>
401
&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>
402
</TR>
403
<TR BGCOLOR="white" CLASS="TableRowColor">
404
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
405
<CODE>static&nbsp;int</CODE></FONT></TD>
406
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_release_interface(int, int)">usb_release_interface</A></B>(int&nbsp;dev_handle,
407
                      int&nbsp;interface_)</CODE>
408
 
409
<BR>
410
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Releases a previously claimed interface</TD>
411
</TR>
412
<TR BGCOLOR="white" CLASS="TableRowColor">
413
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
414
<CODE>static&nbsp;int</CODE></FONT></TD>
415
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_reset(int)">usb_reset</A></B>(int&nbsp;dev_handle)</CODE>
416
 
417
<BR>
418
&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>
419
</TR>
420
<TR BGCOLOR="white" CLASS="TableRowColor">
421
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
422
<CODE>static&nbsp;int</CODE></FONT></TD>
423
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_set_altinterface(int, int)">usb_set_altinterface</A></B>(int&nbsp;dev_handle,
424
                     int&nbsp;alternate)</CODE>
425
 
426
<BR>
427
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the active alternate setting of the current interface</TD>
428
</TR>
429
<TR BGCOLOR="white" CLASS="TableRowColor">
430
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
431
<CODE>static&nbsp;int</CODE></FONT></TD>
432
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_set_configuration(int, int)">usb_set_configuration</A></B>(int&nbsp;dev_handle,
433
                      int&nbsp;configuration)</CODE>
434
 
435
<BR>
436
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the active configuration of a device</TD>
437
</TR>
438
<TR BGCOLOR="white" CLASS="TableRowColor">
439
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
440
<CODE>static&nbsp;void</CODE></FONT></TD>
441
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_set_debug(int)">usb_set_debug</A></B>(int&nbsp;level)</CODE>
442
 
443
<BR>
444
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the debugging level of libusb.</TD>
445
</TR>
446
<TR BGCOLOR="white" CLASS="TableRowColor">
447
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
448
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
449
<TD><CODE><B><A HREF="../../../ch/ntb/usb/LibusbJava.html#usb_strerror()">usb_strerror</A></B>()</CODE>
450
 
451
<BR>
452
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the error string after an error occured.</TD>
453
</TR>
454
</TABLE>
455
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
456
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
457
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
458
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
459
</TR>
460
<TR BGCOLOR="white" CLASS="TableRowColor">
461
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
462
</TR>
463
</TABLE>
464
&nbsp;
465
<P>
466
 
467
<!-- ============ FIELD DETAIL =========== -->
468
 
469
<A NAME="field_detail"><!-- --></A>
470
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
471
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
472
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
473
<B>Field Detail</B></FONT></TH>
474
</TR>
475
</TABLE>
476
 
477
<A NAME="ERROR_SUCCESS"><!-- --></A><H3>
478
ERROR_SUCCESS</H3>
479
<PRE>
480
public static int <B>ERROR_SUCCESS</B></PRE>
481
<DL>
482
<DD>System error codes.<br>
483
 This list is not complete! For more error codes see the file 'errorno.h'
484
 on your system.
485
<P>
486
<DL>
487
</DL>
488
</DL>
489
<HR>
490
 
491
<A NAME="ERROR_BAD_FILE_DESCRIPTOR"><!-- --></A><H3>
492
ERROR_BAD_FILE_DESCRIPTOR</H3>
493
<PRE>
494
public static int <B>ERROR_BAD_FILE_DESCRIPTOR</B></PRE>
495
<DL>
496
<DD>System error codes.<br>
497
 This list is not complete! For more error codes see the file 'errorno.h'
498
 on your system.
499
<P>
500
<DL>
501
</DL>
502
</DL>
503
<HR>
504
 
505
<A NAME="ERROR_NO_SUCH_DEVICE_OR_ADDRESS"><!-- --></A><H3>
506
ERROR_NO_SUCH_DEVICE_OR_ADDRESS</H3>
507
<PRE>
508
public static int <B>ERROR_NO_SUCH_DEVICE_OR_ADDRESS</B></PRE>
509
<DL>
510
<DD>System error codes.<br>
511
 This list is not complete! For more error codes see the file 'errorno.h'
512
 on your system.
513
<P>
514
<DL>
515
</DL>
516
</DL>
517
<HR>
518
 
519
<A NAME="ERROR_BUSY"><!-- --></A><H3>
520
ERROR_BUSY</H3>
521
<PRE>
522
public static int <B>ERROR_BUSY</B></PRE>
523
<DL>
524
<DD>System error codes.<br>
525
 This list is not complete! For more error codes see the file 'errorno.h'
526
 on your system.
527
<P>
528
<DL>
529
</DL>
530
</DL>
531
<HR>
532
 
533
<A NAME="ERROR_INVALID_PARAMETER"><!-- --></A><H3>
534
ERROR_INVALID_PARAMETER</H3>
535
<PRE>
536
public static int <B>ERROR_INVALID_PARAMETER</B></PRE>
537
<DL>
538
<DD>System error codes.<br>
539
 This list is not complete! For more error codes see the file 'errorno.h'
540
 on your system.
541
<P>
542
<DL>
543
</DL>
544
</DL>
545
<HR>
546
 
547
<A NAME="ERROR_TIMEDOUT"><!-- --></A><H3>
548
ERROR_TIMEDOUT</H3>
549
<PRE>
550
public static int <B>ERROR_TIMEDOUT</B></PRE>
551
<DL>
552
<DD>System error codes.<br>
553
 This list is not complete! For more error codes see the file 'errorno.h'
554
 on your system.
555
<P>
556
<DL>
557
</DL>
558
</DL>
559
<HR>
560
 
561
<A NAME="ERROR_IO_ERROR"><!-- --></A><H3>
562
ERROR_IO_ERROR</H3>
563
<PRE>
564
public static int <B>ERROR_IO_ERROR</B></PRE>
565
<DL>
566
<DD>System error codes.<br>
567
 This list is not complete! For more error codes see the file 'errorno.h'
568
 on your system.
569
<P>
570
<DL>
571
</DL>
572
</DL>
573
<HR>
574
 
575
<A NAME="ERROR_NOT_ENOUGH_MEMORY"><!-- --></A><H3>
576
ERROR_NOT_ENOUGH_MEMORY</H3>
577
<PRE>
578
public static int <B>ERROR_NOT_ENOUGH_MEMORY</B></PRE>
579
<DL>
580
<DD>System error codes.<br>
581
 This list is not complete! For more error codes see the file 'errorno.h'
582
 on your system.
583
<P>
584
<DL>
585
</DL>
586
</DL>
587
 
588
<!-- ========= CONSTRUCTOR DETAIL ======== -->
589
 
590
<A NAME="constructor_detail"><!-- --></A>
591
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
592
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
593
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
594
<B>Constructor Detail</B></FONT></TH>
595
</TR>
596
</TABLE>
597
 
598
<A NAME="LibusbJava()"><!-- --></A><H3>
599
LibusbJava</H3>
600
<PRE>
601
public <B>LibusbJava</B>()</PRE>
602
<DL>
603
</DL>
604
 
605
<!-- ============ METHOD DETAIL ========== -->
606
 
607
<A NAME="method_detail"><!-- --></A>
608
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
609
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
610
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
611
<B>Method Detail</B></FONT></TH>
612
</TR>
613
</TABLE>
614
 
615
<A NAME="usb_set_debug(int)"><!-- --></A><H3>
616
usb_set_debug</H3>
617
<PRE>
618
public static void <B>usb_set_debug</B>(int&nbsp;level)</PRE>
619
<DL>
620
<DD>Sets the debugging level of libusb.<br>
621
 
622
 The range is from 0 to 255, where 0 disables debug output and 255 enables
623
 all output. On application start, debugging is disabled (0).
624
<P>
625
<DD><DL>
626
<DT><B>Parameters:</B><DD><CODE>level</CODE> - 0 to 255</DL>
627
</DD>
628
</DL>
629
<HR>
630
 
631
<A NAME="usb_init()"><!-- --></A><H3>
632
usb_init</H3>
633
<PRE>
634
public static void <B>usb_init</B>()</PRE>
635
<DL>
636
<DD>Just like the name implies, <code>usb_init</code> sets up some internal
637
 structures. <code>usb_init</code> must be called before any other
638
 libusb functions.
639
<P>
640
<DD><DL>
641
</DL>
642
</DD>
643
</DL>
644
<HR>
645
 
646
<A NAME="usb_find_busses()"><!-- --></A><H3>
647
usb_find_busses</H3>
648
<PRE>
649
public static int <B>usb_find_busses</B>()</PRE>
650
<DL>
651
<DD><code>usb_find_busses</code> will find all of the busses on the system.
652
<P>
653
<DD><DL>
654
 
655
<DT><B>Returns:</B><DD>the number of changes since previous call to this function (total
656
         of new busses and busses removed).</DL>
657
</DD>
658
</DL>
659
<HR>
660
 
661
<A NAME="usb_find_devices()"><!-- --></A><H3>
662
usb_find_devices</H3>
663
<PRE>
664
public static int <B>usb_find_devices</B>()</PRE>
665
<DL>
666
<DD><code>usb_find_devices</code> will find all of the devices on each bus.
667
 This should be called after <code>usb_find_busses</code>.
668
<P>
669
<DD><DL>
670
 
671
<DT><B>Returns:</B><DD>the number of changes since the previous call to this function
672
         (total of new device and devices removed).</DL>
673
</DD>
674
</DL>
675
<HR>
676
 
677
<A NAME="usb_get_busses()"><!-- --></A><H3>
678
usb_get_busses</H3>
679
<PRE>
680
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>
681
<DL>
682
<DD><code>usb_get_busses</code> returns a tree of descriptor objects.<br>
683
 The tree represents the bus structure with devices, configurations,
684
 interfaces and endpoints. Note that this is only a copy. To refresh the
685
 information, <code>usb_get_busses()</code> must be called again.<br>
686
 The name of the objects contained in the tree is starting with
687
 <code>Usb_</code>.
688
<P>
689
<DD><DL>
690
 
691
<DT><B>Returns:</B><DD>the structure of all busses and devices. <code>Note:</code> The
692
         java objects are copies of the C structs.</DL>
693
</DD>
694
</DL>
695
<HR>
696
 
697
<A NAME="usb_open(ch.ntb.usb.Usb_Device)"><!-- --></A><H3>
698
usb_open</H3>
699
<PRE>
700
public static int <B>usb_open</B>(<A HREF="../../../ch/ntb/usb/Usb_Device.html" title="class in ch.ntb.usb">Usb_Device</A>&nbsp;dev)</PRE>
701
<DL>
702
<DD><code>usb_open</code> is to be used to open up a device for use.
703
 <code>usb_open</code> must be called before attempting to perform any
704
 operations to the device.
705
<P>
706
<DD><DL>
707
<DT><B>Parameters:</B><DD><CODE>dev</CODE> - The device to open.
708
<DT><B>Returns:</B><DD>a handle used in future communication with the device. 0 if an
709
         error has occurred.</DL>
710
</DD>
711
</DL>
712
<HR>
713
 
714
<A NAME="usb_close(int)"><!-- --></A><H3>
715
usb_close</H3>
716
<PRE>
717
public static int <B>usb_close</B>(int&nbsp;dev_handle)</PRE>
718
<DL>
719
<DD><code>usb_close</code> closes a device opened with
720
 <code>usb_open</code>.
721
<P>
722
<DD><DL>
723
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.
724
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
725
</DD>
726
</DL>
727
<HR>
728
 
729
<A NAME="usb_set_configuration(int, int)"><!-- --></A><H3>
730
usb_set_configuration</H3>
731
<PRE>
732
public static int <B>usb_set_configuration</B>(int&nbsp;dev_handle,
733
                                        int&nbsp;configuration)</PRE>
734
<DL>
735
<DD>Sets the active configuration of a device
736
<P>
737
<DD><DL>
738
<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
739
            bConfigurationValue.
740
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
741
</DD>
742
</DL>
743
<HR>
744
 
745
<A NAME="usb_set_altinterface(int, int)"><!-- --></A><H3>
746
usb_set_altinterface</H3>
747
<PRE>
748
public static int <B>usb_set_altinterface</B>(int&nbsp;dev_handle,
749
                                       int&nbsp;alternate)</PRE>
750
<DL>
751
<DD>Sets the active alternate setting of the current interface
752
<P>
753
<DD><DL>
754
<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
755
            bAlternateSetting.
756
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
757
</DD>
758
</DL>
759
<HR>
760
 
761
<A NAME="usb_clear_halt(int, int)"><!-- --></A><H3>
762
usb_clear_halt</H3>
763
<PRE>
764
public static int <B>usb_clear_halt</B>(int&nbsp;dev_handle,
765
                                 int&nbsp;ep)</PRE>
766
<DL>
767
<DD>Clears any halt status on an endpoint.
768
<P>
769
<DD><DL>
770
<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.
771
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
772
</DD>
773
</DL>
774
<HR>
775
 
776
<A NAME="usb_reset(int)"><!-- --></A><H3>
777
usb_reset</H3>
778
<PRE>
779
public static int <B>usb_reset</B>(int&nbsp;dev_handle)</PRE>
780
<DL>
781
<DD>Resets a device by sending a RESET down the port it is connected to.<br>
782
 <br>
783
 <b>Causes re-enumeration:</b> After calling <code>usb_reset</code>,
784
 the device will need to re-enumerate and thusly, requires you to find the
785
 new device and open a new handle. The handle used to call
786
 <code>usb_reset</code> will no longer work.
787
<P>
788
<DD><DL>
789
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.
790
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
791
</DD>
792
</DL>
793
<HR>
794
 
795
<A NAME="usb_claim_interface(int, int)"><!-- --></A><H3>
796
usb_claim_interface</H3>
797
<PRE>
798
public static int <B>usb_claim_interface</B>(int&nbsp;dev_handle,
799
                                      int&nbsp;interface_)</PRE>
800
<DL>
801
<DD>Claim an interface of a device.<br>
802
 <br>
803
 <b>Must be called!:</b> <code>usb_claim_interface</code> must be
804
 called before you perform any operations related to this interface (like
805
 <code>usb_set_altinterface, usb_bulk_write</code>, etc).
806
<P>
807
<DD><DL>
808
<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
809
            bInterfaceNumber.
810
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
811
</DD>
812
</DL>
813
<HR>
814
 
815
<A NAME="usb_release_interface(int, int)"><!-- --></A><H3>
816
usb_release_interface</H3>
817
<PRE>
818
public static int <B>usb_release_interface</B>(int&nbsp;dev_handle,
819
                                        int&nbsp;interface_)</PRE>
820
<DL>
821
<DD>Releases a previously claimed interface
822
<P>
823
<DD><DL>
824
<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
825
            bInterfaceNumber.
826
<DT><B>Returns:</B><DD>0 on success or < 0 on error.</DL>
827
</DD>
828
</DL>
829
<HR>
830
 
831
<A NAME="usb_control_msg(int, int, int, int, int, byte[], int, int)"><!-- --></A><H3>
832
usb_control_msg</H3>
833
<PRE>
834
public static int <B>usb_control_msg</B>(int&nbsp;dev_handle,
835
                                  int&nbsp;requesttype,
836
                                  int&nbsp;request,
837
                                  int&nbsp;value,
838
                                  int&nbsp;index,
839
                                  byte[]&nbsp;bytes,
840
                                  int&nbsp;size,
841
                                  int&nbsp;timeout)</PRE>
842
<DL>
843
<DD>Performs a control request to the default control pipe on a device. The
844
 parameters mirror the types of the same name in the USB specification.
845
<P>
846
<DD><DL>
847
<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> -
848
<DT><B>Returns:</B><DD>the number of bytes written/read or < 0 on error.</DL>
849
</DD>
850
</DL>
851
<HR>
852
 
853
<A NAME="usb_get_string(int, int, int)"><!-- --></A><H3>
854
usb_get_string</H3>
855
<PRE>
856
public static java.lang.String <B>usb_get_string</B>(int&nbsp;dev_handle,
857
                                              int&nbsp;index,
858
                                              int&nbsp;langid)</PRE>
859
<DL>
860
<DD>Retrieves the string descriptor specified by index and langid from a
861
 device.
862
<P>
863
<DD><DL>
864
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>index</CODE> - <DD><CODE>langid</CODE> -
865
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
866
</DD>
867
</DL>
868
<HR>
869
 
870
<A NAME="usb_get_string_simple(int, int)"><!-- --></A><H3>
871
usb_get_string_simple</H3>
872
<PRE>
873
public static java.lang.String <B>usb_get_string_simple</B>(int&nbsp;dev_handle,
874
                                                     int&nbsp;index)</PRE>
875
<DL>
876
<DD><code>usb_get_string_simple</code> is a wrapper around
877
 <code>usb_get_string</code> that retrieves the string description
878
 specified by index in the first language for the descriptor.
879
<P>
880
<DD><DL>
881
<DT><B>Parameters:</B><DD><CODE>dev_handle</CODE> - The handle to the device.<DD><CODE>index</CODE> -
882
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
883
</DD>
884
</DL>
885
<HR>
886
 
887
<A NAME="usb_get_descriptor(int, byte, byte, int)"><!-- --></A><H3>
888
usb_get_descriptor</H3>
889
<PRE>
890
public static java.lang.String <B>usb_get_descriptor</B>(int&nbsp;dev_handle,
891
                                                  byte&nbsp;type,
892
                                                  byte&nbsp;index,
893
                                                  int&nbsp;size)</PRE>
894
<DL>
895
<DD>Retrieves a descriptor from the device identified by the type and index
896
 of the descriptor from the default control pipe.<br>
897
 <br>
898
 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>
899
 for a function that allows the control endpoint to be specified.
900
<P>
901
<DD><DL>
902
<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
903
            resulting String)
904
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
905
</DD>
906
</DL>
907
<HR>
908
 
909
<A NAME="usb_get_descriptor_by_endpoint(int, int, byte, byte, int)"><!-- --></A><H3>
910
usb_get_descriptor_by_endpoint</H3>
911
<PRE>
912
public static java.lang.String <B>usb_get_descriptor_by_endpoint</B>(int&nbsp;dev_handle,
913
                                                              int&nbsp;ep,
914
                                                              byte&nbsp;type,
915
                                                              byte&nbsp;index,
916
                                                              int&nbsp;size)</PRE>
917
<DL>
918
<DD>Retrieves a descriptor from the device identified by the type and index
919
 of the descriptor from the control pipe identified by ep.
920
<P>
921
<DD><DL>
922
<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
923
            resulting String)
924
<DT><B>Returns:</B><DD>the descriptor String or null</DL>
925
</DD>
926
</DL>
927
<HR>
928
 
929
<A NAME="usb_bulk_write(int, int, byte[], int, int)"><!-- --></A><H3>
930
usb_bulk_write</H3>
931
<PRE>
932
public static int <B>usb_bulk_write</B>(int&nbsp;dev_handle,
933
                                 int&nbsp;ep,
934
                                 byte[]&nbsp;bytes,
935
                                 int&nbsp;size,
936
                                 int&nbsp;timeout)</PRE>
937
<DL>
938
<DD>Performs a bulk write request to the endpoint specified by ep.
939
<P>
940
<DD><DL>
941
<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> -
942
<DT><B>Returns:</B><DD>the number of bytes written on success or < 0 on error.</DL>
943
</DD>
944
</DL>
945
<HR>
946
 
947
<A NAME="usb_bulk_read(int, int, byte[], int, int)"><!-- --></A><H3>
948
usb_bulk_read</H3>
949
<PRE>
950
public static int <B>usb_bulk_read</B>(int&nbsp;dev_handle,
951
                                int&nbsp;ep,
952
                                byte[]&nbsp;bytes,
953
                                int&nbsp;size,
954
                                int&nbsp;timeout)</PRE>
955
<DL>
956
<DD>Performs a bulk read request to the endpoint specified by ep.
957
<P>
958
<DD><DL>
959
<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> -
960
<DT><B>Returns:</B><DD>the number of bytes read on success or < 0 on error.</DL>
961
</DD>
962
</DL>
963
<HR>
964
 
965
<A NAME="usb_interrupt_write(int, int, byte[], int, int)"><!-- --></A><H3>
966
usb_interrupt_write</H3>
967
<PRE>
968
public static int <B>usb_interrupt_write</B>(int&nbsp;dev_handle,
969
                                      int&nbsp;ep,
970
                                      byte[]&nbsp;bytes,
971
                                      int&nbsp;size,
972
                                      int&nbsp;timeout)</PRE>
973
<DL>
974
<DD>Performs an interrupt write request to the endpoint specified by ep.
975
<P>
976
<DD><DL>
977
<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> -
978
<DT><B>Returns:</B><DD>the number of bytes written on success or < 0 on error.</DL>
979
</DD>
980
</DL>
981
<HR>
982
 
983
<A NAME="usb_interrupt_read(int, int, byte[], int, int)"><!-- --></A><H3>
984
usb_interrupt_read</H3>
985
<PRE>
986
public static int <B>usb_interrupt_read</B>(int&nbsp;dev_handle,
987
                                     int&nbsp;ep,
988
                                     byte[]&nbsp;bytes,
989
                                     int&nbsp;size,
990
                                     int&nbsp;timeout)</PRE>
991
<DL>
992
<DD>Performs a interrupt read request to the endpoint specified by ep.
993
<P>
994
<DD><DL>
995
<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> -
996
<DT><B>Returns:</B><DD>the number of bytes read on success or < 0 on error.</DL>
997
</DD>
998
</DL>
999
<HR>
1000
 
1001
<A NAME="usb_strerror()"><!-- --></A><H3>
1002
usb_strerror</H3>
1003
<PRE>
1004
public static java.lang.String <B>usb_strerror</B>()</PRE>
1005
<DL>
1006
<DD>Returns the error string after an error occured.
1007
<P>
1008
<DD><DL>
1009
 
1010
<DT><B>Returns:</B><DD>the last error sring.</DL>
1011
</DD>
1012
</DL>
1013
<!-- ========= END OF CLASS DATA ========= -->
1014
<HR>
1015
 
1016
 
1017
<!-- ======= START OF BOTTOM NAVBAR ====== -->
1018
<A NAME="navbar_bottom"><!-- --></A>
1019
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
1020
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
1021
<TR>
1022
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1023
<A NAME="navbar_bottom_firstrow"><!-- --></A>
1024
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
1025
  <TR ALIGN="center" VALIGN="top">
1026
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
1027
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
1028
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1029
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
1030
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
1031
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1032
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1033
  </TR>
1034
</TABLE>
1035
</TD>
1036
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1037
</EM>
1038
</TD>
1039
</TR>
1040
 
1041
<TR>
1042
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1043
&nbsp;<A HREF="../../../ch/ntb/usb/LibLoader.html" title="class in ch.ntb.usb"><B>PREV CLASS</B></A>&nbsp;
1044
&nbsp;<A HREF="../../../ch/ntb/usb/USB.html" title="class in ch.ntb.usb"><B>NEXT CLASS</B></A></FONT></TD>
1045
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1046
  <A HREF="../../../index.html?ch/ntb/usb/LibusbJava.html" target="_top"><B>FRAMES</B></A>  &nbsp;
1047
&nbsp;<A HREF="LibusbJava.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
1048
&nbsp;<SCRIPT type="text/javascript">
1049
  <!--
1050
  if(window==top) {
1051
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
1052
  }
1053
  //-->
1054
</SCRIPT>
1055
<NOSCRIPT>
1056
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
1057
</NOSCRIPT>
1058
 
1059
 
1060
</FONT></TD>
1061
</TR>
1062
<TR>
1063
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1064
  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>
1065
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1066
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>
1067
</TR>
1068
</TABLE>
1069
<A NAME="skip-navbar_bottom"></A>
1070
<!-- ======== END OF BOTTOM NAVBAR ======= -->
1071
 
1072
<HR>
1073
 
1074
</BODY>
1075
</HTML>

powered by: WebSVN 2.1.0

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