[sane-devel] LiDE 90
Pierre Willenbrock
pierre at pirsoft.dnsalias.org
Wed Aug 20 14:29:23 UTC 2008
Hi Guillaume,
Guillaume Gastebois schrieb:
> Hello,
>
> I'm back with my LiDE 90 !
>
> I see in my windows logs the following sequence for gpios (reg 0x6C) :
> 02
> 12
> 0e
> 1a
> 0a
> 0e/3e (3e for half ccd log) (seems to be scanning moment)
> 0e
> 0a
> 0e/3e (3e for half ccd log)
> 02
>
> With tests I identifies GPIO11 as home switch (with 1 scanner doesn't
> see home position any more) and GPIO14 as half CCD.
> But it doesn't seems to be so simple. Why windows driver plays with home switch ?
The home switch is of the photoelectric variety most of the time, so
switching it off saves a few milli Amperes.
> Why did I have half image with GPIO13/14 to 0 ?
That question cannot be answered without knowledge of the actual
electrical connections. I'd just accept the fact that GPIO13/14 needs to
be switched together.
> Subsidiary question : where in the code to play to modify default 0x6C register
> value before calibration, before scanning and after scanning ?
The genesys_gl841-part unifies the setup for calibration scans and
regular scans. The mid level functions get a set of parameters
describing what, where and how to scan, and setup everything for that.
Those functions are: gl841_init_motor_regs_off, gl841_init_motor_regs,
gl841_init_motor_regs_scan for the motor control part,
gl841_init_optical_regs_off, gl841_init_optical_regs_scan for the
optical control part. gl841_init_scan_regs and gl841_feed pose as
frontends for these functions.
Before scanning, each of the mid level functions sets the bits that
control parts of the scanner relating to the given function. For
example, gl841_init_optical_regs_scan sets the bits needed for half-ccd
mode, while gl841_init_motor_regs_scan will be responsible to setup a
given motor power mode.
If you really need to do things differently for calibration and regular
scanning(which i doubt), you need to look at
gl841_init_regs_for_coarse_calibration, gl841_init_regs_for_shading,
gl841_init_regs_for_scan, gl841_offset_calibration,
gl841_coarse_gain_calibration, gl841_led_calibration. IIRC the init_regs
functions are called before the actual action is done, and the resulting
register set is directly written to the scanner. The actual calibration
happens in the other functions, using or not using the previously setup
registers. All of these call gl841_init_scan_regs and gl841_feed to get
their work done, but the register set can be modified after that call.
The initial bit-fiddling (if needed) happens in gl841_init_registers,
starting off from the values stored in genesys_devices.c:
static Genesys_Gpo Gpo[].
> Regards
> Guillaume
Regards,
Pierre
More information about the sane-devel
mailing list