about to reach first light state

- fe is set
- slope tables are written (but not table 2)
- compile warnings are fixed
merge-requests/1/head
Stphane Voltz 2010-07-30 06:47:01 +02:00
rodzic 69aec86537
commit 084efdb37c
6 zmienionych plików z 663 dodań i 737 usunięć

Wyświetl plik

@ -717,6 +717,7 @@ sanei_genesys_get_address (Genesys_Register_Set * regs, SANE_Byte addr)
if (regs[i].address == addr)
return &regs[i];
}
DBG (DBG_error, "sanei_genesys_get_address: failed to find address for register %d, crash expected !\n",addr);
return NULL;
}
@ -7025,7 +7026,8 @@ sane_close (SANE_Handle handle)
/* we need this to avoid ASIC getting stuck
* in bulk writes */
if(s->dev->model->asic_type==GENESYS_GL847)
if(s->dev->model->asic_type==GENESYS_GL847
||s->dev->model->asic_type==GENESYS_GL843)
sanei_usb_reset (s->dev->dn);
sanei_usb_close (s->dev->dn);

Wyświetl plik

@ -83,3 +83,6 @@ usb 0x04a7 0x04ac
# Panasonic KV-SS080
usb 0x04da 0x100f
# Hewlett Packard ScanJet G4050
usb 0x03f0 0x4605

Wyświetl plik

@ -146,13 +146,38 @@ static Genesys_Frontend Wolfson[] = {
, {0x00, 0x00, 0x00}
}
, /* KVSS080 */
{DAC_KVSS080,{0x00, 0x03, 0x05, 0x12}
, {0x00, 0x00, 0x00}
, {0xb8, 0xb8, 0xb8}
, {0x04, 0x04, 0x04}
{DAC_KVSS080,
{0x00, 0x23, 0x24, 0x0f}
, {0x00, 0x00, 0x00}
, {0x80, 0x80, 0x80}
, {0x4b, 0x4b, 0x4b}
, {0x00,0x00,0x00}
}
,
{DAC_G4050,
{0x00, 0x23, 0x24, 0x1f}
, {0x00, 0x00, 0x00}
, {0x45, 0x45, 0x45}
, {0x4b, 0x4b, 0x4b}
, {0x00,0x00,0x00}
}
/*
uint8_t reg[4];
uint8_t sign[3];
uint8_t offset[3]; 0x28-0x2a
uint8_t gain[3]; 0x20-0x22
uint8_t reg2[3];
genesys_fe_write_data(0x01,0x0023)
genesys_fe_write_data(0x02,0x0024)
genesys_fe_write_data(0x03,0x001f)
genesys_fe_write_data(0x20,0x0045)
genesys_fe_write_data(0x21,0x0045)
genesys_fe_write_data(0x22,0x0045)
genesys_fe_write_data(0x28,0x004b)
genesys_fe_write_data(0x29,0x004b)
genesys_fe_write_data(0x2a,0x004b)
*/
,
};
@ -476,6 +501,23 @@ static Genesys_Sensor Sensor[] = {
1.0, 1.0, 1.0,
NULL, NULL, NULL}
,
{CCD_G4050,
4800,
48,
85,
152,
5416,
210,
230,
{0x02, 0x00, 0x06, 0x04} ,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x08, 0x20, 0x2a, 0x00, 0x00,
0x0c, 0x03}
,
{0x0f, 0x13, 0x17, 0x03, 0x07, 0x0b, 0x83, 0x00, 0xc1, 0x00, 0x00, 0x00,
0x00} ,
1.0, 1.0, 1.0,
NULL, NULL, NULL}
,
};
@ -588,6 +630,11 @@ static Genesys_Gpo Gpo[] = {
{0x51, 0x20} ,
}
,
{GPO_G4050,
{0x11, 0x00} ,
{0x51, 0x20} ,
}
,
};
static Genesys_Motor Motor[] = {
@ -839,18 +886,24 @@ static Genesys_Motor Motor[] = {
2400,
1,
1,
{{{
3500,
1300,
60,
0.8,
},
{
3500,
1400,
60,
0.8,
},},},
{ /* motor slopes */
{ /* power mode 0 */
{ 3500, 1300, 60, 0.8 },
{ 3500, 1400, 60, 0.8 },
},
},
},
{MOTOR_G4050,
1200,
2400,
1,
1,
{ /* motor slopes */
{ /* power mode 0 */
{ 3500, 1300, 60, 0.8 },
{ 3500, 1400, 60, 0.8 },
},
},
},
};
@ -969,6 +1022,59 @@ static Genesys_Model panasonic_kvss080_model = {
NULL,
{ 600, 300, 150, 75, 0}, /* possible x-resolutions */
{ 600, 300, 150, 75, 0}, /* possible y-resolutions */
{16, 8, 0}, /* possible depths in gray mode */
{16, 8, 0}, /* possible depths in color mode */
SANE_FIX (0.42), /* Start of scan area in mm (x) */
SANE_FIX (7.9), /* Start of scan area in mm (y) */
SANE_FIX (218.0), /* Size of scan area in mm (x) */
SANE_FIX (299.0), /* Size of scan area in mm (y) */
SANE_FIX (3.0), /* Start of white strip in mm (y) */
SANE_FIX (0.0), /* Start of black mark in mm (x) */
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (x) */
SANE_FIX (0.0), /* Start of scan area in TA mode in mm (y) */
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (x) */
SANE_FIX (100.0), /* Size of scan area in TA mode in mm (y) */
SANE_FIX (0.0), /* Start of white strip in TA mode in mm (y) */
SANE_FIX (0.0), /* Size of scan area after paper sensor stops
sensing document in mm */
SANE_FIX (0.0), /* Amount of feeding needed to eject document
after finishing scanning in mm */
0, 4, 8, /* RGB CCD Line-distance correction in pixel */
COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */
SANE_FALSE, /* Is this a CIS scanner? */
SANE_FALSE, /* Is this a sheetfed scanner? */
CCD_KVSS080,
DAC_KVSS080,
GPO_KVSS080,
MOTOR_KVSS080,
GENESYS_FLAG_LAZY_INIT | /* Which flags are needed for this scanner? */
GENESYS_FLAG_SKIP_WARMUP |
GENESYS_FLAG_OFFSET_CALIBRATION |
GENESYS_FLAG_DARK_WHITE_CALIBRATION |
GENESYS_FLAG_CUSTOM_GAMMA |
GENESYS_FLAG_ODD_EVEN_CIS,
GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_COPY_SW,
280,
400
};
static Genesys_Model hpg4050_model = {
"hewlett-packard-scanjet-g4050", /* Name */
"Hewlett Packard", /* Device vendor string */
"ScanJet G4050", /* Device model name */
GENESYS_GL843,
NULL,
{ 1200, 600, 300, 150, 75, 0}, /* possible x-resolutions */
{ 1200, 600, 300, 150, 75, 0}, /* possible y-resolutions */
{16, 8, 0}, /* possible depths in gray mode */
{16, 8, 0}, /* possible depths in color mode */
@ -997,19 +1103,17 @@ static Genesys_Model panasonic_kvss080_model = {
COLOR_ORDER_RGB, /* Order of the CCD/CIS colors */
SANE_TRUE, /* Is this a CIS scanner? */
SANE_FALSE, /* Is this a CIS scanner? */
SANE_FALSE, /* Is this a sheetfed scanner? */
CCD_KVSS080,
DAC_KVSS080,
GPO_KVSS080,
MOTOR_KVSS080,
CCD_G4050,
DAC_G4050,
GPO_G4050,
MOTOR_G4050,
GENESYS_FLAG_LAZY_INIT | /* Which flags are needed for this scanner? */
GENESYS_FLAG_SKIP_WARMUP |
GENESYS_FLAG_OFFSET_CALIBRATION |
GENESYS_FLAG_DARK_WHITE_CALIBRATION |
GENESYS_FLAG_CUSTOM_GAMMA |
GENESYS_FLAG_ODD_EVEN_CIS,
GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_EMAIL_SW | GENESYS_HAS_COPY_SW,
GENESYS_FLAG_NO_CALIBRATION |
GENESYS_FLAG_CUSTOM_GAMMA,
GENESYS_HAS_SCAN_SW | GENESYS_HAS_FILE_SW | GENESYS_HAS_COPY_SW,
280,
400
};
@ -2265,5 +2369,6 @@ static Genesys_USB_Device_Entry genesys_usb_device_list[] = {
{0x04a9, 0x1906, &canon_5600f_model},
/* GL843 devices */
{0x04da, 0x100f, &panasonic_kvss080_model},
{0x03f0, 0x4605, &hpg4050_model},
{0, 0, NULL}
};

1155
backend/genesys_gl843.c 100644 → 100755

Plik diff jest za duży Load Diff

76
backend/genesys_gl843.h 100644 → 100755
Wyświetl plik

@ -201,6 +201,7 @@
#define REG1DS_TGSHLD 0
#define REG1E 0x1e
#define REG1E_WDTIME 0xf0
#define REG1ES_WDTIME 4
#define REG1E_LINESEL 0x0f
@ -362,6 +363,10 @@ enum
reg_0x25,
reg_0x26,
reg_0x27,
reg_0x28,
reg_0x29,
reg_0x2a,
reg_0x2b,
reg_0x2c,
reg_0x2d,
reg_0x2e,
@ -378,6 +383,7 @@ enum
reg_0x39,
reg_0x3a,
reg_0x3b,
reg_0x3c,
reg_0x3d,
reg_0x3e,
reg_0x3f,
@ -391,6 +397,9 @@ enum
reg_0x58,
reg_0x59,
reg_0x5a,
reg_0x5b,
reg_0x5c,
reg_0x5d,
reg_0x5e,
reg_0x5f,
reg_0x60,
@ -408,6 +417,10 @@ enum
reg_0x6d,
reg_0x6e,
reg_0x6f,
reg_0x70,
reg_0x71,
reg_0x72,
reg_0x73,
reg_0x74,
reg_0x75,
reg_0x76,
@ -418,8 +431,38 @@ enum
reg_0x7b,
reg_0x7c,
reg_0x7d,
reg_0x7e,
reg_0x7f,
reg_0x80,
reg_0x81,
reg_0x82,
reg_0x83,
reg_0x84,
reg_0x87,
reg_0x88,
reg_0x89,
reg_0x8a,
reg_0x8b,
reg_0x8c,
reg_0x8d,
reg_0x8e,
reg_0x8f,
reg_0x90,
reg_0x91,
reg_0x92,
reg_0x93,
reg_0x94,
reg_0x95,
reg_0x96,
reg_0x97,
reg_0x98,
reg_0x99,
reg_0x9a,
reg_0x9b,
reg_0x9c,
reg_0x9d,
reg_0xa0,
reg_0xa1,
reg_0xa2,
reg_0xa3,
reg_0xa4,
@ -428,35 +471,12 @@ enum
reg_0xa7,
reg_0xa8,
reg_0xa9,
reg_0xab,
reg_0xac,
reg_0xad,
reg_0xae,
reg_0xaf,
GENESYS_GL843_MAX_REGS
};
#define SETREG(adr,val) {dev->reg[reg_##adr].address=adr;dev->reg[reg_##adr].value=val;}
typedef struct
{
uint8_t rd0;
uint8_t rd1;
uint8_t rd2;
uint8_t re0;
uint8_t re1;
uint8_t re2;
uint8_t re3;
uint8_t re4;
uint8_t re5;
uint8_t re6;
uint8_t re7;
} Memory_layout;
static Memory_layout layouts[]={
/* LIDE 100 */
{
0x0a, 0x15, 0x20,
0x00, 0xac, 0x02, 0x55, 0x02, 0x56, 0x03, 0xff
},
/* LIDE 200 */
{
0x0a, 0x1f, 0x34,
0x01, 0x24, 0x02, 0x91, 0x02, 0x92, 0x03, 0xff
}
};

Wyświetl plik

@ -263,6 +263,7 @@ Genesys_Color_Order;
#define DAC_WOLFSON_DSM600 10
#define DAC_CANONLIDE200 11
#define DAC_KVSS080 12
#define DAC_G4050 13
#define CCD_UMAX 0
#define CCD_ST12 1 /* SONY ILX548: 5340 Pixel ??? */
@ -282,6 +283,7 @@ Genesys_Color_Order;
#define CIS_CANONLIDE200 15
#define CIS_CANONLIDE100 16
#define CCD_KVSS080 17
#define CCD_G4050 18
#define GPO_UMAX 0
#define GPO_ST12 1
@ -297,6 +299,7 @@ Genesys_Color_Order;
#define GPO_DP685 11
#define GPO_CANONLIDE200 12
#define GPO_KVSS080 13
#define GPO_G4050 14
#define MOTOR_UMAX 0
#define MOTOR_5345 1
@ -313,6 +316,7 @@ Genesys_Color_Order;
#define MOTOR_CANONLIDE200 13
#define MOTOR_CANONLIDE100 14
#define MOTOR_KVSS080 15
#define MOTOR_G4050 16
/* Forward typedefs */
@ -589,6 +593,7 @@ struct Genesys_Calibration_Cache
struct Genesys_Device
{
SANE_Int dn;
SANE_Bool usb_mode;
SANE_String file_name;
SANE_String calib_file;
Genesys_Model *model;