DescriptionAdd function to set USB endpoints to use
Added
void sanei_usb_set_endpoint (SANE_Int dn, SANE_Int ep_type, SANE_Int ep);
This function allows the user to set the endpoint to use on the given device for the given endpoint type (e.g. bulk in). Some scanners have multiple bulk in/out endpoints but use only one for communication (not the one detected during auto-detection), so one call to the new function will change the used endpoint.
Some scanners use two different endpoint for different purposes, so in that case each read/write call needs to be preceeded by a call to that function to set the proper endpoint.
ep_type is a bitmask and is usually of the form
(USB_DIR_IN|USB_ENDPOINT_TYPE_BULK)
Patch Set 1 #Patch Set 2 : Added callback function for sanei_usb_open to override auto-detected endpoints #Patch Set 3 : Started from scratch, add one function to set the ep for a given type; nothing else is really needed #Patch Set 4 : Minor fix: use hex for endpoints in debug output # |