[sane-devel] Fwd: sanei_usb limitations
m. allan noah
kitno455 at gmail.com
Wed Jan 5 14:25:59 UTC 2011
On Tue, Jan 4, 2011 at 8:55 PM, Reinhold Kainhofer
<reinhold at kainhofer.com> wrote:
> New patch is now up at:
Looks good, except you forgot your copyright notice :)
> Actually, it is more convenient to change the default once during
> initialization and then don't have to care about passing the correct endpoint
> to each and every usb call.
> Anyway, since changing USB endpoints is rarely needed, I'm fine with adding
> just one function sanei_usb_set_endpoint, which sets the endpoint for a given
> If a backend needs to set a different endpoint for each call, then we might
> re-evaluate it. For now, every backend that needs to use two different
> endpoints of the same type needs to call sanei_usb_set_endpoint before each
> read/write call.
Sounds like the shortest solution.
>> > What do you have against bitmasks like (USB_DIR_IN |
>> > USB_ENDPOINT_TYPE_BULK)? Then we don't need any new constants...
>> where are USB_DIR_IN and USB_ENDPOINT_TYPE_BULK defined? :)
> include/sane/sanei_usb.h, lines 163 and 116.
It is funny to OR zeros, but it works :)
Add your copyright notice and I'll commit it.
"The truth is an offense, but not a sin"
More information about the sane-devel