diff -u /tmp/libusb-0.1.1/libusb.spec libusb-0.1.1/libusb.spec --- /tmp/libusb-0.1.1/libusb.spec Mon Feb 21 19:34:04 2000 +++ libusb-0.1.1/libusb.spec Mon Jul 17 21:57:36 2000 @@ -52,13 +52,11 @@ %defattr(-, root, root) %doc AUTHORS COPYING ChangeLog NEWS README -%{prefix}/lib/libusb.so.* +%{prefix}/lib/libusb*.so.* %files devel %defattr(-, root, root) -%{prefix}/lib/lib*.so %{prefix}/lib/*a %{prefix}/include/* -%{prefix}/man/man1/ %{prefix}/bin/* diff -u /tmp/libusb-0.1.1/libusb.spec.in libusb-0.1.1/libusb.spec.in --- /tmp/libusb-0.1.1/libusb.spec.in Tue Feb 15 01:03:21 2000 +++ libusb-0.1.1/libusb.spec.in Sun Jul 9 22:34:36 2000 @@ -52,13 +52,11 @@ %defattr(-, root, root) %doc AUTHORS COPYING ChangeLog NEWS README -%{prefix}/lib/libusb.so.* +%{prefix}/lib/libusb*.so.* %files devel %defattr(-, root, root) -%{prefix}/lib/lib*.so %{prefix}/lib/*a %{prefix}/include/* -%{prefix}/man/man1/ %{prefix}/bin/* diff -u /tmp/libusb-0.1.1/linux.c libusb-0.1.1/linux.c --- /tmp/libusb-0.1.1/linux.c Thu Feb 17 22:28:50 2000 +++ libusb-0.1.1/linux.c Mon Jul 17 22:16:34 2000 @@ -330,3 +330,36 @@ } } +int usb_resetep (usb_dev_handle *dev, unsigned int ep) +{ + int ret; + + ret = ioctl(dev->fd, IOCTL_USB_RESETEP, &ep); + if (ret) + USB_ERROR_STR(ret, "could not reset ep %d : %s", ep, + strerror(errno)); + return 0; +} + +int usb_clear_halt (usb_dev_handle *dev, unsigned int ep) +{ + int ret; + + printf ("coucou\n"); + ret = ioctl(dev->fd, IOCTL_USB_CLEAR_HALT, &ep); + printf ("usb_clear_halt() ioctl-->%d\n",(unsigned int)ret); + if (ret) + USB_ERROR_STR(ret, "could not clear/halt ep %d : %s", ep, + strerror(errno)); + return 0; +} + +int usb_reset (usb_dev_handle *dev) +{ + int ret; + + ret = ioctl(dev->fd, IOCTL_USB_RESET, NULL); + if (ret) + USB_ERROR_STR(ret, "could not reset : %s", strerror(errno)); + return 0; +} diff -u /tmp/libusb-0.1.1/linux.h libusb-0.1.1/linux.h --- /tmp/libusb-0.1.1/linux.h Tue Feb 15 01:51:39 2000 +++ libusb-0.1.1/linux.h Sun Jul 9 22:25:56 2000 @@ -41,6 +41,8 @@ #define IOCTL_USB_SETCONFIG _IOR('U', 5, unsigned int) #define IOCTL_USB_CLAIMINTF _IOR('U', 15, unsigned int) #define IOCTL_USB_RELEASEINTF _IOR('U', 16, unsigned int) +#define IOCTL_USB_RESET _IO('U', 20) +#define IOCTL_USB_CLEAR_HALT _IOR('U', 21, unsigned int) #endif Only in libusb-0.1.1: linux.lo Only in libusb-0.1.1: linux.o Only in libusb-0.1.1: stamp-h Common subdirectories: /tmp/libusb-0.1.1/tests and libusb-0.1.1/tests diff -u /tmp/libusb-0.1.1/usb.c libusb-0.1.1/usb.c --- /tmp/libusb-0.1.1/usb.c Fri Feb 18 00:05:19 2000 +++ libusb-0.1.1/usb.c Sun Jul 9 22:25:56 2000 @@ -15,6 +15,11 @@ int usb_debug = 0; struct usb_bus *usb_busses = NULL; +int usb_find_devices_on_bus(struct usb_bus *bus); +int usb_os_open(usb_dev_handle *dev); +int usb_os_close(usb_dev_handle *dev); +void usb_os_init(void); + int usb_find_devices(void) { struct usb_bus *bus; diff -u /tmp/libusb-0.1.1/usb.h libusb-0.1.1/usb.h --- /tmp/libusb-0.1.1/usb.h Thu Feb 17 22:32:25 2000 +++ libusb-0.1.1/usb.h Sat Jul 15 20:46:23 2000 @@ -199,6 +199,9 @@ int usb_set_configuration(usb_dev_handle *dev, int configuration); int usb_claim_interface(usb_dev_handle *dev, int interface); int usb_set_altinterface(usb_dev_handle *dev, int alternate); +int usb_resetep(usb_dev_handle *dev, unsigned int ep); +int usb_clear_halt(usb_dev_handle *dev, unsigned int ep); +int usb_reset(usb_dev_handle *dev); char *usb_strerror(void);