ztex
Class EzUsb

java.lang.Object
  extended by ztex.EzUsb

public class EzUsb
extends java.lang.Object

Provides methods for uploading firmware to Cypress EZ-USB devices.


Constructor Summary
EzUsb()
           
 
Method Summary
static void resetFx2(long handle, boolean r)
          Controls the reset state of a Cypress EZ-USB device.
static long uploadFirmware(long handle, ImgFile imgFile)
          Uploads the Firmware to a Cypress EZ-USB device.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EzUsb

public EzUsb()
Method Detail

resetFx2

public static void resetFx2(long handle,
                            boolean r)
                     throws FirmwareUploadException
Controls the reset state of a Cypress EZ-USB device.

Parameters:
handle - The handle of the device.
r - The reset state (true means reset).
Throws:
FirmwareUploadException - if an error occurred while attempting to control the reset state.

uploadFirmware

public static long uploadFirmware(long handle,
                                  ImgFile imgFile)
                           throws FirmwareUploadException
Uploads the Firmware to a Cypress EZ-USB device.

Parameters:
handle - The handle of the device.
imgFile - The firmware image.
Returns:
the upload time in ms.
Throws:
FirmwareUploadException - if an error occurred while attempting to upload the firmware.