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