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

Subversion Repositories usb_fpga_1_2

[/] [usb_fpga_1_2/] [trunk/] [docs/] [java/] [ztex/] [Ztex1.html] - Blame information for rev 7

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

Line No. Rev Author Line
1 3 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 5 ZTEX
<!-- Generated by javadoc (build 1.6.0_02) on Wed Sep 29 21:04:05 CEST 2010 -->
6 3 ZTEX
<TITLE>
7
Ztex1
8
</TITLE>
9
 
10 5 ZTEX
<META NAME="date" CONTENT="2010-09-29">
11 3 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 4 ZTEX
&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 3 ZTEX
</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 4 ZTEX
<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 3 ZTEX
<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
<CODE>&nbsp;int</CODE></FONT></TD>
209
<TD><CODE><B><A HREF="../ztex/Ztex1.html#handle()">handle</A></B>()</CODE>
210
 
211
<BR>
212
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the USB file handle.</TD>
213
</TR>
214
<TR BGCOLOR="white" CLASS="TableRowColor">
215
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
216
<CODE>&nbsp;void</CODE></FONT></TD>
217 4 ZTEX
<TD><CODE><B><A HREF="../ztex/Ztex1.html#releaseInterface(int)">releaseInterface</A></B>(int&nbsp;iface)</CODE>
218
 
219
<BR>
220
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Releases an interface.</TD>
221
</TR>
222
<TR BGCOLOR="white" CLASS="TableRowColor">
223
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
224
<CODE>&nbsp;void</CODE></FONT></TD>
225 3 ZTEX
<TD><CODE><B><A HREF="../ztex/Ztex1.html#resetEzUsb()">resetEzUsb</A></B>()</CODE>
226
 
227
<BR>
228
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets the EZ-USB and manages the renumeration process.</TD>
229
</TR>
230
<TR BGCOLOR="white" CLASS="TableRowColor">
231
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
232 4 ZTEX
<CODE>&nbsp;void</CODE></FONT></TD>
233
<TD><CODE><B><A HREF="../ztex/Ztex1.html#setConfiguration(int)">setConfiguration</A></B>(int&nbsp;config)</CODE>
234
 
235
<BR>
236
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the configuration.</TD>
237
</TR>
238
<TR BGCOLOR="white" CLASS="TableRowColor">
239
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
240 3 ZTEX
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
241
<TD><CODE><B><A HREF="../ztex/Ztex1.html#toString()">toString</A></B>()</CODE>
242
 
243
<BR>
244
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a lot of useful information about the corresponding device.</TD>
245
</TR>
246
<TR BGCOLOR="white" CLASS="TableRowColor">
247
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
248 4 ZTEX
<CODE>&nbsp;void</CODE></FONT></TD>
249
<TD><CODE><B><A HREF="../ztex/Ztex1.html#trySetConfiguration(int)">trySetConfiguration</A></B>(int&nbsp;config)</CODE>
250
 
251
<BR>
252
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tries to set the configuration.</TD>
253
</TR>
254
<TR BGCOLOR="white" CLASS="TableRowColor">
255
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
256 3 ZTEX
<CODE>&nbsp;long</CODE></FONT></TD>
257
<TD><CODE><B><A HREF="../ztex/Ztex1.html#uploadFirmware(java.lang.String, boolean)">uploadFirmware</A></B>(java.lang.String&nbsp;ihxFileName,
258
               boolean&nbsp;force)</CODE>
259
 
260
<BR>
261
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uploads the firmware to the EZ-USB and manages the renumeration process.</TD>
262
</TR>
263
<TR BGCOLOR="white" CLASS="TableRowColor">
264
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
265
<CODE>&nbsp;boolean</CODE></FONT></TD>
266
<TD><CODE><B><A HREF="../ztex/Ztex1.html#valid()">valid</A></B>()</CODE>
267
 
268
<BR>
269
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if ZTEX descriptor 1 is available.</TD>
270
</TR>
271
<TR BGCOLOR="white" CLASS="TableRowColor">
272
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
273
<CODE>&nbsp;int</CODE></FONT></TD>
274
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand(int, java.lang.String)">vendorCommand</A></B>(int&nbsp;cmd,
275
              java.lang.String&nbsp;func)</CODE>
276
 
277
<BR>
278
&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>
279
</TR>
280
<TR BGCOLOR="white" CLASS="TableRowColor">
281
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282
<CODE>&nbsp;int</CODE></FONT></TD>
283
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand(int, java.lang.String, int, int)">vendorCommand</A></B>(int&nbsp;cmd,
284
              java.lang.String&nbsp;func,
285
              int&nbsp;value,
286
              int&nbsp;index)</CODE>
287
 
288
<BR>
289
&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>
290
</TR>
291
<TR BGCOLOR="white" CLASS="TableRowColor">
292
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
293
<CODE>&nbsp;int</CODE></FONT></TD>
294
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand(int, java.lang.String, int, int, byte[], int)">vendorCommand</A></B>(int&nbsp;cmd,
295
              java.lang.String&nbsp;func,
296
              int&nbsp;value,
297
              int&nbsp;index,
298
              byte[]&nbsp;buf,
299
              int&nbsp;length)</CODE>
300
 
301
<BR>
302
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor command to Endpoint 0 of the EZ-USB device.</TD>
303
</TR>
304
<TR BGCOLOR="white" CLASS="TableRowColor">
305
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
306
<CODE>&nbsp;void</CODE></FONT></TD>
307
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorCommand2(int, java.lang.String, int, int, byte[], int)">vendorCommand2</A></B>(int&nbsp;cmd,
308
               java.lang.String&nbsp;func,
309
               int&nbsp;value,
310
               int&nbsp;index,
311
               byte[]&nbsp;buf,
312
               int&nbsp;length)</CODE>
313
 
314
<BR>
315
&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>
316
</TR>
317
<TR BGCOLOR="white" CLASS="TableRowColor">
318
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
319
<CODE>&nbsp;int</CODE></FONT></TD>
320
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest(int, java.lang.String, byte[], int)">vendorRequest</A></B>(int&nbsp;cmd,
321
              java.lang.String&nbsp;func,
322
              byte[]&nbsp;buf,
323
              int&nbsp;maxlen)</CODE>
324
 
325
<BR>
326
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor request to Endpoint 0 of the EZ-USB device.</TD>
327
</TR>
328
<TR BGCOLOR="white" CLASS="TableRowColor">
329
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
330
<CODE>&nbsp;int</CODE></FONT></TD>
331
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest(int, java.lang.String, int, int, byte[], int)">vendorRequest</A></B>(int&nbsp;cmd,
332
              java.lang.String&nbsp;func,
333
              int&nbsp;value,
334
              int&nbsp;index,
335
              byte[]&nbsp;buf,
336
              int&nbsp;maxlen)</CODE>
337
 
338
<BR>
339
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a vendor request to Endpoint 0 of the EZ-USB device.</TD>
340
</TR>
341
<TR BGCOLOR="white" CLASS="TableRowColor">
342
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
343
<CODE>&nbsp;void</CODE></FONT></TD>
344
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest2(int, java.lang.String, byte[], int)">vendorRequest2</A></B>(int&nbsp;cmd,
345
               java.lang.String&nbsp;func,
346
               byte[]&nbsp;buf,
347
               int&nbsp;maxlen)</CODE>
348
 
349
<BR>
350
&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>
351
</TR>
352
<TR BGCOLOR="white" CLASS="TableRowColor">
353
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
354
<CODE>&nbsp;void</CODE></FONT></TD>
355
<TD><CODE><B><A HREF="../ztex/Ztex1.html#vendorRequest2(int, java.lang.String, int, int, byte[], int)">vendorRequest2</A></B>(int&nbsp;cmd,
356
               java.lang.String&nbsp;func,
357
               int&nbsp;value,
358
               int&nbsp;index,
359
               byte[]&nbsp;buf,
360
               int&nbsp;maxlen)</CODE>
361
 
362
<BR>
363
&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>
364
</TR>
365
</TABLE>
366
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
367
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
368
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
369
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
370
</TR>
371
<TR BGCOLOR="white" CLASS="TableRowColor">
372
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
373
</TR>
374
</TABLE>
375
&nbsp;
376
<P>
377
 
378
<!-- ============ FIELD DETAIL =========== -->
379
 
380
<A NAME="field_detail"><!-- --></A>
381
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
382
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
383
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
384
<B>Field Detail</B></FONT></TH>
385
</TR>
386
</TABLE>
387
 
388
<A NAME="certainWorkarounds"><!-- --></A><H3>
389
certainWorkarounds</H3>
390
<PRE>
391
public boolean <B>certainWorkarounds</B></PRE>
392
<DL>
393 4 ZTEX
<DD>Setting to true enables certain workarounds, e.g. to deal with bad driver/OS implementations.
394 3 ZTEX
<P>
395
<DL>
396
</DL>
397
</DL>
398
<HR>
399
 
400
<A NAME="controlMsgTimeout"><!-- --></A><H3>
401
controlMsgTimeout</H3>
402
<PRE>
403
public int <B>controlMsgTimeout</B></PRE>
404
<DL>
405
<DD>The timeout for  control messages in ms.
406
<P>
407
<DL>
408
</DL>
409
</DL>
410
 
411
<!-- ========= CONSTRUCTOR DETAIL ======== -->
412
 
413
<A NAME="constructor_detail"><!-- --></A>
414
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
415
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
416
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
417
<B>Constructor Detail</B></FONT></TH>
418
</TR>
419
</TABLE>
420
 
421
<A NAME="Ztex1(ztex.ZtexDevice1)"><!-- --></A><H3>
422
Ztex1</H3>
423
<PRE>
424
public <B>Ztex1</B>(<A HREF="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</A>&nbsp;pDev)
425
      throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
426
<DL>
427
<DD>Constructs an instance from a given device.
428
<P>
429
<DL>
430
<DT><B>Parameters:</B><DD><CODE>pDev</CODE> - The given device.
431
<DT><B>Throws:</B>
432
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if an communication error occurred.</DL>
433
</DL>
434
 
435
<!-- ============ METHOD DETAIL ========== -->
436
 
437
<A NAME="method_detail"><!-- --></A>
438
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
439
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
440
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
441
<B>Method Detail</B></FONT></TH>
442
</TR>
443
</TABLE>
444
 
445
<A NAME="finalize()"><!-- --></A><H3>
446
finalize</H3>
447
<PRE>
448
protected void <B>finalize</B>()</PRE>
449
<DL>
450
<DD>The destructor closes the USB file handle.
451
<P>
452
<DD><DL>
453
<DT><B>Overrides:</B><DD><CODE>finalize</CODE> in class <CODE>java.lang.Object</CODE></DL>
454
</DD>
455
<DD><DL>
456
</DL>
457
</DD>
458
</DL>
459
<HR>
460
 
461
<A NAME="handle()"><!-- --></A><H3>
462
handle</H3>
463
<PRE>
464
public final int <B>handle</B>()</PRE>
465
<DL>
466
<DD>Returns the USB file handle.
467
<P>
468
<DD><DL>
469
</DL>
470
</DD>
471
</DL>
472
<HR>
473
 
474
<A NAME="dev()"><!-- --></A><H3>
475
dev</H3>
476
<PRE>
477
public final <A HREF="../ztex/ZtexDevice1.html" title="class in ztex">ZtexDevice1</A> <B>dev</B>()</PRE>
478
<DL>
479
<DD>Returns the corresponding <A HREF="../ztex/ZtexDevice1.html" title="class in ztex"><CODE>ZtexDevice1</CODE></A>.
480
<P>
481
<DD><DL>
482
 
483
<DT><B>Returns:</B><DD>the corresponding <A HREF="../ztex/ZtexDevice1.html" title="class in ztex"><CODE>ZtexDevice1</CODE></A>.</DL>
484
</DD>
485
</DL>
486
<HR>
487
 
488
<A NAME="valid()"><!-- --></A><H3>
489
valid</H3>
490
<PRE>
491
public boolean <B>valid</B>()</PRE>
492
<DL>
493
<DD>Returns true if ZTEX descriptor 1 is available.
494
<P>
495
<DD><DL>
496
 
497
<DT><B>Returns:</B><DD>true if ZTEX descriptor 1 is available.</DL>
498
</DD>
499
</DL>
500
<HR>
501
 
502
<A NAME="checkValid()"><!-- --></A><H3>
503
checkValid</H3>
504
<PRE>
505
public void <B>checkValid</B>()
506
                throws <A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></PRE>
507
<DL>
508
<DD>Checks whether ZTEX descriptor 1 is available.
509
<P>
510
<DD><DL>
511
 
512
<DT><B>Throws:</B>
513
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.</DL>
514
</DD>
515
</DL>
516
<HR>
517
 
518
<A NAME="vendorCommand(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
519
vendorCommand</H3>
520
<PRE>
521
public int <B>vendorCommand</B>(int&nbsp;cmd,
522
                         java.lang.String&nbsp;func,
523
                         int&nbsp;value,
524
                         int&nbsp;index,
525
                         byte[]&nbsp;buf,
526
                         int&nbsp;length)
527
                  throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
528
<DL>
529
<DD>Sends a vendor command to Endpoint 0 of the EZ-USB device.
530
 The command may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
531
<P>
532
<DD><DL>
533
<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.
534
<DT><B>Returns:</B><DD>the number of bytes sent.
535
<DT><B>Throws:</B>
536
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
537
</DD>
538
</DL>
539
<HR>
540
 
541
<A NAME="vendorCommand(int, java.lang.String, int, int)"><!-- --></A><H3>
542
vendorCommand</H3>
543
<PRE>
544
public int <B>vendorCommand</B>(int&nbsp;cmd,
545
                         java.lang.String&nbsp;func,
546
                         int&nbsp;value,
547
                         int&nbsp;index)
548
                  throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
549
<DL>
550
<DD>Sends a vendor command with no payload data to Endpoint 0 of the EZ-USB device.
551
 The command may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
552
<P>
553
<DD><DL>
554
<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.
555
<DT><B>Returns:</B><DD>the number of bytes sent.
556
<DT><B>Throws:</B>
557
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
558
</DD>
559
</DL>
560
<HR>
561
 
562
<A NAME="vendorCommand(int, java.lang.String)"><!-- --></A><H3>
563
vendorCommand</H3>
564
<PRE>
565
public int <B>vendorCommand</B>(int&nbsp;cmd,
566
                         java.lang.String&nbsp;func)
567
                  throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
568
<DL>
569
<DD>Sends a vendor command with no payload data and no setup data to Endpoint 0 of the EZ-USB device.
570
 The command may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
571
<P>
572
<DD><DL>
573
<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.
574
<DT><B>Returns:</B><DD>the number of bytes sent.
575
<DT><B>Throws:</B>
576
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
577
</DD>
578
</DL>
579
<HR>
580
 
581
<A NAME="vendorRequest(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
582
vendorRequest</H3>
583
<PRE>
584
public int <B>vendorRequest</B>(int&nbsp;cmd,
585
                         java.lang.String&nbsp;func,
586
                         int&nbsp;value,
587
                         int&nbsp;index,
588
                         byte[]&nbsp;buf,
589
                         int&nbsp;maxlen)
590
                  throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
591
<DL>
592
<DD>Sends a vendor request to Endpoint 0 of the EZ-USB device.
593
 The request may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
594
<P>
595
<DD><DL>
596
<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.
597
<DT><B>Returns:</B><DD>the number of bytes received.
598
<DT><B>Throws:</B>
599
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
600
</DD>
601
</DL>
602
<HR>
603
 
604
<A NAME="vendorRequest(int, java.lang.String, byte[], int)"><!-- --></A><H3>
605
vendorRequest</H3>
606
<PRE>
607
public int <B>vendorRequest</B>(int&nbsp;cmd,
608
                         java.lang.String&nbsp;func,
609
                         byte[]&nbsp;buf,
610
                         int&nbsp;maxlen)
611
                  throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
612
<DL>
613
<DD>Sends a vendor request to Endpoint 0 of the EZ-USB device.
614
 The request may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
615
<P>
616
<DD><DL>
617
<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.
618
<DT><B>Returns:</B><DD>the number of bytes sent.
619
<DT><B>Throws:</B>
620
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.</DL>
621
</DD>
622
</DL>
623
<HR>
624
 
625
<A NAME="vendorCommand2(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
626
vendorCommand2</H3>
627
<PRE>
628
public void <B>vendorCommand2</B>(int&nbsp;cmd,
629
                           java.lang.String&nbsp;func,
630
                           int&nbsp;value,
631
                           int&nbsp;index,
632
                           byte[]&nbsp;buf,
633
                           int&nbsp;length)
634
                    throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
635
<DL>
636
<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.
637
 The command may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
638
<P>
639
<DD><DL>
640
<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.
641
<DT><B>Throws:</B>
642
<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>
643
</DD>
644
</DL>
645
<HR>
646
 
647
<A NAME="vendorRequest2(int, java.lang.String, int, int, byte[], int)"><!-- --></A><H3>
648
vendorRequest2</H3>
649
<PRE>
650
public void <B>vendorRequest2</B>(int&nbsp;cmd,
651
                           java.lang.String&nbsp;func,
652
                           int&nbsp;value,
653
                           int&nbsp;index,
654
                           byte[]&nbsp;buf,
655
                           int&nbsp;maxlen)
656
                    throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
657
<DL>
658
<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.
659
 The request may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
660
<P>
661
<DD><DL>
662
<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.
663
<DT><B>Throws:</B>
664
<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>
665
</DD>
666
</DL>
667
<HR>
668
 
669
<A NAME="vendorRequest2(int, java.lang.String, byte[], int)"><!-- --></A><H3>
670
vendorRequest2</H3>
671
<PRE>
672
public void <B>vendorRequest2</B>(int&nbsp;cmd,
673
                           java.lang.String&nbsp;func,
674
                           byte[]&nbsp;buf,
675
                           int&nbsp;maxlen)
676
                    throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
677
<DL>
678
<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.
679
 The request may be send multiple times until the <A HREF="../ztex/Ztex1.html#controlMsgTimeout"><CODE>controlMsgTimeout</CODE></A> is reached.
680
<P>
681
<DD><DL>
682
<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.
683
<DT><B>Throws:</B>
684
<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>
685
</DD>
686
</DL>
687
<HR>
688
 
689 4 ZTEX
<A NAME="setConfiguration(int)"><!-- --></A><H3>
690
setConfiguration</H3>
691
<PRE>
692
public void <B>setConfiguration</B>(int&nbsp;config)
693
                      throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
694
<DL>
695
<DD>Sets the configuration.
696
<P>
697
<DD><DL>
698
<DT><B>Parameters:</B><DD><CODE>config</CODE> - The configuration number (usually 1)
699
<DT><B>Throws:</B>
700
<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>
701
</DD>
702
</DL>
703
<HR>
704
 
705
<A NAME="trySetConfiguration(int)"><!-- --></A><H3>
706
trySetConfiguration</H3>
707
<PRE>
708
public void <B>trySetConfiguration</B>(int&nbsp;config)</PRE>
709
<DL>
710
<DD>Tries to set the configuration.
711
 If an error occurs while attempting to set the configuration, a warning messaage is printed to stderr.
712
<P>
713
<DD><DL>
714
<DT><B>Parameters:</B><DD><CODE>config</CODE> - The configuration number (usually 1)</DL>
715
</DD>
716
</DL>
717
<HR>
718
 
719
<A NAME="claimInterface(int)"><!-- --></A><H3>
720
claimInterface</H3>
721
<PRE>
722
public void <B>claimInterface</B>(int&nbsp;iface)
723
                    throws <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></PRE>
724
<DL>
725
<DD>Claims an interface.
726
<P>
727
<DD><DL>
728
<DT><B>Parameters:</B><DD><CODE>iface</CODE> - The interface number (usually 0)
729
<DT><B>Throws:</B>
730
<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>
731
</DD>
732
</DL>
733
<HR>
734
 
735
<A NAME="releaseInterface(int)"><!-- --></A><H3>
736
releaseInterface</H3>
737
<PRE>
738
public void <B>releaseInterface</B>(int&nbsp;iface)</PRE>
739
<DL>
740
<DD>Releases an interface.
741
<P>
742
<DD><DL>
743
<DT><B>Parameters:</B><DD><CODE>iface</CODE> - The interface number (usually 0)</DL>
744
</DD>
745
</DL>
746
<HR>
747
 
748 3 ZTEX
<A NAME="uploadFirmware(java.lang.String, boolean)"><!-- --></A><H3>
749
uploadFirmware</H3>
750
<PRE>
751
public long <B>uploadFirmware</B>(java.lang.String&nbsp;ihxFileName,
752
                           boolean&nbsp;force)
753
                    throws <A HREF="../ztex/IncompatibleFirmwareException.html" title="class in ztex">IncompatibleFirmwareException</A>,
754
                           <A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A>,
755
                           <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A>,
756
                           <A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A>,
757
                           <A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></PRE>
758
<DL>
759
<DD>Uploads the firmware to the EZ-USB and manages the renumeration process.
760
 <p>
761
 Before the firmware is uploaded the device is set into a reset state.
762
 After the upload the firmware is booted and the renumeration starts.
763
 During this process the device disappears from the bus and a new one
764
 occurs which will be assigned to this class automatically (instead of the disappeared one).
765
<P>
766
<DD><DL>
767
<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.
768 5 ZTEX
<DT><B>Returns:</B><DD>the upload time in ms.
769 3 ZTEX
<DT><B>Throws:</B>
770
<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)
771
<DD><CODE><A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A></CODE> - If an error occurred while attempting to upload the firmware.
772
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.
773
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.
774
<DD><CODE><A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></CODE> - if a device went lost after renumeration.</DL>
775
</DD>
776
</DL>
777
<HR>
778
 
779
<A NAME="resetEzUsb()"><!-- --></A><H3>
780
resetEzUsb</H3>
781
<PRE>
782
public void <B>resetEzUsb</B>()
783
                throws <A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A>,
784
                       <A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A>,
785
                       <A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A>,
786
                       <A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></PRE>
787
<DL>
788
<DD>Resets the EZ-USB and manages the renumeration process.
789
 <p>
790
 After the reset the renumeration starts.
791
 During this process the device disappears from the bus and a new one
792
 occurs which will be assigned to this class automatically (instead of the disappeared one).
793
<P>
794
<DD><DL>
795
 
796
<DT><B>Throws:</B>
797
<DD><CODE><A HREF="../ztex/FirmwareUploadException.html" title="class in ztex">FirmwareUploadException</A></CODE> - If an error occurred while attempting to upload the firmware.
798
<DD><CODE><A HREF="../ztex/UsbException.html" title="class in ztex">UsbException</A></CODE> - if a communication error occurs.
799
<DD><CODE><A HREF="../ztex/InvalidFirmwareException.html" title="class in ztex">InvalidFirmwareException</A></CODE> - if ZTEX descriptor 1 is not available.
800
<DD><CODE><A HREF="../ztex/DeviceLostException.html" title="class in ztex">DeviceLostException</A></CODE> - if a device went lost after renumeration.</DL>
801
</DD>
802
</DL>
803
<HR>
804
 
805
<A NAME="toString()"><!-- --></A><H3>
806
toString</H3>
807
<PRE>
808
public java.lang.String <B>toString</B>()</PRE>
809
<DL>
810
<DD>Returns a lot of useful information about the corresponding device.
811
<P>
812
<DD><DL>
813
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
814
</DD>
815
<DD><DL>
816
 
817
<DT><B>Returns:</B><DD>a lot of useful information about the corresponding device.</DL>
818
</DD>
819
</DL>
820
<!-- ========= END OF CLASS DATA ========= -->
821
<HR>
822
 
823
 
824
<!-- ======= START OF BOTTOM NAVBAR ====== -->
825
<A NAME="navbar_bottom"><!-- --></A>
826
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
827
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
828
<TR>
829
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
830
<A NAME="navbar_bottom_firstrow"><!-- --></A>
831
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
832
  <TR ALIGN="center" VALIGN="top">
833
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
834
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
835
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
836
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
837
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
838
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
839
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
840
  </TR>
841
</TABLE>
842
</TD>
843
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
844
</EM>
845
</TD>
846
</TR>
847
 
848
<TR>
849
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
850
&nbsp;<A HREF="../ztex/UsbException.html" title="class in ztex"><B>PREV CLASS</B></A>&nbsp;
851
&nbsp;<A HREF="../ztex/Ztex1v1.html" title="class in ztex"><B>NEXT CLASS</B></A></FONT></TD>
852
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
853
  <A HREF="../index.html?ztex/Ztex1.html" target="_top"><B>FRAMES</B></A>  &nbsp;
854
&nbsp;<A HREF="Ztex1.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
855
&nbsp;<SCRIPT type="text/javascript">
856
  <!--
857
  if(window==top) {
858
    document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
859
  }
860
  //-->
861
</SCRIPT>
862
<NOSCRIPT>
863
  <A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
864
</NOSCRIPT>
865
 
866
 
867
</FONT></TD>
868
</TR>
869
<TR>
870
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
871
  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>
872
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
873
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>
874
</TR>
875
</TABLE>
876
<A NAME="skip-navbar_bottom"></A>
877
<!-- ======== END OF BOTTOM NAVBAR ======= -->
878
 
879
<HR>
880
 
881
</BODY>
882
</HTML>

powered by: WebSVN 2.1.0

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