[sane-devel] LM983x driver - patch for HP Scanjet 2200c

Stefan Nilsen stefan.nilsen@telia.com
Thu, 13 Dec 2001 01:07:48 +0100


Hi.

Here is a patch for backend/plustek-devs.c that corrects memory size and 
motor fullsteps/inch setting. Using this I can make much better scans in 
xscanimage (only scanprog i have tested).

diff -br -u sane-backends-1.0.6/backend/plustek-devs.c 
sane-backends-1.0.6-sj22/backend/plustek-devs.c
--- sane-backends-1.0.6/backend/plustek-devs.c	Fri Dec  7 19:48:31 2001
+++ sane-backends-1.0.6-sj22/backend/plustek-devs.c	Thu Dec 13 00:51:00 2001
@@ -961,31 +961,47 @@
 /* HP 2200C */
 static HWDef Hw0x03F0_0x0605 =
 {
-	1.5, 1.4,	
-	9, 9,		
-	600,	
-	2048,	
-	4, 5,		
-	3000, 4095,	
-	0x02, 0x04, 0x37, 0x13,	
+	1.5,	/* dMaxMotorSpeed (Max_Speed)               */
+	1.2,	/* dMaxMoveSpeed (Max_Speed)                */
+	9,	/* wIntegrationTimeLowLamp                  */
+	9,	/* wIntegrationTimeHighLamp                 */
+	600,	/* ok wMotorDpi (Full step DPI)             */
+	512,	/* wRAMSize (KB)                            */
+	4,	/* wMinIntegrationTimeLowres (ms)           */
+	5,	/* wMinIntegrationTimeHighres (ms)          */
+	3000,	/* wGreenPWMDutyCycleLow                    */
+	4095,	/* wGreenPWMDutyCycleHigh                   */
+	0x02,	/* bSensorConfiguration (0x0b)              */
+	0x04,	/* bReg_0x0c                                */
+	0x37,	/* bReg_0x0d                                */
+	0x13,	/* bReg_0x0e                                */
+    /* bReg_0x0f_Mono [10]	(0x0f to 0x18)              */
 	{2, 7, 0, 1, 0, 0, 0, 0, 4, 0},		
+    /* bReg_0x0f_Color [10]	(0x0f to 0x18)              */
 	{5, 23, 1, 3, 0, 0, 0, 12, 10, 22},	
-	1,		
-	14,		
-	62,		
-	110,	
-	5400,	
-    3,		
-	0,		
-	0xa8,	
-	0,		
-	0xff,	
-	64,		
-	20,		
-	0x0d, 0x22, 0x82, 0x88,	
-	0, 0, 0,		
-	SANE_FALSE,	
-	MODEL_KaoHsiung	
+	1,	/* StepperPhaseCorrection (0x1a & 0x1b)     */
+	14,	/* 15,	bOpticBlackStart (0x1c)             */
+	62,	/* 60,	bOpticBlackEnd (0x1d)               */
+	110,	/* 65,	wActivePixelsStart (0x1e & 0x1f)    */
+	5400,	/* 5384 ,wLineEnd	(0x20 & 0x21)       */
+
+	/* Misc                                             */
+	3,	/* bReg_0x45                                */
+	0,	/* wStepsAfterPaperSensor2 (0x4c & 0x4d)    */
+	0xa8,	/* 0xfc -bReg_0x51                          */
+	0,	/* bReg_0x54                                */
+	0xff,	/* 0xa3 - bReg_0x55                         */
+	64,	/* bReg_0x56                                */
+	20,	/* bReg_0x57                                */
+	0x0d,	/* bReg_0x58                                */
+	0x22,	/* bReg_0x59                                */
+	0x82,	/* bReg_0x5a                                */
+	0x88,	/* bReg_0x5b                                */
+	0,	/* bReg_0x5c                                */
+	0,	/* bReg_0x5d                                */
+	0,	/* bReg_0x5e                                */
+	SANE_FALSE, /* fLM9831                              */
+	MODEL_KaoHsiung	/* ScannerModel                     */
 };
 
 /* Mustek BearPaw 1200 */