LiDE 700F WIP 04

- only reordering must be fixed every thing else is working
merge-requests/1/head
Stphane Voltz 2012-05-24 22:05:23 +02:00
rodzic 42713d584d
commit a3de8f3e4f
4 zmienionych plików z 24 dodań i 28 usunięć

Wyświetl plik

@ -5219,6 +5219,14 @@ Problems with the first approach:
dev->total_bytes_read += *len;
RIE (sanei_genesys_buffer_consume (src_buffer, bytes));
/* end scan if all needed data have been read */
/* TODO extend this to other ASICs */
if((dev->model->asic_type == GENESYS_GL847)
&&(dev->total_bytes_read >= dev->total_bytes_to_read))
{
dev->model->cmd_set->end_scan (dev, dev->reg, SANE_TRUE);
}
DBG (DBG_proc, "genesys_read_ordered_data: completed, %lu bytes read\n",
(u_long) bytes);

Wyświetl plik

@ -1441,7 +1441,6 @@ static Genesys_Model canon_lide_100_model = {
/* Which flags are needed for this scanner? */
GENESYS_FLAG_SKIP_WARMUP
| GENESYS_FLAG_SIS_SENSOR
| GENESYS_FLAG_MUST_WAIT
| GENESYS_FLAG_DARK_CALIBRATION
| GENESYS_FLAG_SHADING_REPARK
| GENESYS_FLAG_OFFSET_CALIBRATION
@ -1615,8 +1614,8 @@ static Genesys_Model canon_lide_700f_model = {
GENESYS_GL847,
NULL,
{2400, 1200, 600, 400, 300, 200, 150, 100, 75, 0}, /* possible x-resolutions */
{2400, 1200, 600, 400, 300, 200, 150, 100, 75, 0}, /* possible y-resolutions */
{2400, 1200, 600, 300, 200, 150, 100, 75, 0}, /* possible x-resolutions */
{2400, 1200, 600, 300, 200, 150, 100, 75, 0}, /* possible y-resolutions */
{16, 8, 0}, /* possible depths in gray mode */
{16, 8, 0}, /* possible depths in color mode */
@ -1651,7 +1650,7 @@ static Genesys_Model canon_lide_700f_model = {
GPO_CANONLIDE700,
MOTOR_CANONLIDE700,
GENESYS_FLAG_SKIP_WARMUP
/*| GENESYS_FLAG_MUST_WAIT*/
| GENESYS_FLAG_MUST_WAIT
| GENESYS_FLAG_SIS_SENSOR
| GENESYS_FLAG_OFFSET_CALIBRATION
| GENESYS_FLAG_DARK_CALIBRATION

Wyświetl plik

@ -561,7 +561,6 @@ gl847_init_registers (Genesys_Device * dev)
/* NOTE: autoconf is a non working option */
SETREG (0x87, 0x02);
SETREG (0x9d, 0x00); /* 1x multiplier instead of 8x */
SETREG (0x9d, 0x06);
SETREG (0xa2, 0x0f);
SETREG (0xbd, 0x18);
@ -1889,15 +1888,9 @@ gl847_stop_action (Genesys_Device * dev)
DBGSTART;
/* post scan gpio */
/* post scan gpio : without that HOMSNR is unreliable */
gl847_homsnr_gpio(dev);
status = sanei_genesys_get_status (dev, &val);
if (DBG_LEVEL >= DBG_io)
{
sanei_genesys_print_status (val);
}
status = sanei_genesys_read_register (dev, REG40, &val40);
if (status != SANE_STATUS_GOOD)
{
@ -2132,11 +2125,9 @@ gl847_slow_back_home (Genesys_Device * dev, SANE_Bool wait_until_home)
/* clear scan and feed count */
RIE (sanei_genesys_write_register (dev, REG0D, REG0D_CLRLNCNT | REG0D_CLRMCNT));
/* set up for reverse AND scan */
/* set up for reverse */
r = sanei_genesys_get_address (local_reg, REG02);
r->value |= REG02_MTRREV;
r = sanei_genesys_get_address (local_reg, REG01);
r->value &= ~REG01_SCAN;
RIE (gl847_bulk_write_register (dev, local_reg, GENESYS_GL847_MAX_REGS));
@ -2404,22 +2395,15 @@ gl847_feed (Genesys_Device * dev, unsigned int steps)
SCAN_FLAG_DISABLE_GAMMA |
SCAN_FLAG_FEEDING |
SCAN_FLAG_IGNORE_LINE_DISTANCE);
sanei_genesys_set_triple(local_reg,REG_EXPR,0);
sanei_genesys_set_triple(local_reg,REG_EXPG,0);
sanei_genesys_set_triple(local_reg,REG_EXPB,0);
/* clear scan and feed count */
RIE (sanei_genesys_write_register (dev, REG0D, REG0D_CLRLNCNT));
RIE (sanei_genesys_write_register (dev, REG0D, REG0D_CLRMCNT));
/* set up for no scan */
r = sanei_genesys_get_address (local_reg, REG01);
r->value &= ~REG01_SCAN;
/* send registers */
RIE (gl847_bulk_write_register (dev, local_reg, GENESYS_GL847_MAX_REGS));
status = gl847_start_action (dev);
status = gl847_begin_scan (dev, local_reg,SANE_TRUE);
if (status != SANE_STATUS_GOOD)
{
DBG (DBG_error, "%s: failed to start motor: %s\n", __FUNCTION__, sane_strstatus (status));
@ -2429,6 +2413,10 @@ gl847_feed (Genesys_Device * dev, unsigned int steps)
gl847_bulk_write_register (dev, dev->reg, GENESYS_GL847_MAX_REGS);
return status;
}
/* set up for no scan */
r = sanei_genesys_get_address (local_reg, REG01);
r->value &= ~REG01_SCAN;
/* wait until feed count reaches the required value, but do not
* exceed 30s */
@ -2471,7 +2459,7 @@ gl847_init_regs_for_shading (Genesys_Device * dev)
dev->calib_resolution,
dev->calib_resolution,
0,
90,
0,
dev->calib_pixels,
dev->calib_lines,
16,

Wyświetl plik

@ -188,6 +188,7 @@
#define REG1E_LINESEL 0x0f
#define REG1ES_LINESEL 0
#define REG24 0x1c
#define REG40 0x40
#define REG40_CHKVER 0x10
#define REG40_HISPDFLG 0x04
@ -310,7 +311,7 @@
#define REG_MAXWD 0x35
#define REG_LPERIOD 0x38
#define REG_FEEDL 0x3d
#define REG_FMOVDEC 0x5e
#define REG_FMOVDEC 0x5f
#define REG_FSHDEC 0x69
#define REG_FMOVNO 0x6a
#define REG_CK1MAP 0x74
@ -672,9 +673,9 @@ static Motor_Profile gl847_motors[]={
{MOTOR_CANONLIDE200, 10416, EIGHTH_STEP , lide200_high},
/* LiDE 700F */
{MOTOR_CANONLIDE700, 2848, FULL_STEP , lide200_base},
{MOTOR_CANONLIDE700, 1424, FULL_STEP , lide200_base},
{MOTOR_CANONLIDE700, 752, FULL_STEP , lide200_base},
{MOTOR_CANONLIDE700, 2848, HALF_STEP , lide200_base},
{MOTOR_CANONLIDE700, 1424, HALF_STEP , lide200_base},
{MOTOR_CANONLIDE700, 752, HALF_STEP , lide200_base},
{MOTOR_CANONLIDE700, 2836, HALF_STEP , lide700_medium}, /* 2696 */
{MOTOR_CANONLIDE700, 10576, EIGHTH_STEP, lide700_high},