-Detects endpoints for different configurations, interface and
altsetting numbers > 0
- Routine added for changing configuration, interface or altsetting
number
sanei_usb_set_configuration
sanei_usb_claim_interface
sanei_usb_release_interface
sanei_usb_set_altinterface
* sanei/sanei_usb.c configure.in: use usb_interrupt_read instead of
usb_bulk_read for sanei_usb_read_int. Fixes bug #300878. Added a missing DBG output in sanei_usb_read_int. Check for
usb_interrupt_read to make sure, we have at least version 0.1.8.
/** Initiate a interrupt transfer read.
*
* Read up to size bytes from the interrupt endpoint from the device to
* buffer. After the read, size contains the number of bytes actually read.
*
* @param dn device number
* @param buffer buffer to store read data in
* @param size size of the data
*
* @return
* - SANE_STATUS_GOOD - on succes
* - SANE_STATUS_EOF - if zero bytes have been read
* - SANE_STATUS_IO_ERROR - if an error occured during the read
* - SANE_STATUS_INVAL - on every other error
*
*/
sanei_usb_find_devices is called. Also only devices that really exist are
opened. These changes fixe the slow detection of devices on systems using
devfs or old scanner drivers.
interface number from bInterfaceNumber. Explicitely set the alternative
setting. When closing, call clear_halt, and reset_ep, and release_interface
explicitley. On errors in write/read, call clear_halt.
usb_find_busses only once. Make sure that already opened devices aren't opened
again. Exit libusb scan loop if one device is found. Make error values more
expressive. Check for missing config descriptors before using them to avoid
segfaults.
Henning Meier-Geinitz <henning@meier-geinitz.de>