usb.util
Class EZ

java.lang.Object
  |
  +--usb.util.EZ

public final class EZ
extends java.lang.Object

This class supports downloading firmware to devices based on Cypress EZ-USB FX2 microcontrollers. These 8-bit microcontrollers (8051 family) can be used in completely "soft" modes, where all firmware is downloaded from the host, as well as with firmware stored on ROM. After downloading firmware, the device normally performs "ReNumeration" (tm), reinitializing with new device descriptors to reflect functionality provided by the firmware. (Sometimes downloading more firmware, into external memory banks.)


Various Java Virtual Machines exist for 8051 processors. You may first have heard of embedded Java with "Java Rings", which used such 8051 processors. Commercial versions, even using bank switching to enlarge the 16 bit address space, are now available from several sources.

Most developers use C and assembly language inside such devices, though. See http://sdcc.sourceforge.net for one Linux-friendly 8051 C/asm package you can use to create firmware images in Intel Hex Format. Good commercial IDEs also exist, as well as software emulators.


Constructor Summary
EZ(Device dev)
          Wraps the device; caller must guarantee that this device supports EZ-USB firmware download primitives.
 
Method Summary
 void download(java.io.InputStream ihx)
          Downloads firmware to the device, normally causing it to reset and re-enumerate under control of that firmware.
static void main(java.lang.String[] argv)
          Downloads firmware to devices.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EZ

public EZ(Device dev)
Wraps the device; caller must guarantee that this device supports EZ-USB firmware download primitives. Currently "knows" only about the FX2. The earlier "FX" model (USB-1.1 only) could also be supported through this API.
Method Detail

main

public static void main(java.lang.String[] argv)
Downloads firmware to devices. Usage: EZ [--portid id] firmware.ihx

download

public void download(java.io.InputStream ihx)
              throws java.io.IOException
Downloads firmware to the device, normally causing it to reset and re-enumerate under control of that firmware. After downloading firmware, neither this wrapper nor the Device it wraps should be used again. A new device will then appear at that location in the USB device tree.
Parameters:
ihx - firmware, in Intel Hex format.


Associated source code is licenced under the LGPL.
See http://jusb.sourceforge.net
This documentation was derived from that source code on 24-Jul-2002.