[sane-devel] sanei_usb limitations

2010-11-27 Thread Reinhold Kainhofer
Am Freitag, 26. November 2010, um 23:00:56 schrieb Hugo "Bonstra" 
Grostabussiat:
> In its current state however, sanei_usb API does not allow us to choose
> what endpoint to use for bulk transfers. It will always use the first IN
> and OUT endpoints it finds for functions sanei_usb_read_bulk() ans
> sanei_usb_write_bulk() respectively.
> 
> To overcome that limitation, I thought of adding a few functions to
> sanei_usb API to allow specifying an alternative endpoint (for instance:
> sanei_usb_read_bulk_ep() which would take an additional ep argument of
> type SANE_Byte). 

That's basically what my patch does (there's some more work to do, like making 
it possible to use a default endpoint in the auto-detection phase):
http://codereview.appspot.com/2823041/

Cheers,
Reinhold

-- 
--
Reinhold Kainhofer, reinhold at kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org



[sane-devel] sanei_usb limitations

2010-11-26 Thread Hugo "Bonstra" Grostabussiat
Hi,
as I said in my last post, I am writing a backend for Hercules Scan at home
48 USB scanner.
This device uses an unusual USB interface which has 3 bulk endpoints:
* EP 0x01 is used to send commands to device
* EP 0x82 is used to get the result of some commands
* EP 0x83 is used to get scan data
In its current state however, sanei_usb API does not allow us to choose
what endpoint to use for bulk transfers. It will always use the first IN
and OUT endpoints it finds for functions sanei_usb_read_bulk() ans
sanei_usb_write_bulk() respectively.

To overcome that limitation, I thought of adding a few functions to
sanei_usb API to allow specifying an alternative endpoint (for instance:
sanei_usb_read_bulk_ep() which would take an additional ep argument of
type SANE_Byte). It wouldn't break any existing backend.
Would a change of that kind be accepted ? Or should I use libusb directly ?

Thanks in advance.
---
Hugo Grostabussiat