Thomas Soumarmon wrote: >Thanks to Martijn van Oosterhout, an alpha version of the SANE backend for >HP5400 scanners is available for download at >http://sourceforge.net/projects/hp5400backend > >As it is alpha code, it is buggy and of interest only for development >purposes. > >Feel free to test it and submit bug fixes, improvements.... > Did you know that sane (since version 1.0.9 or so) has its own USB interface?
Using the sane usb functions should make the backend more platform independent (since it can choose to use libusb, the linux 'scanner' module and perhaps in the future even a bsd 'uscanner' module). These functions are specified in the header file sanei_usb.h You could for example add another file (say hp5400_saneiusb.c) that implements the exact same functions as hp5400_scanner.c, but using the functions from sanei_usb instead of reading/writing to the device files of the 'scanner' module. For the standalone tool you would still link hp5400_scanner.o and for the sane backend you would link hp5400_saneiusb.o In that case it would also be a good idea to move all functions that are not strictly related to data transport to one of the other source files. Kind regards, Bertrik
