de     

API changes in releases 20160129 and 20160818

20160818 changes

In this release old LibusbJava/libusb-0.1 was replaced by usb4java/libusb-1.0. This required major changes in the source code of the API. The interface changes are kept small but host software has to be ported to usb4java too, see USB Access.

Parameter set changes of methods are not described here. See the API documentation if the compiler produces errors.

General changes

A few changes are required in the source code of the host software

  • Replace
    import ch.ntb.usb.*;

    by

    import java.nio.*;
    import org.usb4java.*;
  • Remove LibusbJava.usb_init(). Now new USB contexts are usually created automatically by ZtexScanBus1.
  • ZtexScanBus1.unref() should be called as soon the instance is not needed anymore
  • Ztex1.dispose() should be called as soon soon the instance is not needed anymore. (Remember that Ztex1 is the superclass of Ztex1v1.)
  • Byte arrays byte[] should be replaced by ByteBuffer's in order to benefit from improved Java NIO performance.

Helpers

Certain helper methods and classes simplify usage of synchronous and asynchronous transfers:

  • Ztex1.bulkRead(..) and Ztex1.bulkWrite(..) can be used for syncronous transfer. (Avoid the byte array variants. The will be marked as deprecated soon.)
  • Ztex1.allocateByteBuffer(...) Creates ByteBuffer's and initalizes them with content of a byte array.
  • Helper class for asynchronous transfers, see the memfifo example for a demonstration of their usage

20160129 changes

This is the first release with FX3 support. There are a few minor API changes:

 
en/software/api_changes.txt · Last modified: 2016/08/23 13:11 by stefan
 
Recent changes RSS feed Creative Commons License Powered by PHP Debian Driven by DokuWiki
[ZTEX Home] [Imprint] [Privacy policy]