reset the USB cable when /dev/windrvr6 is closed.
This should solve prolems when impact fails on second use.
This commit is contained in:
parent
d6cf203254
commit
bbc3baea9b
4
Makefile
4
Makefile
@ -1,6 +1,8 @@
|
||||
#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
|
||||
|
||||
|
@ -830,8 +830,12 @@ int close(int fd) {
|
||||
if (usbinterface >= 0)
|
||||
usb_release_interface(usb_devhandle, usbinterface);
|
||||
|
||||
if (usb_devhandle)
|
||||
if (usb_devhandle) {
|
||||
#ifndef NO_USB_RESET
|
||||
usb_reset(usb_devhandle);
|
||||
#endif
|
||||
usb_close(usb_devhandle);
|
||||
}
|
||||
|
||||
usb_devhandle = NULL;
|
||||
usbinterface = -1;
|
||||
|
Reference in New Issue
Block a user