kopia lustrzana https://gitlab.com/sane-project/backends
basic XPA support for HP3670
rodzic
b8a7f1ec2f
commit
5fdad99f95
|
@ -1079,6 +1079,7 @@ static Genesys_Model hp3670c_model = {
|
|||
MOTOR_HP3670,
|
||||
GENESYS_FLAG_LAZY_INIT
|
||||
| GENESYS_FLAG_14BIT_GAMMA
|
||||
| GENESYS_FLAG_XPA
|
||||
| GENESYS_FLAG_DARK_CALIBRATION
|
||||
| GENESYS_FLAG_OFFSET_CALIBRATION
|
||||
| GENESYS_FLAG_SKIP_WARMUP
|
||||
|
|
|
@ -859,6 +859,13 @@ gl646_setup_registers (Genesys_Device * dev,
|
|||
/* regs[reg_0x03].value |= REG03_AVEENB; */
|
||||
regs[reg_0x03].value &= ~REG03_LAMPDOG;
|
||||
|
||||
/* select XPA */
|
||||
regs[reg_0x03].value &= ~REG03_XPASEL;
|
||||
if(scan_settings.scan_method == SCAN_METHOD_TRANSPARENCY)
|
||||
{
|
||||
regs[reg_0x03].value |= REG03_XPASEL;
|
||||
}
|
||||
|
||||
/* R04 */
|
||||
if (depth > 8)
|
||||
{
|
||||
|
@ -4960,6 +4967,29 @@ gl646_update_hardware_sensors (Genesys_Scanner * session)
|
|||
}
|
||||
}
|
||||
|
||||
/* XPA detection */
|
||||
if (dev->model->flags & GENESYS_FLAG_XPA)
|
||||
{
|
||||
switch (dev->model->gpo_type)
|
||||
{
|
||||
case GPO_HP3670:
|
||||
/* test if XPA is plugged-in */
|
||||
if((value & 0x40)==0)
|
||||
{
|
||||
DBG (DBG_io, "gl646_update_hardware_sensors: enabling XPA\n");
|
||||
session->opt[OPT_SOURCE].cap &= ~SANE_CAP_INACTIVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG (DBG_io, "gl646_update_hardware_sensors: disabling XPA\n");
|
||||
session->opt[OPT_SOURCE].cap |= SANE_CAP_INACTIVE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return SANE_STATUS_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
#define GENESYS_FLAG_UNTESTED (1 << 0) /* Print a warning for these scanners */
|
||||
#define GENESYS_FLAG_14BIT_GAMMA (1 << 1) /* use 14bit Gamma table instead of 12 */
|
||||
#define GENESYS_FLAG_LAZY_INIT (1 << 2) /* skip extensive ASIC test at init */
|
||||
/*#define GENESYS_FLAG_UNUSED (1 << 3) */
|
||||
#define GENESYS_FLAG_XPA (1 << 3)
|
||||
#define GENESYS_FLAG_SKIP_WARMUP (1 << 4) /* skip genesys_warmup() */
|
||||
#define GENESYS_FLAG_OFFSET_CALIBRATION (1 << 5) /* do offset calibration */
|
||||
#define GENESYS_FLAG_SEARCH_START (1 << 6) /* do start search beofre scanning */
|
||||
|
|
Ładowanie…
Reference in New Issue