libftdi Archives

Subject: Use libusb 1.0

From: Jie Zhang <jie.zhang@xxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sun, 9 Aug 2009 22:44:54 +0800
I have almost done the coding. Before sending out the patch, I need to know what's the best way to deal with libusb 0.1.

Should we still keep support for libusb 0.1 because libusb 1.0 is not supported on Windows?

If so, which is the best way to do it?

1. Add a lot of #if...#else...#endif in source code. There will be too many such cases. The code will look very ugly.

2. Use new files for libusb 1.0, such as ftdi.c for libusb 0.1 and ftdi-new.c for libusb 1.0. We can use some #if...#else...#endif in ftdi.h. There would be much code duplications between these two files.

3. Use a branch for libusb 0.1. This way the code will be kept clean. I prefer this way. We can roll out a last release which support libusb 0.1 API and in future we will not support libusb 0.1 in new releases. If people want to use libftdi with libusb 0.1, they can use that release.

What do you think?


Jie

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
Current Thread