This should solve prolems when impact fails on second use.
#Add -DFORCE_PC3_IDENT to CFLAGS to force the identification of
#a Parallel Cable III
#Add -DFORCE_PC3_IDENT to CFLAGS to force the identification of
#a Parallel Cable III
-CFLAGS=-Wall -fPIC -DUSB_DRIVER_VERSION="\"$(shell stat -c '%y' usb-driver.c |cut -d\. -f1)\"" #-DFORCE_PC3_IDENT
+#Add -DNO_USB_RESET to disable the hard reset of the cable on
+#close of the device
+CFLAGS=-Wall -fPIC -DUSB_DRIVER_VERSION="\"$(shell stat -c '%y' usb-driver.c |cut -d\. -f1)\"" #-DFORCE_PC3_IDENT -DNO_USB_RESET
LIBS=-ldl -lusb -lpthread
LIBS=-ldl -lusb -lpthread
if (usbinterface >= 0)
usb_release_interface(usb_devhandle, usbinterface);
if (usbinterface >= 0)
usb_release_interface(usb_devhandle, usbinterface);
+ if (usb_devhandle) {
+#ifndef NO_USB_RESET
+ usb_reset(usb_devhandle);
+#endif
usb_close(usb_devhandle);
usb_close(usb_devhandle);
usb_devhandle = NULL;
usbinterface = -1;
usb_devhandle = NULL;
usbinterface = -1;