1 |
3 |
ZTEX |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
2 |
|
|
<html>
|
3 |
|
|
<head></head>
|
4 |
|
|
<body bgcolor="white">
|
5 |
|
|
The Java API of the <a href="http://www.ztex.de/firmware-kit/index.e.html">ZTEX EZ-USB SDK</a>.
|
6 |
|
|
<p>
|
7 |
|
|
This API is the host-side counterpart of the Firmware-Kit and allows user software to interact with
|
8 |
|
|
EZ-USB devices running with such firmware. It uses <a href="../ch/ntb/usb/package-summary.html">libusbJava</a>, a Java wrapper
|
9 |
|
|
for the libusb 0.1 and the libusb-win32 USB libraries. This API is known to run on Linux and Windows, but should work on every operating
|
10 |
|
|
system which supports libusb and Java.
|
11 |
|
|
<p>
|
12 |
|
|
<h2>Features</h2>
|
13 |
|
|
The main features are:
|
14 |
|
|
<ul>
|
15 |
|
|
<li> Platform independent host software. It is possible to pack all necessary files (libusb libraries, firmware, bitstream) into
|
16 |
|
|
one single jar archive which runs on both, Linux and Windows (and other OS's that support libusb and Java) </li>
|
17 |
|
|
<li> Licensed as Open Source under GPLv3 </li>
|
18 |
|
|
<li> Firmware upload directly into the EZ-USB Microcontroller</li>
|
19 |
|
|
<li> Access to EEPROM memory</li>
|
20 |
|
|
<li> Firmware upload to EEPROM</li>
|
21 |
|
|
<li> Support of Flash memory </li>
|
22 |
|
|
<li> Bitstream upload directly to the FPGA (for <a href="http://www.ztex.de/usb-fpga-1/usb-fpga-1.2.e.html">ZTEX USB-FPGA-Modules</a>)</li>
|
23 |
|
|
<li> Bitstream upload to Flash memory (for <a href="http://www.ztex.de/usb-fpga-1/usb-fpga-1.2.e.html">ZTEX USB-FPGA-Modules</a>)</li>
|
24 |
|
|
</ul>
|
25 |
|
|
|
26 |
|
|
<p>
|
27 |
|
|
<h2>Interaction with the firmware</h2>
|
28 |
|
|
Firmware built using the <a href="http://www.ztex.de/firmware-kit/index.e.html">Firmware Development Kit</a> supports an additional descriptor, the ZTEX descriptor 1. This descriptor
|
29 |
|
|
identifies the device and firmware, provides compatibility information (e.g. to avoid that a device is loaded with the wrong firmware)
|
30 |
|
|
and specifies the communication protocol. A description of the descriptor is given in {@link ztex.ZtexDevice1}.
|
31 |
|
|
<p>
|
32 |
|
|
The communication protocol defines how the functions provided by the firmware (see main features above)
|
33 |
|
|
can be accessed. Currently there is only one protocol implemented, the so called interface 1.
|
34 |
|
|
A description of the interface is given in {@link ztex.Ztex1v1}.
|
35 |
|
|
<p>
|
36 |
|
|
The most importand classes for the interaction with the EZ-USB device / firmware are
|
37 |
|
|
<p>
|
38 |
|
|
<table bgcolor="#404040" cellspacing=1 cellpadding=4>
|
39 |
|
|
<tr>
|
40 |
|
|
<td bgcolor="#ffffff" valign="top">{@link ztex.ZtexDevice1}</td>
|
41 |
|
|
<td bgcolor="#ffffff" valign="top">Represents an EZ-USB device that supports ZTEX descriptor 1. These devices can be found using {@link ztex.ZtexScanBus1}. </td>
|
42 |
|
|
</tr>
|
43 |
|
|
<tr>
|
44 |
|
|
<td bgcolor="#ffffff" valign="top">{@link ztex.Ztex1}</td>
|
45 |
|
|
<td bgcolor="#ffffff" valign="top">Implementation of interface-independent part of the communication protocol, e.g. uploading the firmware to the EZ-USB and renumeration management.</td>
|
46 |
|
|
</tr>
|
47 |
|
|
<tr>
|
48 |
|
|
<td bgcolor="#ffffff" valign="top">{@link ztex.Ztex1v1}</td>
|
49 |
|
|
<td bgcolor="#ffffff" valign="top">Implemenetaion of the Interface 1, i.e. the interface dependent part of the communication protocol.</td>
|
50 |
|
|
</tr>
|
51 |
|
|
</table>
|
52 |
|
|
|
53 |
|
|
<p>
|
54 |
4 |
ZTEX |
<h2>SDK overview</h2>
|
55 |
3 |
ZTEX |
The following diagram gives an overview about the usage of the different parts of the <a href="http://www.ztex.de/firmware-kit/index.e.html">ZTEX EZ-USB SDK</a>.
|
56 |
|
|
<p>
|
57 |
|
|
<img src="../../imgs/ztex_firmware_kit-diagram.png" width="660" height="600" alt="ZTEX EZ-USB SDK overview for Linux and Windows">
|
58 |
|
|
<p>
|
59 |
|
|
The host software usually consists of a single jar archive which contains
|
60 |
|
|
<ul>
|
61 |
|
|
<li> all necessary Java bytecode; </li>
|
62 |
|
|
<li> the libusb Java wrapper libraries for Linux (libusbJava.so) and Windows (libusbJava.dll), which are statically linked against libusb (no libusb installation required); </li>
|
63 |
|
|
<li> the firmware for the EZ-USB device (unless not installed in EEPROM); </li>
|
64 |
|
|
<li> Bitstream for the FPGA (if required). </li>
|
65 |
|
|
</ul>
|
66 |
|
|
This single jar archive runs on both, Linux and Windows (or other OS's that support libusb and Java).
|
67 |
|
|
<p>
|
68 |
|
|
On Linux this jar archive has no additional software requirements. The libusb(Java) library communicates directly with the EZ-USB device using kernel routines.
|
69 |
|
|
<p>
|
70 |
|
|
On Windows a libusb driver is required. (This driver is a part of the ZTEX SDK package). The libusb(Java) library communicates with the EZ-USB device using that driver.
|
71 |
|
|
|
72 |
|
|
<h2>Related Resources</h2>
|
73 |
|
|
For more information about this project visit the
|
74 |
|
|
<a href="http://www.ztex.de/firmware-kit/index.e.html">ZTEX EZ-USB SDK</a> page.
|
75 |
|
|
|
76 |
|
|
</body>
|
77 |
|
|
</html>
|