--UFHRwCdBEJvubb2X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable
On Fri, Jun 27, 2003 at 02:31:03AM +0100, Celso Pinto wrote: > Hi all, >=20 > finally I had some time to get into the research/development of a driver > for HP 2300C scanner. >=20 > Because I have no experience in development for Linux/SANE drivers, I > was wondering if there's some kind of HOWTO or a quick crash course for > developing scanner drivers. I downloaded a couple of other projects but > they fail as a tutorial because there isn't much "green code" (source > comments) on them and i'm having a really hard time trying to figure out > what those lines of code are supposed to do.=20 Well, I basically pulled up the driver for one of the other HP scanners. I pinched the code (with acknowledgements of course) that read the config file, accessed the USB device and implemented the SANE API. That meant I only had to write code to implement the actual protocol. Initially you'll have lots of constants as you try to replicate the various protocol elrement. I suggest working as a standalone program until you at least pull down a preview image. That saves you the hassle of dealing with the SANE interface until you actually have image to show. > Also, I noticed all projects use C instead of C++. Is there a major > reason for this? Until recently the C++ compilers have been slightly flakey. Straight C tends to be more portable too. Historical accident mostly. Good luck! Hope this helps, --=20 Martijn van Oosterhout <klep...@svana.org> http://svana.org/kleptog/ > "the West won the world not by the superiority of its ideas or values or > religion but rather by its superiority in applying organized violence. > Westerners often forget this fact, non-Westerners never do." > - Samuel P. Huntington --UFHRwCdBEJvubb2X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE++6ZuY5Twig3Ge+YRAieYAJoCqmGL5+2PChjh8NFftjVqqcvdOQCghk8n ekJmCrS3u0Yzi58v9A38NVQ= =iQOv -----END PGP SIGNATURE----- --UFHRwCdBEJvubb2X--