On Tue, Oct 11, 2011 at 10:22 AM, Xiaofan Chen <[email protected]> wrote: > On Tue, Oct 11, 2011 at 6:37 AM, Peter Stuge <[email protected]> wrote: >> I'm thinking a little about how to best get your work into OpenOCD. >> >> I think the best way is to start with one driver, and send a patch >> that changes only that one driver over to use libusb-1.0, but leaves >> the existing ones untouched. This means that you may need to create >> some duplicated functionality outside the driver, for drivers which >> use libusb-1.0, but I think this is OK, it will not likely be any >> significant amount of code, so be fairly quick to create, and not >> take much place. Once it is in place, you and others can more easily >> work on moving other drivers to libusb-1.0 in parallel. It's not at >> all necessary that you are the only doing that work. > > I agree with this approach. > > UrJtag can be a reference as well, since it support either libusb-1.0, > libusb-0.x/libusb-win32, or mix. It also supports either libftdi-1.0 or > libftdi-0.x. > http://urjtag.git.sourceforge.net/git/gitweb.cgi?p=urjtag/urjtag;a=tree >
I think urjtag's approach is good, to abstract libusb-1.0 and libusb, as well as libftdi-1.0/libftdi/libftd2xx. http://urjtag.git.sourceforge.net/git/gitweb.cgi?p=urjtag/urjtag;a=tree;f=urjtag/src/tap/usbconn;hb=HEAD -- Xiaofan _______________________________________________ Openocd-development mailing list [email protected] https://lists.berlios.de/mailman/listinfo/openocd-development
