[sane-devel] genesys GL841

svoltz@wanadoo.fr svoltz@wanadoo.fr
Mon, 2 May 2005 08:12:28 +0200

On Fri, Apr 29, 2005 at 08:51:29AM +0200, Gerhard Jaeger wrote:
> On Wednesday 27 April 2005 20:50, Philipp Schmid wrote:
> Hi Philipp,
> good work so far. My suggestion for making the genesys backend GL841
> aware is to identifiy functions, which needs to be changed so that they
> will work with the GL841 too. Then these functions needs to be rewritten
> AND will occure two times in the backend. The reference to these functions
> will be done by pointers, which will be set in the device-specific structure.
> A similar approach has been done in the gt68xx backend.
> Ciao,
> Gerhard
> -- 


	since the register set are differently sized, and there are quite
numerous differences, I believe that almost every function that uses them
will have to be duplicated.

	So the outline could be to put common stuff in genesys.c, keeping
genesys_devices.c . Add a flag/field to tell if the scanner is using a gl646
or a gl841. Create a gl646_low.c and a gl841_low.c which will hold the
specific functions, and supersede the current genesys_low.c. Higher level
functions will call glXXX_funct() based on the scanner type.

	If everyone is OK with this, I feel like doing it this week-end. For a
start, gl841 functions would be a copy of gl646 functions.