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/] [ztex/] [Ztex1.html] - Blame information for rev 8

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 8 ZTEX
<!-- Generated by javadoc (build 1.6.0_18) on Wed Oct 30 21:18:13 CET 2013 -->
6 2 ZTEX
<TITLE>
7
Ztex1
8
</TITLE>
9
 
10 8 ZTEX
<META NAME="date" CONTENT="2013-10-30">
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="Ztex1";
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="../ztex/UsbException.html" title="class in ztex"><B>PREV CLASS</B></A>&nbsp;
58
&nbsp;<A HREF="../ztex/Ztex1v1.html" title="class in ztex"><B>NEXT CLASS</B></A></FONT></TD>
59
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60
  <A HREF="../index.html?ztex/Ztex1.html" target="_top"><B>FRAMES</B></A>  &nbsp;
61
&nbsp;<A HREF="Ztex1.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
ztex</FONT>
91
<BR>
92
Class Ztex1</H2>
93
<PRE>
94
java.lang.Object
95
  <IMG SRC="../resources/inherit.gif" ALT="extended by "><B>ztex.Ztex1</B>
96
</PRE>
97
<DL>
98
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../ztex/Ztex1v1.html" title="class in ztex">Ztex1v1</A></DD>
99
</DL>
100
<HR>
101
<DL>
102
<DT><PRE>public class <B>Ztex1</B><DT>extends java.lang.Object</DL>
103
</PRE>
104
 
105
<P>
106
This class implements the interface-independent part of the communication protocol for the interaction with the ZTEX firmware.<p>
107
 All firmware implementations that provide the ZTEX descriptor 1 are supported.
108
 A description of this descriptor can be found in <A HREF="../ztex/ZtexDevice1.html" title="class in ztex"><CODE>ZtexDevice1</CODE></A>.
109
 <p>
110
 The most important features of this class are the functions for uploading the firmware
111
 and the renumeration management.
112
 <p>
113
 The interface dependent part of the communication protocol (currently only one is supported)
114
 can be found in <A HREF="../ztex/Ztex1v1.html" title="class in ztex"><CODE>Ztex1v1</CODE></A>.
115
<P>
116
 
117
<P>
118
<DL>
119
<DT><B>See Also:</B><DD><A HREF="../ztex/ZtexDevice1.html" title="class in ztex"><CODE>ZtexDevice1</CODE></A>,
120
<A HREF="../ztex/Ztex1v1.html" title="class in ztex"><CODE>Ztex1v1</CODE></A></DL>
121
<HR>
122
 
123
<P>
124
<!-- =========== FIELD SUMMARY =========== -->
125
 
126
<A NAME="field_summary"><!-- --></A>
127
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
128
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
129
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
130
<B>Field Summary</B></FONT></TH>
131
</TR>
132
<TR BGCOLOR="white" CLASS="TableRowColor">
133
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
134
<CODE>&nbsp;boolean</CODE></FONT></TD>
135
<TD><CODE><B><A HREF="../ztex/Ztex1.html#certainWorkarounds">certainWorkarounds</A></B></CODE>
136
 
137
<BR>
138
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Setting to true enables certain workarounds, e.g. to deal with bad driver/OS implementations.</TD>
139
</TR>
140
<TR BGCOLOR="white" CLASS="TableRowColor">
141
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
142
<CODE>&nbsp;int</CODE></FONT></TD>
143
<TD><CODE><B><A HREF="../ztex/Ztex1.html#controlMsgTimeout">controlMsgTimeout</A></B></CODE>
144
 
145
<BR>
146
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The timeout for  control messages in ms.</TD>
147
</TR>
148
</TABLE>
149
&nbsp;
150
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
151
 
152
<A NAME="constructor_summary"><!-- --></A>
153
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
154
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
155
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
156
<B>Constructor Summary</B></FONT></TH>
157
</TR>
158
<TR BGCOLOR="white" CLASS="TableRowColor">
159
<TD><CODE><B><A HREF="../ztex/Ztex1.html#Ztex1(ztex.ZtexDevice1)">Ztex1</A></B>(<A HREF="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</A>&nbsp;pDev)</CODE>
160
 
161
<BR>
162
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an instance from a given device.</TD>
163
</TR>
164
</TABLE>
165
&nbsp;
166
<!-- ========== METHOD SUMMARY =========== -->
167
 
168
<A NAME="method_summary"><!-- --></A>
169
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
170
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
171
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
172
<B>Method Summary</B></FONT></TH>
173
</TR>
174
<TR BGCOLOR="white" CLASS="TableRowColor">
175
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176
<CODE>&nbsp;void</CODE></FONT></TD>
177
<TD><CODE><B><A HREF="../ztex/Ztex1.html#checkValid()">checkValid</A></B>()</CODE>
178
 
179
<BR>
180
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether ZTEX descriptor 1 is available.</TD>
181
</TR>
182
<TR BGCOLOR="white" CLASS="TableRowColor">
183
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
184
<CODE>&nbsp;void</CODE></FONT></TD>
185
<TD><CODE><B><A HREF="../ztex/Ztex1.html#claimInterface(int)">claimInterface</A></B>(int&nbsp;iface)</CODE>
186
 
187
<BR>
188
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Claims an interface.</TD>
189
</TR>
190
<TR BGCOLOR="white" CLASS="TableRowColor">
191
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
192
<CODE>&nbsp;<A HREF="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</A></CODE></FONT></TD>
193
<TD><CODE><B><A HREF="../ztex/Ztex1.html#dev()">dev</A></B>()</CODE>
194
 
195
<BR>
196
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the corresponding <A HREF="../ztex/ZtexDevice1.html" title="class in ztex"><CODE>ZtexDevice1</CODE></A>.</TD>
197
</TR>
198
<TR BGCOLOR="white" CLASS="TableRowColor">
199
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
200
<CODE>protected &nbsp;void</CODE></FONT></TD>
201
<TD><CODE><B><A HREF="../ztex/Ztex1.html#finalize()">finalize</A></B>()</CODE>
202
 
203
<BR>
204
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The destructor closes the USB file handle.</TD>
205
</TR>
206
<TR BGCOLOR="white" CLASS="TableRowColor">
207
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
208 5 ZTEX
<CODE>&nbsp;boolean</CODE></FONT></TD>
209
<TD><CODE><B><A HREF="../ztex/Ztex1.html#getInterfaceClaimed(int)">getInterfaceClaimed</A></B>(int&nbsp;iface)</CODE>
210
 
211
<BR>
212
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if interface is claimed.</TD>
213
</TR>
214
<TR BGCOLOR="white" CLASS="TableRowColor">
215
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
216
<CODE>&nbsp;long</CODE></FONT></TD>
217 2 ZTEX
<TD><CODE><B><A HREF="../ztex/Ztex1.html#handle()">handle</A></B>()</CODE>
218
 
219
<BR>
220
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the USB file handle.</TD>
221
</TR>
222
<TR BGCOLOR="white" CLASS="TableRowColor">
223
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
224 8 ZTEX
<CODE>protected &nbsp;void</CODE></FONT></TD>
225
<TD><CODE><B><A HREF="../ztex/Ztex1.html#init()">init</A></B>()</CODE>
226
 
227
<BR>
228
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializates the class.</TD>
229
</TR>
230
<TR BGCOLOR="white" CLASS="TableRowColor">
231
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
232 2 ZTEX
<CODE>&nbsp;void</CODE></FONT></TD>
233
<TD><CODE><B><A HREF="../ztex/Ztex1.html#releaseInterface(int)">releaseInterface</A></B>(int&nbsp;iface)</CODE>
234
 
235
<BR>
236
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Releases an interface.</TD>
237
</TR>
238
<TR BGCOLOR="white" CLASS="TableRowColor">
239
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
240
<CODE>&nbsp;void</CODE></FONT></TD>
241
<TD><CODE><B><A HREF="../ztex/Ztex1.html#resetEzUsb()">resetEzUsb</A></B>()</CODE>
242
 
243
<BR>
244
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets the EZ-USB and manages the renumeration process.</TD>
245
</TR>
246
<TR BGCOLOR="white" CLASS="TableRowColor">
247
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
248
<CODE>&nbsp;void</CODE></FONT></TD>
249
<TD><CODE><B><A HREF="../ztex/Ztex1.html#setConfiguration(int)">setConfiguration</A></B>(int&nbsp;config)</CODE>
250
 
251
<BR>
252
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the configuration.</TD>
253
</TR>
254
<TR BGCOLOR="white" CLASS="TableRowColor">
255
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
256
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
257
<TD><CODE><B><A HREF="../ztex/Ztex1.html#toString()">toString</A></B>()</CODE>
258
 
259
<BR>
260
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a lot of useful information about the corresponding device.</TD>
261
</TR>
262
<TR BGCOLOR="white" CLASS="TableRowColor">
263
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
264
<CODE>&nbsp;void</CODE></FONT></TD>
265
<TD><CODE><B><A HREF="../ztex/Ztex1.html#trySetConfiguration(int)">trySetConfiguration</A></B>(int&nbsp;config)</CODE>
266
 
267
<BR>
268
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tries to set the configuration.</TD>
269
</TR>
270
<TR BGCOLOR="white" CLASS="TableRowColor">
271
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
272
<CODE>&nbsp;long</CODE></FONT></TD>
273 8 ZTEX
<TD><CODE><B><A HREF="../ztex/Ztex1.html#uploadFirmware(java.io.InputStream, java.lang.String, boolean)">uploadFirmware</A></B>(java.io.InputStream&nbsp;ihxIn,
274
               java.lang.String&nbsp;name,
275
               boolean&nbsp;force)</CODE>
276
 
277
<BR>
278
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uploads the firmware to the EZ-USB and manages the renumeration process.</TD>
279
</TR>
280
<TR BGCOLOR="white" CLASS="TableRowColor">
281
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282
<CODE>&nbsp;long</CODE></FONT></TD>
283 2 ZTEX
<TD><CODE><B><A HREF="../ztex/Ztex1.html#uploadFirmware(java.lang.String, boolean)">uploadFirmware</A></B>(java.lang.String&nbsp;ihxFileName,
284
               boolean&nbsp;force)</CODE>
285
 
286
<BR>
287
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uploads the firmware to the EZ-USB and manages the renumeration process.</TD>
288
</TR>
289
<TR BGCOLOR="white" CLASS="TableRowColor">
290
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
291 5 ZTEX
<CODE>&nbsp;long</CODE></FONT></TD>
292
<TD><CODE><B><A HREF="../ztex/Ztex1.html#uploadFirmware(ztex.ZtexIhxFile1, boolean)">uploadFirmware</A></B>(<A HREF="../ztex/ZtexIhxFile1.html" title="class in ztex">ZtexIhxFile1</A>&nbsp;ihxFile,
293
               boolean&nbsp;force)</CODE>
294
 
295
<BR>
296
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uploads the firmware to the EZ-USB and manages the renumeration process.</TD>
297
</TR>
298
<TR BGCOLOR="white" CLASS="TableRowColor">
299
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
300 2 ZTEX
<CODE>&nbsp;boolean</CODE></FONT></TD>
301
<TD><CODE><B><A HREF="../ztex/Ztex1.html#valid()">valid</A></B>()</CODE>
302
 
303
<BR>
304
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if ZTEX descriptor 1 is available.</TD>
305
</TR>
306
<TR BGCOLOR="white" CLASS="TableRowColor">
307
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
308
<CODE>&nbsp;int</CODE></FONT></TD>
309
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand(int, java.lang.String)">vendorCommand</A></B>(int&nbsp;cmd,
310
              java.lang.String&nbsp;func)</CODE>
311
 
312
<BR>
313
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor command with no payload data and no setup data to Endpoint 0 of the EZ-USB device.</TD>
314
</TR>
315
<TR BGCOLOR="white" CLASS="TableRowColor">
316
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
317
<CODE>&nbsp;int</CODE></FONT></TD>
318
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand(int, java.lang.String, int, int)">vendorCommand</A></B>(int&nbsp;cmd,
319
              java.lang.String&nbsp;func,
320
              int&nbsp;value,
321
              int&nbsp;index)</CODE>
322
 
323
<BR>
324
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor command with no payload data to Endpoint 0 of the EZ-USB device.</TD>
325
</TR>
326
<TR BGCOLOR="white" CLASS="TableRowColor">
327
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
328
<CODE>&nbsp;int</CODE></FONT></TD>
329
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand(int, java.lang.String, int, int, byte[], int)">vendorCommand</A></B>(int&nbsp;cmd,
330
              java.lang.String&nbsp;func,
331
              int&nbsp;value,
332
              int&nbsp;index,
333
              byte[]&nbsp;buf,
334
              int&nbsp;length)</CODE>
335
 
336
<BR>
337
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor command to Endpoint 0 of the EZ-USB device.</TD>
338
</TR>
339
<TR BGCOLOR="white" CLASS="TableRowColor">
340
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
341
<CODE>&nbsp;void</CODE></FONT></TD>
342
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand2(int, java.lang.String, int, int, byte[], int)">vendorCommand2</A></B>(int&nbsp;cmd,
343
               java.lang.String&nbsp;func,
344
               int&nbsp;value,
345
               int&nbsp;index,
346
               byte[]&nbsp;buf,
347
               int&nbsp;length)</CODE>
348
 
349
<BR>
350
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor command to Endpoint 0 of the EZ-USB device and throws an <A HREF="../ztex/UsbException.html" title="class in ztex"><CODE>UsbException</CODE></A> if not all of the payload has been sent.</TD>
351
</TR>
352
<TR BGCOLOR="white" CLASS="TableRowColor">
353
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
354
<CODE>&nbsp;int</CODE></FONT></TD>
355
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest(int, java.lang.String, byte[], int)">vendorRequest</A></B>(int&nbsp;cmd,
356
              java.lang.String&nbsp;func,
357
              byte[]&nbsp;buf,
358
              int&nbsp;maxlen)</CODE>
359
 
360
<BR>
361
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor request to Endpoint 0 of the EZ-USB device.</TD>
362
</TR>
363
<TR BGCOLOR="white" CLASS="TableRowColor">
364
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
365
<CODE>&nbsp;int</CODE></FONT></TD>
366
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest(int, java.lang.String, int, int, byte[], int)">vendorRequest</A></B>(int&nbsp;cmd,
367
              java.lang.String&nbsp;func,
368
              int&nbsp;value,
369
              int&nbsp;index,
370
              byte[]&nbsp;buf,
371
              int&nbsp;maxlen)</CODE>
372
 
373
<BR>
374
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor request to Endpoint 0 of the EZ-USB device.</TD>
375
</TR>
376
<TR BGCOLOR="white" CLASS="TableRowColor">
377
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
378
<CODE>&nbsp;void</CODE></FONT></TD>
379
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest2(int, java.lang.String, byte[], int)">vendorRequest2</A></B>(int&nbsp;cmd,
380
               java.lang.String&nbsp;func,
381
               byte[]&nbsp;buf,
382
               int&nbsp;maxlen)</CODE>
383
 
384
<BR>
385
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <A HREF="../ztex/UsbException.html" title="class in ztex"><CODE>UsbException</CODE></A> if not all of the payload has been received.</TD>
386
</TR>
387
<TR BGCOLOR="white" CLASS="TableRowColor">
388
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
389
<CODE>&nbsp;void</CODE></FONT></TD>
390
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest2(int, java.lang.String, int, int, byte[], int)">vendorRequest2</A></B>(int&nbsp;cmd,
391
               java.lang.String&nbsp;func,
392
               int&nbsp;value,
393
               int&nbsp;index,
394
               byte[]&nbsp;buf,
395
               int&nbsp;maxlen)</CODE>
396
 
397
<BR>
398
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <A HREF="../ztex/UsbException.html" title="class in ztex"><CODE>UsbException</CODE></A> if not all of the payload has been received.</TD>
399
</TR>
400
</TABLE>
401
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
402
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
403
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
404
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
405
</TR>
406
<TR BGCOLOR="white" CLASS="TableRowColor">
407
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
408
</TR>
409
</TABLE>
410
&nbsp;
411
<P>
412
 
413
<!-- ============ FIELD DETAIL =========== -->
414
 
415
<A NAME="field_detail"><!-- --></A>
416
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
417
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
418
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
419
<B>Field Detail</B></FONT></TH>
420
</TR>
421
</TABLE>
422
 
423
<A NAME="certainWorkarounds"><!-- --></A><H3>
424
certainWorkarounds</H3>
425
<PRE>
426
public boolean <B>certainWorkarounds</B></PRE>
427
<DL>
428
<DD>Setting to true enables certain workarounds, e.g. to deal with bad driver/OS implementations.
429
<P>
430
<DL>
431
</DL>
432
</DL>
433
<HR>
434
 
435
<A NAME="controlMsgTimeout"><!-- --></A><H3>
436
controlMsgTimeout</H3>
437
<PRE>
438
public int <B>controlMsgTimeout</B></PRE>
439
<DL>
440
<DD>The timeout for  control messages in ms.
441
<P>
442
<DL>
443
</DL>
444
</DL>
445
 
446
<!-- ========= CONSTRUCTOR DETAIL ======== -->
447
 
448
<A NAME="constructor_detail"><!-- --></A>
449
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
450
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
451
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
452
<B>Constructor Detail</B></FONT></TH>
453
</TR>
454
</TABLE>
455
 
456
<A NAME="Ztex1(ztex.ZtexDevice1)"><!-- --></A><H3>
457
Ztex1</H3>
458
<PRE>
459
public <B>Ztex1</B>(<A HREF="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</A>&nbsp;pDev)
460
      throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
461
<DL>
462
<DD>Constructs an instance from a given device.
463
<P>
464
<DL>
465
<DT><B>Parameters:</B><DD><CODE>pDev</CODE> - The given device.
466
<DT><B>Throws:</B>
467
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if an communication error occurred.</DL>
468
</DL>
469
 
470
<!-- ============ METHOD DETAIL ========== -->
471
 
472
<A NAME="method_detail"><!-- --></A>
473
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
474
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
475
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
476
<B>Method Detail</B></FONT></TH>
477
</TR>
478
</TABLE>
479
 
480 8 ZTEX
<A NAME="init()"><!-- --></A><H3>
481
init</H3>
482
<PRE>
483
protected void <B>init</B>()
484
             throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
485
<DL>
486
<DD>Initializates the class.
487
<P>
488
<DD><DL>
489
 
490
<DT><B>Throws:</B>
491
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if an communication error occurred.</DL>
492
</DD>
493
</DL>
494
<HR>
495
 
496 2 ZTEX
<A NAME="finalize()"><!-- --></A><H3>
497
finalize</H3>
498
<PRE>
499
protected void <B>finalize</B>()</PRE>
500
<DL>
501
<DD>The destructor closes the USB file handle.
502
<P>
503
<DD><DL>
504
<DT><B>Overrides:</B><DD><CODE>finalize</CODE> in class <CODE>java.lang.Object</CODE></DL>
505
</DD>
506
<DD><DL>
507
</DL>
508
</DD>
509
</DL>
510
<HR>
511
 
512
<A NAME="handle()"><!-- --></A><H3>
513
handle</H3>
514
<PRE>
515 5 ZTEX
public final long <B>handle</B>()</PRE>
516 2 ZTEX
<DL>
517
<DD>Returns the USB file handle.
518
<P>
519
<DD><DL>
520
</DL>
521
</DD>
522
</DL>
523
<HR>
524
 
525
<A NAME="dev()"><!-- --></A><H3>
526
dev</H3>
527
<PRE>
528
public final <A HREF="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</A> <B>dev</B>()</PRE>
529
<DL>
530
<DD>Returns the corresponding <A HREF="../ztex/ZtexDevice1.html" title="class in ztex"><CODE>ZtexDevice1</CODE></A>.
531
<P>
532
<DD><DL>
533
 
534
<DT><B>Returns:</B><DD>the corresponding <A HREF="../ztex/ZtexDevice1.html" title="class in ztex"><CODE>ZtexDevice1</CODE></A>.</DL>
535
</DD>
536
</DL>
537
<HR>
538
 
539
<A NAME="valid()"><!-- --></A><H3>
540
valid</H3>
541
<PRE>
542
public boolean <B>valid</B>()</PRE>
543
<DL>
544
<DD>Returns true if ZTEX descriptor 1 is available.
545
<P>
546
<DD><DL>
547
 
548
<DT><B>Returns:</B><DD>true if ZTEX descriptor 1 is available.</DL>
549
</DD>
550
</DL>
551
<HR>
552
 
553
<A NAME="checkValid()"><!-- --></A><H3>
554
checkValid</H3>
555
<PRE>
556
public void <B>checkValid</B>()
557
                throws <A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></PRE>
558
<DL>
559
<DD>Checks whether ZTEX descriptor 1 is available.
560
<P>
561
<DD><DL>
562
 
563
<DT><B>Throws:</B>
564
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.</DL>
565
</DD>
566
</DL>
567
<HR>
568
 
569
<A NAME="vendorCommand(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
570
vendorCommand</H3>
571
<PRE>
572
public int <B>vendorCommand</B>(int&nbsp;cmd,
573
                         java.lang.String&nbsp;func,
574
                         int&nbsp;value,
575
                         int&nbsp;index,
576
                         byte[]&nbsp;buf,
577
                         int&nbsp;length)
578
                  throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
579
<DL>
580
<DD>Sends a vendor command to Endpoint 0 of the EZ-USB device.
581
 The command may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
582
<P>
583
<DD><DL>
584
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The command number (0..255).<DD><CODE>func</CODE> - The name of the command. This string is used for the generation of error messages.<DD><CODE>value</CODE> - The value (0..65535), i.e bytes 2 and 3 of the setup data.<DD><CODE>index</CODE> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.<DD><CODE>length</CODE> - The size of the payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
585
<DT><B>Returns:</B><DD>the number of bytes sent.
586
<DT><B>Throws:</B>
587
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
588
</DD>
589
</DL>
590
<HR>
591
 
592
<A NAME="vendorCommand(int, java.lang.String, int, int)"><!-- --></A><H3>
593
vendorCommand</H3>
594
<PRE>
595
public int <B>vendorCommand</B>(int&nbsp;cmd,
596
                         java.lang.String&nbsp;func,
597
                         int&nbsp;value,
598
                         int&nbsp;index)
599
                  throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
600
<DL>
601
<DD>Sends a vendor command with no payload data to Endpoint 0 of the EZ-USB device.
602
 The command may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
603
<P>
604
<DD><DL>
605
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The command number (0..255).<DD><CODE>func</CODE> - The name of the command. This string is used for the generation of error messages.<DD><CODE>value</CODE> - The value (0..65535), i.e bytes 2 and 3 of the setup data.<DD><CODE>index</CODE> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.
606
<DT><B>Returns:</B><DD>the number of bytes sent.
607
<DT><B>Throws:</B>
608
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
609
</DD>
610
</DL>
611
<HR>
612
 
613
<A NAME="vendorCommand(int, java.lang.String)"><!-- --></A><H3>
614
vendorCommand</H3>
615
<PRE>
616
public int <B>vendorCommand</B>(int&nbsp;cmd,
617
                         java.lang.String&nbsp;func)
618
                  throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
619
<DL>
620
<DD>Sends a vendor command with no payload data and no setup data to Endpoint 0 of the EZ-USB device.
621
 The command may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
622
<P>
623
<DD><DL>
624
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The command number (0..255).<DD><CODE>func</CODE> - The name of the command. This string is used for the generation of error messages.
625
<DT><B>Returns:</B><DD>the number of bytes sent.
626
<DT><B>Throws:</B>
627
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
628
</DD>
629
</DL>
630
<HR>
631
 
632
<A NAME="vendorRequest(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
633
vendorRequest</H3>
634
<PRE>
635
public int <B>vendorRequest</B>(int&nbsp;cmd,
636
                         java.lang.String&nbsp;func,
637
                         int&nbsp;value,
638
                         int&nbsp;index,
639
                         byte[]&nbsp;buf,
640
                         int&nbsp;maxlen)
641
                  throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
642
<DL>
643
<DD>Sends a vendor request to Endpoint 0 of the EZ-USB device.
644
 The request may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
645
<P>
646
<DD><DL>
647
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The request number (0..255).<DD><CODE>func</CODE> - The name of the request. This string is used for the generation of error messages.<DD><CODE>value</CODE> - The value (0..65535), i.e bytes 2 and 3 of the setup data.<DD><CODE>index</CODE> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.<DD><CODE>maxlen</CODE> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
648
<DT><B>Returns:</B><DD>the number of bytes received.
649
<DT><B>Throws:</B>
650
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
651
</DD>
652
</DL>
653
<HR>
654
 
655
<A NAME="vendorRequest(int, java.lang.String, byte[], int)"><!-- --></A><H3>
656
vendorRequest</H3>
657
<PRE>
658
public int <B>vendorRequest</B>(int&nbsp;cmd,
659
                         java.lang.String&nbsp;func,
660
                         byte[]&nbsp;buf,
661
                         int&nbsp;maxlen)
662
                  throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
663
<DL>
664
<DD>Sends a vendor request to Endpoint 0 of the EZ-USB device.
665
 The request may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
666
<P>
667
<DD><DL>
668
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The request number (0..255).<DD><CODE>func</CODE> - The name of the request. This string is used for the generation of error messages.<DD><CODE>maxlen</CODE> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
669
<DT><B>Returns:</B><DD>the number of bytes sent.
670
<DT><B>Throws:</B>
671
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
672
</DD>
673
</DL>
674
<HR>
675
 
676
<A NAME="vendorCommand2(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
677
vendorCommand2</H3>
678
<PRE>
679
public void <B>vendorCommand2</B>(int&nbsp;cmd,
680
                           java.lang.String&nbsp;func,
681
                           int&nbsp;value,
682
                           int&nbsp;index,
683
                           byte[]&nbsp;buf,
684
                           int&nbsp;length)
685
                    throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
686
<DL>
687
<DD>Sends a vendor command to Endpoint 0 of the EZ-USB device and throws an <A HREF="../ztex/UsbException.html" title="class in ztex"><CODE>UsbException</CODE></A> if not all of the payload has been sent.
688
 The command may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
689
<P>
690
<DD><DL>
691
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The command number (0..255).<DD><CODE>func</CODE> - The name of the command. This string is used for the generation of error messages.<DD><CODE>value</CODE> - The value (0..65535), i.e bytes 2 and 3 of the setup data.<DD><CODE>index</CODE> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.<DD><CODE>length</CODE> - The size of the payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
692
<DT><B>Throws:</B>
693
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs or if not all of the payload has been sent.</DL>
694
</DD>
695
</DL>
696
<HR>
697
 
698
<A NAME="vendorRequest2(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
699
vendorRequest2</H3>
700
<PRE>
701
public void <B>vendorRequest2</B>(int&nbsp;cmd,
702
                           java.lang.String&nbsp;func,
703
                           int&nbsp;value,
704
                           int&nbsp;index,
705
                           byte[]&nbsp;buf,
706
                           int&nbsp;maxlen)
707
                    throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
708
<DL>
709
<DD>Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <A HREF="../ztex/UsbException.html" title="class in ztex"><CODE>UsbException</CODE></A> if not all of the payload has been received.
710
 The request may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
711
<P>
712
<DD><DL>
713
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The request number (0..255).<DD><CODE>func</CODE> - The name of the request. This string is used for the generation of error messages.<DD><CODE>value</CODE> - The value (0..65535), i.e bytes 2 and 3 of the setup data.<DD><CODE>index</CODE> - The index (0..65535), i.e. bytes 4 and 5 of the setup data.<DD><CODE>maxlen</CODE> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
714
<DT><B>Throws:</B>
715
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs or not all of the payload has been received.</DL>
716
</DD>
717
</DL>
718
<HR>
719
 
720
<A NAME="vendorRequest2(int, java.lang.String, byte[], int)"><!-- --></A><H3>
721
vendorRequest2</H3>
722
<PRE>
723
public void <B>vendorRequest2</B>(int&nbsp;cmd,
724
                           java.lang.String&nbsp;func,
725
                           byte[]&nbsp;buf,
726
                           int&nbsp;maxlen)
727
                    throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
728
<DL>
729
<DD>Sends a vendor request to Endpoint 0 of the EZ-USB device and throws an <A HREF="../ztex/UsbException.html" title="class in ztex"><CODE>UsbException</CODE></A> if not all of the payload has been received.
730
 The request may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
731
<P>
732
<DD><DL>
733
<DT><B>Parameters:</B><DD><CODE>cmd</CODE> - The request number (0..255).<DD><CODE>func</CODE> - The name of the request. This string is used for the generation of error messages.<DD><CODE>maxlen</CODE> - The size of the requested payload data (0..65535), i.e. bytes 6 and 7 of the setup data.<DD><CODE>buf</CODE> - The payload data buffer.
734
<DT><B>Throws:</B>
735
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs or not all of the payload has been received.</DL>
736
</DD>
737
</DL>
738
<HR>
739
 
740
<A NAME="setConfiguration(int)"><!-- --></A><H3>
741
setConfiguration</H3>
742
<PRE>
743
public void <B>setConfiguration</B>(int&nbsp;config)
744
                      throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
745
<DL>
746
<DD>Sets the configuration.
747
<P>
748
<DD><DL>
749
<DT><B>Parameters:</B><DD><CODE>config</CODE> - The configuration number (usually 1)
750
<DT><B>Throws:</B>
751
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if an error occurs while attempting to set the configuration.</DL>
752
</DD>
753
</DL>
754
<HR>
755
 
756
<A NAME="trySetConfiguration(int)"><!-- --></A><H3>
757
trySetConfiguration</H3>
758
<PRE>
759
public void <B>trySetConfiguration</B>(int&nbsp;config)</PRE>
760
<DL>
761
<DD>Tries to set the configuration.
762
 If an error occurs while attempting to set the configuration, a warning messaage is printed to stderr.
763
<P>
764
<DD><DL>
765
<DT><B>Parameters:</B><DD><CODE>config</CODE> - The configuration number (usually 1)</DL>
766
</DD>
767
</DL>
768
<HR>
769
 
770 5 ZTEX
<A NAME="getInterfaceClaimed(int)"><!-- --></A><H3>
771
getInterfaceClaimed</H3>
772
<PRE>
773
public boolean <B>getInterfaceClaimed</B>(int&nbsp;iface)</PRE>
774
<DL>
775
<DD>Returns true if interface is claimed.
776
<P>
777
<DD><DL>
778
<DT><B>Parameters:</B><DD><CODE>iface</CODE> - The interface number
779
<DT><B>Returns:</B><DD>true if interface is claimed</DL>
780
</DD>
781
</DL>
782
<HR>
783
 
784 2 ZTEX
<A NAME="claimInterface(int)"><!-- --></A><H3>
785
claimInterface</H3>
786
<PRE>
787
public void <B>claimInterface</B>(int&nbsp;iface)
788
                    throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
789
<DL>
790
<DD>Claims an interface.
791
<P>
792
<DD><DL>
793
<DT><B>Parameters:</B><DD><CODE>iface</CODE> - The interface number (usually 0)
794
<DT><B>Throws:</B>
795
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if an error occurs while attempting to claim the interface.</DL>
796
</DD>
797
</DL>
798
<HR>
799
 
800
<A NAME="releaseInterface(int)"><!-- --></A><H3>
801
releaseInterface</H3>
802
<PRE>
803
public void <B>releaseInterface</B>(int&nbsp;iface)</PRE>
804
<DL>
805
<DD>Releases an interface.
806
<P>
807
<DD><DL>
808
<DT><B>Parameters:</B><DD><CODE>iface</CODE> - The interface number (usually 0)</DL>
809
</DD>
810
</DL>
811
<HR>
812
 
813 5 ZTEX
<A NAME="uploadFirmware(ztex.ZtexIhxFile1, boolean)"><!-- --></A><H3>
814
uploadFirmware</H3>
815
<PRE>
816
public long <B>uploadFirmware</B>(<A HREF="../ztex/ZtexIhxFile1.html" title="class in ztex">ZtexIhxFile1</A>&nbsp;ihxFile,
817
                           boolean&nbsp;force)
818
                    throws <A HREF="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</A>,
819
                           <A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A>,
820
                           <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A>,
821
                           <A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A>,
822
                           <A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></PRE>
823
<DL>
824
<DD>Uploads the firmware to the EZ-USB and manages the renumeration process.
825
 <p>
826
 Before the firmware is uploaded the device is set into a reset state.
827
 After the upload the firmware is booted and the renumeration starts.
828
 During this process the device disappears from the bus and a new one
829
 occurs which will be assigned to this class automatically (instead of the disappeared one).
830
<P>
831
<DD><DL>
832
<DT><B>Parameters:</B><DD><CODE>ihxFile</CODE> - The firmware image.<DD><CODE>force</CODE> - The compatibility check is skipped if true.
833
<DT><B>Returns:</B><DD>the upload time in ms.
834
<DT><B>Throws:</B>
835
<DD><CODE><A HREF="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</A></CODE> - if the given firmware is not compatible to the installed one, see <A HREF="../ztex/ZtexDevice1.html#compatible(int, int, int, int)"><CODE>ZtexDevice1.compatible(int,int,int,int)</CODE></A> (Upload can be enforced using the <tt>force</tt> parameter)
836
<DD><CODE><A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A></CODE> - If an error occurred while attempting to upload the firmware.
837
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.
838
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.
839
<DD><CODE><A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></CODE> - if a device went lost after renumeration.</DL>
840
</DD>
841
</DL>
842
<HR>
843
 
844 2 ZTEX
<A NAME="uploadFirmware(java.lang.String, boolean)"><!-- --></A><H3>
845
uploadFirmware</H3>
846
<PRE>
847
public long <B>uploadFirmware</B>(java.lang.String&nbsp;ihxFileName,
848
                           boolean&nbsp;force)
849
                    throws <A HREF="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</A>,
850
                           <A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A>,
851
                           <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A>,
852
                           <A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A>,
853
                           <A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></PRE>
854
<DL>
855
<DD>Uploads the firmware to the EZ-USB and manages the renumeration process.
856
 <p>
857
 Before the firmware is uploaded the device is set into a reset state.
858
 After the upload the firmware is booted and the renumeration starts.
859
 During this process the device disappears from the bus and a new one
860
 occurs which will be assigned to this class automatically (instead of the disappeared one).
861
<P>
862
<DD><DL>
863
<DT><B>Parameters:</B><DD><CODE>ihxFileName</CODE> - The file name of the firmware image in ihx format. The file can be a regular file or a system resource (e.g. a file from the current jar archive).<DD><CODE>force</CODE> - The compatibility check is skipped if true.
864 3 ZTEX
<DT><B>Returns:</B><DD>the upload time in ms.
865 2 ZTEX
<DT><B>Throws:</B>
866
<DD><CODE><A HREF="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</A></CODE> - if the given firmware is not compatible to the installed one, see <A HREF="../ztex/ZtexDevice1.html#compatible(int, int, int, int)"><CODE>ZtexDevice1.compatible(int,int,int,int)</CODE></A> (Upload can be enforced using the <tt>force</tt> parameter)
867
<DD><CODE><A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A></CODE> - If an error occurred while attempting to upload the firmware.
868
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.
869
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.
870
<DD><CODE><A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></CODE> - if a device went lost after renumeration.</DL>
871
</DD>
872
</DL>
873
<HR>
874
 
875 8 ZTEX
<A NAME="uploadFirmware(java.io.InputStream, java.lang.String, boolean)"><!-- --></A><H3>
876
uploadFirmware</H3>
877
<PRE>
878
public long <B>uploadFirmware</B>(java.io.InputStream&nbsp;ihxIn,
879
                           java.lang.String&nbsp;name,
880
                           boolean&nbsp;force)
881
                    throws <A HREF="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</A>,
882
                           <A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A>,
883
                           <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A>,
884
                           <A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A>,
885
                           <A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></PRE>
886
<DL>
887
<DD>Uploads the firmware to the EZ-USB and manages the renumeration process.
888
 <p>
889
 Before the firmware is uploaded the device is set into a reset state.
890
 After the upload the firmware is booted and the renumeration starts.
891
 During this process the device disappears from the bus and a new one
892
 occurs which will be assigned to this class automatically (instead of the disappeared one).
893
<P>
894
<DD><DL>
895
<DT><B>Parameters:</B><DD><CODE>ihxIn</CODE> - Input stream from which the ihx file is read.<DD><CODE>name</CODE> - Name of the input.<DD><CODE>force</CODE> - The compatibility check is skipped if true.
896
<DT><B>Returns:</B><DD>the upload time in ms.
897
<DT><B>Throws:</B>
898
<DD><CODE><A HREF="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</A></CODE> - if the given firmware is not compatible to the installed one, see <A HREF="../ztex/ZtexDevice1.html#compatible(int, int, int, int)"><CODE>ZtexDevice1.compatible(int,int,int,int)</CODE></A> (Upload can be enforced using the <tt>force</tt> parameter)
899
<DD><CODE><A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A></CODE> - If an error occurred while attempting to upload the firmware.
900
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.
901
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.
902
<DD><CODE><A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></CODE> - if a device went lost after renumeration.</DL>
903
</DD>
904
</DL>
905
<HR>
906
 
907 2 ZTEX
<A NAME="resetEzUsb()"><!-- --></A><H3>
908
resetEzUsb</H3>
909
<PRE>
910
public void <B>resetEzUsb</B>()
911
                throws <A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A>,
912
                       <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A>,
913
                       <A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A>,
914
                       <A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></PRE>
915
<DL>
916
<DD>Resets the EZ-USB and manages the renumeration process.
917
 <p>
918
 After the reset the renumeration starts.
919
 During this process the device disappears from the bus and a new one
920
 occurs which will be assigned to this class automatically (instead of the disappeared one).
921
<P>
922
<DD><DL>
923
 
924
<DT><B>Throws:</B>
925
<DD><CODE><A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A></CODE> - If an error occurred while attempting to upload the firmware.
926
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.
927
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.
928
<DD><CODE><A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></CODE> - if a device went lost after renumeration.</DL>
929
</DD>
930
</DL>
931
<HR>
932
 
933
<A NAME="toString()"><!-- --></A><H3>
934
toString</H3>
935
<PRE>
936
public java.lang.String <B>toString</B>()</PRE>
937
<DL>
938
<DD>Returns a lot of useful information about the corresponding device.
939
<P>
940
<DD><DL>
941
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
942
</DD>
943
<DD><DL>
944
 
945
<DT><B>Returns:</B><DD>a lot of useful information about the corresponding device.</DL>
946
</DD>
947
</DL>
948
<!-- ========= END OF CLASS DATA ========= -->
949
<HR>
950
 
951
 
952
<!-- ======= START OF BOTTOM NAVBAR ====== -->
953
<A NAME="navbar_bottom"><!-- --></A>
954
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
955
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
956
<TR>
957
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
958
<A NAME="navbar_bottom_firstrow"><!-- --></A>
959
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
960
  <TR ALIGN="center" VALIGN="top">
961
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
962
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
963
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
964
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
965
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
966
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
967
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
968
  </TR>
969
</TABLE>
970
</TD>
971
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
972
</EM>
973
</TD>
974
</TR>
975
 
976
<TR>
977
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
978
&nbsp;<A HREF="../ztex/UsbException.html" title="class in ztex"><B>PREV CLASS</B></A>&nbsp;
979
&nbsp;<A HREF="../ztex/Ztex1v1.html" title="class in ztex"><B>NEXT CLASS</B></A></FONT></TD>
980
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
981
  <A HREF="../index.html?ztex/Ztex1.html" target="_top"><B>FRAMES</B></A>  &nbsp;
982
&nbsp;<A HREF="Ztex1.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
983
&nbsp;<SCRIPT type="text/javascript">
984
  <!--
985
  if(window==top) {
986
    document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
987
  }
988
  //-->
989
</SCRIPT>
990
<NOSCRIPT>
991
  <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
992
</NOSCRIPT>
993
 
994
 
995
</FONT></TD>
996
</TR>
997
<TR>
998
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
999
  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>
1000
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1001
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>
1002
</TR>
1003
</TABLE>
1004
<A NAME="skip-navbar_bottom"></A>
1005
<!-- ======== END OF BOTTOM NAVBAR ======= -->
1006
 
1007
<HR>
1008
 
1009
</BODY>
1010
</HTML>

powered by: WebSVN 2.1.0

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