Major bug-fix release...

merge-requests/1/head
Gerhard Jaeger 2003-05-15 17:19:32 +00:00
rodzic 5a5dd8adb0
commit d5f59d5603
19 zmienionych plików z 652 dodań i 557 usunięć

Wyświetl plik

@ -1,3 +1,17 @@
2003-05-15 Gerhard Jaeger <gerhard@gjaeger.de>
* TODO: status of UMAX 3450 is fixed now in .desc
* descriptions/plustek.desc: update
* doc/plustek/Plustek-USB-TODO.txt doc/plustek/Plustek-USB.txt
doc/plustek/Plustek.changes: update
* backend/plustek-devs.c backend/plustek-pp.c backend/plustek-usb.c
backend/plustek-usbhw.c backend/plustek-usbimg.c
backend/plustek-usbio.c backend/plustek-usbmap.c
backend/plustek-usbscan.c backend/plustek-usbshading.c
backend/plustek.c backend/plustek.h backend/plustek-share.h
backend/plustek-usb.h:
Major bugfix release, cancel should work now, calibration for
CIS devices is now fully functional
2003-05-15 Henning Meier-Geinitz <henning@meier-geinitz.de>
* doc/descriptions/unsupported.desc: Updates for Canon
@ -579,7 +593,7 @@
2003-03-03 Gerhard Jaeger <gerhard@gjaeger.de>
* doc/plustek/Plustek-USB-TODO.txt: update
* backend/plustek-devs.c backend/plustek-usb.c backend/plustek-usbhw.c
backend/plustek-usbimg.c backend/plustek-usbscan.c backend/plustek.c:
backend/plustek-usbimg.c backend/plustek-usbscan.c backend/plustek.c:
Fixed some bugs, that avoid proper function of Genius devices and
the HP2100c. Fixed also a problem, that causes permanent warmup cylces
on EPSON Photo devices.

3
TODO
Wyświetl plik

@ -1,4 +1,4 @@
TODO (2003-05-09)
TODO (2003-05-15)
******** todo ********
@ -167,6 +167,7 @@ misc
* In configure, print a list of backends that's build.
******** done ********
* plustek: check status of Umax 3450 USB scanner (same as 3400?)
* avision: mention that hpusbscsi is no longer necessary.
* avision: don't crash if there is no config file.
* hp5400: Use GPL + SANE addition license.

Wyświetl plik

@ -7,7 +7,7 @@
* @brief Here we have our USB device definitions.
*
* Based on sources acquired from Plustek Inc.<br>
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* - 0.40 - starting version of the USB support
@ -37,6 +37,7 @@
* - tweaked EPSON 1260 settings
* - removed EPSON 660 stuff
* - added Canon 1220U entry
* - added entry for Compaq S4-100
* .
* <hr>
* This file is part of the SANE package.
@ -587,16 +588,16 @@ static DCapsDef Cap0x1606_0x0060_0 =
*/
static DCapsDef Cap0x1606_0x0160_0 =
{
{{ 0, 165}, 0, -1, {2550, 3510 - 165}, {100, 100}, COLOR_BW },
{{ 0, 0}, 0, -1, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, -1, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, -1, {0, 0}, { 0, 0 }, 0 },
{{ 30, 165}, 0, -1, {2550, 3508}, {100, 100}, COLOR_BW },
{{ 0, 0}, 0, -1, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, -1, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, -1, {0, 0}, { 0, 0 }, 0 },
{1200, 1200},
0,
SENSORORDER_bgr,
12, /* sensor distance */
4, /* number of buttons */
kNEC8861, /* use default settings during calibration */
kNEC3778, /* use default settings during calibration */
0, /* not used here... */
_WAF_MISC_IO_LAMPS, /* use miscio 3 for lamp switching */
_MIO3
@ -606,7 +607,7 @@ static DCapsDef Cap0x1606_0x0160_0 =
*/
static DCapsDef Cap0x04A9_0x2206_0 =
{
{{ 0, 90}, 35, -1, {2550, 3508}, {75, 75}, COLOR_GRAY16 },
{{ 0, 90}, 35, 5, {2550, 3508}, {75, 75}, COLOR_GRAY16 },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
@ -617,14 +618,14 @@ static DCapsDef Cap0x04A9_0x2206_0 =
1, /* number of buttons */
kNEC8861, /* use default settings during calibration */
0, /* not used here... */
(_WAF_MISC_IO_LAMPS | _WAF_SKIP_WHITEFINE), _NO_MIO
_WAF_MISC_IO_LAMPS | _WAF_BLACKFINE, _NO_MIO
};
/* Canon N1220U
*/
static DCapsDef Cap0x04A9_0x2207_0 =
{
{{ 0, 85}, 35, -1, {2550, 3508}, {75, 75}, COLOR_BW },
{{ 0, 85}, 35, 5, {2550, 3508}, {75, 75}, COLOR_BW },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
@ -635,14 +636,14 @@ static DCapsDef Cap0x04A9_0x2207_0 =
1, /* number of buttons */
kNEC8861, /* use default settings during calibration */
0, /* not used here... */
(_WAF_MISC_IO_LAMPS | _WAF_SKIP_WHITEFINE), _NO_MIO
_WAF_MISC_IO_LAMPS | _WAF_BLACKFINE, _NO_MIO
};
/* Canon N670U/N676U/LiDE20
*/
static DCapsDef Cap0x04A9_0x220D_0 =
{
{{ 0, 100}, 35, -1, {2550, 3508}, {75, 75}, COLOR_GRAY16 },
{{ 0, 100}, 35, 5, {2550, 3508}, {75, 75}, COLOR_GRAY16 },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
@ -653,14 +654,14 @@ static DCapsDef Cap0x04A9_0x220D_0 =
3, /* number of buttons */
kNEC8861, /* use default settings during calibration */
0, /* not used here... */
(_WAF_MISC_IO_LAMPS | _WAF_SKIP_WHITEFINE), _NO_MIO
_WAF_MISC_IO_LAMPS | _WAF_BLACKFINE, _NO_MIO
};
/* Canon N1240U
*/
static DCapsDef Cap0x04A9_0x220E_0 =
{
{{ 0, 100}, 35, -1, {2550, 3508}, {75, 75}, COLOR_BW },
{{ 0, 100}, 35, 5, {2550, 3508}, {75, 75}, COLOR_BW },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
{{ 0, 0}, 0, 0, {0, 0}, { 0, 0 }, 0 },
@ -671,7 +672,7 @@ static DCapsDef Cap0x04A9_0x220E_0 =
3, /* number of buttons */
kNEC8861, /* use default settings during calibration */
0, /* not used here... */
(_WAF_MISC_IO_LAMPS | _WAF_SKIP_WHITEFINE), _NO_MIO
_WAF_MISC_IO_LAMPS | _WAF_BLACKFINE, _NO_MIO
};
/******************* additional Hardware descriptions ************************/
@ -1761,8 +1762,8 @@ static HWDef Hw0x1606_0x0060_0 =
/** Umax 5400 */
static HWDef Hw0x1606_0x0160_0 =
{
1.7, /* dMaxMotorSpeed (Max_Speed) */
0.8, /* dMaxMoveSpeed (Max_Speed) */
1.1, /* dMaxMotorSpeed (Max_Speed) */
0.9, /* dMaxMoveSpeed (Max_Speed) */
9, /* dIntegrationTimeLowLamp */
9, /* dIntegrationTimeHighLamp */
600, /* wMotorDpi (Full step DPI) */
@ -1819,8 +1820,8 @@ static HWDef Hw0x1606_0x0160_0 =
0, /* test mode ADC Output CODE MSB (reg 0x5c) */
0, /* test mode ADC Output CODE LSB (reg 0x5d) */
0, /* test mode (reg 0x5e) */
_LM9832, /* might be LM9831 on UMAX 3450! */
MODEL_UMAX
_LM9832,
MODEL_UMAX1200
};
/** Canon 650/656 */
@ -1862,8 +1863,6 @@ static HWDef Hw0x04A9_0x2206_0 =
89, /* ? wActivePixelsStart (reg 0x1e + 0x1f) */
6074, /* wLineEnd (reg 0x20 + 0x21) */
/* 0x17ba = 6074 bis 100dpi, 0x14ba = 5306 */
23, /* red lamp on (reg 0x2c + 0x2d) */
2416, /* red lamp off (reg 0x2e + 0x2f) */
23, /* green lamp on (reg 0x30 + 0x31) */
@ -1880,14 +1879,14 @@ static HWDef Hw0x04A9_0x2206_0 =
0x08, /* pwm freq (reg 0x56) */
0x1f, /* pwm duty cycle (reg 0x57) */
0x05, /* Paper sense (reg 0x58) */
0x05, /* Paper sense (reg 0x58) */
0x24, /* misc io12 (reg 0x59) */
0x96, /* misc io34 (reg 0x5a) */
0xb9, /* misc io56 (reg 0x5b) */
0x01, /* test mode ADC Output CODE MSB (reg 0x5c) */
0, /* test mode ADC Output CODE LSB (reg 0x5d) */
0, /* test mode (reg 0x5e) */
0x66, /* misc io12 (reg 0x59) */
0x16, /* misc io34 (reg 0x5a) */
0x91, /* misc io56 (reg 0x5b) */
0x01, /* test mode ADC Output CODE MSB (reg 0x5c) */
0, /* test mode ADC Output CODE LSB (reg 0x5d) */
0, /* test mode (reg 0x5e) */
_LM9832,
MODEL_CANON600
};
@ -1948,9 +1947,9 @@ static HWDef Hw0x04A9_0x2207_0 =
0x05, /* Paper sense (reg 0x58) */
0x44, /* misc io12 (reg 0x59) */
0x94, /* misc io34 (reg 0x5a) */
0x19, /* misc io56 (reg 0x5b) */
0x66, /* misc io12 (reg 0x59) */
0x16, /* misc io34 (reg 0x5a) */
0x91, /* misc io56 (reg 0x5b) */
0x01, /* test mode ADC Output CODE MSB (reg 0x5c) */
0, /* test mode ADC Output CODE LSB (reg 0x5d) */
0, /* test mode (reg 0x5e) */
@ -1989,7 +1988,9 @@ static HWDef Hw0x04A9_0x220D_0 =
2, /* bReg 0x29 illumination mode (runtime) */
{ 3, 0, 0, 23, 1800, 0, 0 },
{ 2, 23, 3562, 23, 3315, 23, 2676 },
/* { 2, 23, 3562, 23, 3315, 23, 2676 },
*/
{ 2, 23, 16383, 23, 16383, 23, 16383 },
1, /* StepperPhaseCorrection (reg 0x1a + 0x1b) */
0, /* bOpticBlackStart (reg 0x1c) */
@ -2017,9 +2018,9 @@ static HWDef Hw0x04A9_0x220D_0 =
0x04, /* Paper sense (reg 0x58) */
0x44, /* misc io12 (reg 0x59) */
0x94, /* misc io34 (reg 0x5a) */
0x19, /* misc io56 (reg 0x5b) */
0x66, /* misc io12 (reg 0x59) */
0x16, /* misc io34 (reg 0x5a) */
0x91, /* misc io56 (reg 0x5b) */
0x01, /* test mode ADC Output CODE MSB (reg 0x5c) */
0, /* test mode ADC Output CODE LSB (reg 0x5d) */
0, /* test mode (reg 0x5e) */
@ -2085,9 +2086,9 @@ static HWDef Hw0x04A9_0x220E_0 =
0x04, /* Paper sense (reg 0x58) */
0x44, /* misc io12 (reg 0x59) */
0x94, /* misc io34 (reg 0x5a) */
0x19, /* misc io56 (reg 0x5b) */
0x66, /* misc io12 (reg 0x59) */
0x16, /* misc io34 (reg 0x5a) */
0x91, /* misc io56 (reg 0x5b) */
0x01, /* test mode ADC Output CODE MSB (reg 0x5c) */
0, /* test mode ADC Output CODE LSB (reg 0x5d) */
0, /* test mode (reg 0x5e) */
@ -2152,7 +2153,10 @@ static SetDef Settings[] =
/* UMAX... */
{"0x1606-0x0060", &Cap0x1606_0x0060_0, &Hw0x1606_0x0060_0, "3400/3450" },
{"0x1606-0x0160", &Cap0x1606_0x0160_0, &Hw0x1606_0x0160_0, "5400" },
/* COMPAQ... */
{"0x049F-0x001A", &Cap0x1606_0x0060_0, &Hw0x1606_0x0060_0, "S4-100" },
/* CANON... */
{"0x04A9-0x2206", &Cap0x04A9_0x2206_0, &Hw0x04A9_0x2206_0, "N650U/N656U" },
{"0x04A9-0x2207", &Cap0x04A9_0x2207_0, &Hw0x04A9_0x2207_0, "N1220U" },
@ -2315,6 +2319,18 @@ static ClkMotorDef Motors[] = {
{ 10.5, 10.5, 10.5, 10.5, 10.5, 10.5, 10.5, 10.5, 10.5, 10.5 }
},
{ MODEL_UMAX1200, 16, 4, 6,
/* Motor settings (PWM and PWM_Duty) */
{{ 16, 4, 1 }, { 16, 4, 1 }, { 16, 4, 1 }, { 16, 4, 1 }, { 16, 4, 1 },
{ 16, 4, 1 }, { 16, 4, 1 }, { 16, 4, 1 }, { 16, 4, 1 }, { 16, 4, 1 }},
/* Color mode MCLK settings */
{ 3.0, 3.0, 3.0, 3.0, 3.0, 6.0, 6.0, 6.0, 6.0, 6.0 },
{ 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0 },
/* Gray mode MCLK settings */
{ 6.0, 6.0, 6.0, 6.0, 6.0, 13.0, 13.0, 13.0, 13.0, 13.0 },
{ 13.0, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0 }
},
/* settings good for the EPSON models (tested with 1260) */
{ MODEL_EPSON, 2, 1, 6,
/* Motor settings (PWM and PWM_Duty) */

Wyświetl plik

@ -7,7 +7,7 @@
* @brief The interface to the parport driver.
*
* Based on sources acquired from Plustek Inc.<br>
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* - 0.40 - initial version

Wyświetl plik

@ -6,7 +6,7 @@
/** @file plustek-share.h
* @brief Common definitions for the backend and the kernel driver
*
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* - 0.36 - initial version

Wyświetl plik

@ -7,7 +7,7 @@
* @brief The interface functions to the USB driver stuff.
*
* Based on sources acquired from Plustek Inc.<br>
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* - 0.40 - starting version of the USB support
@ -28,6 +28,10 @@
* - fixed bug that causes warmup each time autodetected<br>
* TPA on EPSON is used
* - removed Genius from PCB-Id check
* - added Compaq to the list
* - removed the scaler stuff for CIS devices
* - removed homeing stuff from readline function
* - fixed flag setting in usbDev_startScan()
* .
* <hr>
* This file is part of the SANE package.
@ -83,12 +87,12 @@ static TabDef usbVendors[] = {
{ 0x04B8, "Epson" },
{ 0x04A9, "Canon" },
{ 0x1606, "UMAX" },
{ 0x049F, "Compaq" },
{ 0xFFFF, NULL }
};
/** for autodetection */
SANE_Char USB_devname[1024];
static SANE_Char USB_devname[1024];
/** we use at least 8 megs for scanning... */
#define _SCANBUF_SIZE (8 * 1024 * 1024)
@ -182,12 +186,12 @@ static void usb_initDev( pPlustek_Device dev, int idx, int handle, int vendor )
u_char t;
usb_switchLampX ( dev, SANE_FALSE, SANE_TRUE );
usbio_WriteReg ( handle, 0x58, 0x1d );
usbio_WriteReg ( handle, 0x59, 0x49 );
usbio_ReadReg ( handle, 0x02, &t );
usbio_WriteReg ( handle, 0x58, dev->usbDev.HwSetting.bReg_0x58 );
usbio_WriteReg ( handle, 0x59, dev->usbDev.HwSetting.bReg_0x59 );
usb_switchLampX( dev, SANE_FALSE, SANE_TRUE );
usbio_WriteReg ( handle, 0x58, 0x1d );
usbio_WriteReg ( handle, 0x59, 0x49 );
usbio_ReadReg ( handle, 0x02, &t );
usbio_WriteReg ( handle, 0x58, dev->usbDev.HwSetting.bReg_0x58 );
usbio_WriteReg ( handle, 0x59, dev->usbDev.HwSetting.bReg_0x59 );
DBG( _DBG_INFO, "REG[0x02] = 0x%02x\n", t );
@ -219,6 +223,7 @@ static void usb_initDev( pPlustek_Device dev, int idx, int handle, int vendor )
dev->usbDev.currentLamp = usb_GetLampStatus( dev );
usb_ResetRegisters( dev );
usbio_ResetLM983x ( dev );
usb_IsScannerReady( dev );
@ -595,7 +600,6 @@ static int usbDev_open( const char *dev_name, void *misc )
}
/**
*
*/
static int usbDev_close( Plustek_Device *dev )
{
@ -605,8 +609,7 @@ static int usbDev_close( Plustek_Device *dev )
return 0;
}
/*.............................................................................
* convert the stuff
/** convert the stuff
*/
static int usbDev_getCaps( Plustek_Device *dev )
{
@ -705,7 +708,6 @@ static int usbDev_getCropInfo( Plustek_Device *dev, pCropInfo ci )
}
/**
*
*/
static int usbDev_setMap( Plustek_Device *dev, SANE_Word *map,
SANE_Word length, SANE_Word channel )
@ -741,12 +743,9 @@ static int usbDev_setMap( Plustek_Device *dev, SANE_Word *map,
}
/**
*
*/
static int usbDev_setScanEnv( Plustek_Device *dev, pScanInfo si )
{
pHWDef hw = &dev->usbDev.HwSetting;
DBG( _DBG_INFO, "usbDev_setScanEnv()\n" );
/* clear all the stuff */
@ -808,23 +807,7 @@ static int usbDev_setScanEnv( Plustek_Device *dev, pScanInfo si )
/* on CIS based devices we have to reconfigure the illumination
* settings for the gray modes
*/
if( hw->bReg_0x26 & _ONE_CH_COLOR ) {
if((dev->scanning.sParam.bDataType == SCANDATATYPE_Gray) ||
(dev->scanning.sParam.bDataType == SCANDATATYPE_BW)) {
hw->bReg_0x29 = hw->illu_mono.mode;
memcpy( &hw->red_lamp_on,
&hw->illu_mono.red_lamp_on, sizeof(u_short) * 6 );
} else {
hw->bReg_0x29 = hw->illu_color.mode;
memcpy( &hw->red_lamp_on,
&hw->illu_color.red_lamp_on, sizeof(u_short) * 6 );
}
}
usb_AdjustCISLampSettings( dev, SANE_TRUE );
if( dev->scanning.dwFlag & SCANFLAG_BottomUp)
dev->scanning.lBufAdjust = -(long)dev->scanning.dwBytesLine;
@ -890,7 +873,6 @@ static int usbDev_setScanEnv( Plustek_Device *dev, pScanInfo si )
}
/**
*
*/
static int usbDev_stopScan( Plustek_Device *dev, int *mode )
{
@ -912,7 +894,6 @@ static int usbDev_stopScan( Plustek_Device *dev, int *mode )
}
/**
*
*/
static int usbDev_startScan( Plustek_Device *dev, pStartScan start )
{
@ -951,6 +932,10 @@ static int usbDev_startScan( Plustek_Device *dev, pStartScan start )
start->dwBytesPerLine = scanning->dwBytesLine;
start->dwFlag = scanning->dwFlag;
m_fStart = m_fFirst = SANE_TRUE;
m_fAutoPark =
(scanning->dwFlag & SCANFLAG_StillModule)?SANE_FALSE:SANE_TRUE;
usb_StopLampTimer( dev );
return 0;
@ -959,7 +944,6 @@ static int usbDev_startScan( Plustek_Device *dev, pStartScan start )
return _E_ALLOC;
}
/**
* do the reading stuff here...
* first we perform the calibration step, and then we read the image
@ -968,7 +952,6 @@ static int usbDev_startScan( Plustek_Device *dev, pStartScan start )
static int usbDev_Prepare( struct Plustek_Device *dev, SANE_Byte *buf )
{
int result;
u_long scaler;
pScanDef scanning = &dev->scanning;
pDCapsDef scaps = &dev->usbDev.Caps;
pHWDef hw = &dev->usbDev.HwSetting;
@ -988,12 +971,6 @@ static int usbDev_Prepare( struct Plustek_Device *dev, SANE_Byte *buf )
DBG( _DBG_INFO, "calibration done.\n" );
scaler = 1;
if((hw->bReg_0x26 & _ONE_CH_COLOR) &&
(scanning->sParam.bDataType == SCANDATATYPE_Color)) {
scaler = 3;
}
if( !( scanning->dwFlag & SCANFLAG_Scanning )) {
usleep( 10 * 1000 );
@ -1020,9 +997,11 @@ static int usbDev_Prepare( struct Plustek_Device *dev, SANE_Byte *buf )
else
scanning->dwLinesScanBuf = 32;
/* gives faster feedback to the frontend ! */
scanning->dwLinesScanBuf = 2;
scanning->dwBytesScanBuf = scanning->dwLinesScanBuf *
scanning->sParam.Size.dwPhyBytes *
scaler;
scanning->sParam.Size.dwPhyBytes;
scanning->dwNumberOfScanBufs = _SCANBUF_SIZE /
scanning->dwBytesScanBuf;
@ -1030,9 +1009,12 @@ static int usbDev_Prepare( struct Plustek_Device *dev, SANE_Byte *buf )
scanning->dwLinesScanBuf;
scanning->pbScanBufEnd = scanning->pbScanBufBegin +
scanning->dwLinesPerScanBufs *
scanning->sParam.Size.dwPhyBytes *
scaler;
scanning->sParam.Size.dwPhyBytes;
scanning->dwRedShift = 0;
scanning->dwBlueShift = 0;
scanning->dwGreenShift = 0;
/* CCD scanner */
if( scanning->sParam.bChannels == 3 ) {
scanning->dwLinesDiscard = (u_long)scaps->bSensorDistance *
@ -1125,14 +1107,14 @@ static int usbDev_Prepare( struct Plustek_Device *dev, SANE_Byte *buf )
scanning->dwLinesDiscard = 0;
scanning->Green.pb = scanning->pbScanBufBegin;
if(( scanning->sParam.bDataType == SCANDATATYPE_Color ) &&
if(( scanning->sParam.bDataType == SCANDATATYPE_Color ) &&
( hw->bReg_0x26 & _ONE_CH_COLOR )) {
u_long len = scanning->sParam.Size.dwPhyBytes / 3;
scanning->Red.pb = scanning->pbScanBufBegin;
scanning->Green.pb = scanning->pbScanBufBegin +
(scanning->sParam.Size.dwPhyBytes );
scanning->Blue.pb = scanning->pbScanBufBegin +
(scanning->sParam.Size.dwPhyBytes )* 2UL;
scanning->Green.pb = scanning->pbScanBufBegin + len;
scanning->Blue.pb = scanning->pbScanBufBegin + len * 2UL;
}
}
@ -1166,6 +1148,8 @@ static int usbDev_Prepare( struct Plustek_Device *dev, SANE_Byte *buf )
}
}
dumpPicInit( &scanning->sParam, "plustek-pic.raw" );
/* here the NT driver uses an extra reading thread...
* as the SANE stuff already forked the driver to read data, I think
* we should only read data by using a function...
@ -1208,8 +1192,6 @@ static int usbDev_Prepare( struct Plustek_Device *dev, SANE_Byte *buf )
scanning->pbGetDataBuf = scanning->pbScanBufBegin;
dumpPic( "plustek-pic.raw", NULL, 0 );
scanning->dwLinesToProcess = usb_ReadData( dev );
if( 0 == scanning->dwLinesToProcess )
return _E_DATAREAD;
@ -1218,21 +1200,14 @@ static int usbDev_Prepare( struct Plustek_Device *dev, SANE_Byte *buf )
}
/**
*
*/
static int usbDev_readLine( struct Plustek_Device *dev )
{
int wrap;
u_long cur, scaler;
u_long cur;
pScanDef scanning = &dev->scanning;
pHWDef hw = &dev->usbDev.HwSetting;
scaler = 1;
if((hw->bReg_0x26 & _ONE_CH_COLOR) &&
(scanning->sParam.bDataType == SCANDATATYPE_Color)) {
scaler = 3;
}
cur = scanning->dwLinesUser;
/* we stay within this sample loop until one line has been processed for
@ -1240,8 +1215,6 @@ static int usbDev_readLine( struct Plustek_Device *dev )
*/
while( cur == scanning->dwLinesUser ) {
DBG( _DBG_READ, "usbDev_readline() - line %lu\n", cur );
if( usb_IsEscPressed()) {
DBG( _DBG_INFO, "readLine() - Cancel detected...\n" );
return _E_ABORT;
@ -1275,21 +1248,21 @@ static int usbDev_readLine( struct Plustek_Device *dev )
if( scanning->sParam.bDataType == SCANDATATYPE_Color ) {
scanning->Red.pb += (scanning->sParam.Size.dwPhyBytes * scaler);
scanning->Red.pb += scanning->sParam.Size.dwPhyBytes;
if( scanning->Red.pb >= scanning->pbScanBufEnd ) {
scanning->Red.pb = scanning->pbScanBufBegin +
scanning->dwRedShift;
wrap = 1;
}
scanning->Green.pb += (scanning->sParam.Size.dwPhyBytes * scaler);
scanning->Green.pb += scanning->sParam.Size.dwPhyBytes;
if( scanning->Green.pb >= scanning->pbScanBufEnd ) {
scanning->Green.pb = scanning->pbScanBufBegin +
scanning->dwGreenShift;
wrap = 1;
}
scanning->Blue.pb += (scanning->sParam.Size.dwPhyBytes * scaler);
scanning->Blue.pb += scanning->sParam.Size.dwPhyBytes;
if( scanning->Blue.pb >= scanning->pbScanBufEnd ) {
scanning->Blue.pb = scanning->pbScanBufBegin +
scanning->dwBlueShift;
@ -1308,13 +1281,16 @@ static int usbDev_readLine( struct Plustek_Device *dev )
*/
if( wrap ) {
u_long len = scanning->sParam.Size.dwPhyBytes;
if( hw->bReg_0x26 & _ONE_CH_COLOR ) {
if(scanning->sParam.bDataType == SCANDATATYPE_Color) {
len /= 3;
}
scanning->Red.pb = scanning->pbScanBufBegin;
scanning->Green.pb = scanning->pbScanBufBegin +
(scanning->sParam.Size.dwPhyBytes );
scanning->Blue.pb = scanning->pbScanBufBegin +
(scanning->sParam.Size.dwPhyBytes )* 2UL;
scanning->Green.pb = scanning->pbScanBufBegin + len;
scanning->Blue.pb = scanning->pbScanBufBegin + len * 2UL;
}
}
@ -1334,11 +1310,7 @@ static int usbDev_readLine( struct Plustek_Device *dev )
}
}
/* after reaching the last line, home the sensor... */
if( 0 == scanning->dwLinesUser )
usb_ScanEnd( dev );
return 0;
return 0;
}
/* END PLUSTEK-USB.C ........................................................*/

Wyświetl plik

@ -7,7 +7,7 @@
* @brief Main defines for the USB devices.
*
* Based on sources acquired from Plustek Inc.<br>
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* - 0.40 - starting version of the USB support
@ -246,6 +246,7 @@ typedef enum
MODEL_CANON600 , /**< for CanoScan 600dpi models */
MODEL_CANON1200, /**< for Canon 1200dpi models */
MODEL_UMAX, /**< for UMAX 3400/3450 */
MODEL_UMAX1200, /**< for UMAX 5400 */
MODEL_LAST
} eModelDef;

Wyświetl plik

@ -7,7 +7,7 @@
* @brief Functions to control the scanner hardware.
*
* Based on sources acquired from Plustek Inc.<br>
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* - 0.40 - starting version of the USB support
@ -25,7 +25,8 @@
* - added usb_switchLampX
* - do now not reinitialized MISC I/O pins upon reset registers
* - 0.45 - added function usb_AdjustLamps() to tweak CIS lamp settings
* - 0.46 - fixed NULL pointer problem in lamp-off ISR
* - fixed NULL pointer problem in lamp-off ISR
* - added usb_AdjustCISLampSettings()
* .
* <hr>
* This file is part of the SANE package.
@ -119,8 +120,7 @@ static SANE_Bool usb_MotorOn( int handle, SANE_Bool fOn )
return SANE_TRUE;
}
/*.............................................................................
*
/** check if scanner is ready
*/
static SANE_Bool usb_IsScannerReady( pPlustek_Device dev )
{
@ -168,7 +168,6 @@ static SANE_Bool usb_IsScannerReady( pPlustek_Device dev )
}
/**
*
*/
static SANE_Bool usb_SensorAdf( int handle )
{
@ -180,7 +179,6 @@ static SANE_Bool usb_SensorAdf( int handle )
}
/**
*
*/
static SANE_Bool usb_SensorPaper( int handle )
{
@ -410,8 +408,7 @@ static SANE_Bool usb_ModuleMove( pPlustek_Device dev,
return SANE_FALSE;
}
/*.............................................................................
*
/**
*/
static SANE_Bool usb_ModuleToHome( pPlustek_Device dev, SANE_Bool fWait )
{
@ -420,12 +417,14 @@ static SANE_Bool usb_ModuleToHome( pPlustek_Device dev, SANE_Bool fWait )
pDCapsDef scaps = &dev->usbDev.Caps;
pHWDef hw = &dev->usbDev.HwSetting;
/* Check if LM9831 is ready for setting command */
/* Check if merlin is ready for setting command */
usbio_WriteReg( dev->fd, 0x58, hw->bReg_0x58 );
usbio_ReadReg ( dev->fd, 2, &value );
/* check current position... */
#if 0
_UIO(usbio_ReadReg( dev->fd, 2, &value ));
#endif
if( value & 1 ) {
fModuleFirstHome = SANE_FALSE;
@ -614,7 +613,6 @@ static SANE_Bool usb_ModuleToHome( pPlustek_Device dev, SANE_Bool fWait )
}
/**
*
*/
static SANE_Bool usb_MotorSelect( pPlustek_Device dev, SANE_Bool fADF )
{
@ -656,6 +654,71 @@ static SANE_Bool usb_MotorSelect( pPlustek_Device dev, SANE_Bool fADF )
return SANE_TRUE;
}
/** function to adjust the lamp settings of a device
*/
static SANE_Bool usb_AdjustLamps( pPlustek_Device dev )
{
pHWDef hw = &dev->usbDev.HwSetting;
a_bRegs[0x2c] = hw->red_lamp_on / 256;
a_bRegs[0x2d] = hw->red_lamp_on & 0xFF;
a_bRegs[0x2e] = hw->red_lamp_off / 256;
a_bRegs[0x2f] = hw->red_lamp_off & 0xFF;
a_bRegs[0x30] = hw->green_lamp_on / 256;
a_bRegs[0x31] = hw->green_lamp_on & 0xFF;
a_bRegs[0x32] = hw->green_lamp_off / 256;
a_bRegs[0x33] = hw->green_lamp_off & 0xFF;
a_bRegs[0x34] = hw->blue_lamp_on / 256;
a_bRegs[0x35] = hw->blue_lamp_on & 0xFF;
a_bRegs[0x36] = hw->blue_lamp_off / 256;
a_bRegs[0x37] = hw->blue_lamp_off & 0xFF;
return sanei_lm983x_write( dev->fd, 0x2c,
&a_bRegs[0x2c], 0x37-0x2c+1, SANE_TRUE );
}
/**
*/
static void usb_AdjustCISLampSettings( Plustek_Device *dev, SANE_Bool on )
{
pHWDef hw = &dev->usbDev.HwSetting;
if( !(hw->bReg_0x26 & _ONE_CH_COLOR))
return;
DBG( _DBG_INFO2, "AdjustCISLamps(%u)\n", on );
if((dev->scanning.sParam.bDataType == SCANDATATYPE_Gray) ||
(dev->scanning.sParam.bDataType == SCANDATATYPE_BW)) {
hw->bReg_0x29 = hw->illu_mono.mode;
memcpy( &hw->red_lamp_on,
&hw->illu_mono.red_lamp_on, sizeof(u_short) * 6 );
} else {
hw->bReg_0x29 = hw->illu_color.mode;
memcpy( &hw->red_lamp_on,
&hw->illu_color.red_lamp_on, sizeof(u_short) * 6 );
}
if( !on ) {
hw->red_lamp_on = 16383;
hw->red_lamp_off = 0;
hw->green_lamp_on = 16383;
hw->green_lamp_off = 0;
hw->blue_lamp_on = 16383;
hw->blue_lamp_off = 0;
}
a_bRegs[0x29] = hw->bReg_0x29;
usb_AdjustLamps( dev );
}
/** according to the flag field, we return the register and
* it's maks to turn on/off the lamp.
* @param flag - field to check
@ -847,34 +910,7 @@ static void usb_LedOn( pPlustek_Device dev, SANE_Bool fOn )
}
}
/** function to adjust the lamp settings of a device
*
*/
static SANE_Bool usb_AdjustLamps( pPlustek_Device dev )
{
pHWDef hw = &dev->usbDev.HwSetting;
a_bRegs[0x2c] = hw->red_lamp_on / 256;
a_bRegs[0x2d] = hw->red_lamp_on & 0xFF;
a_bRegs[0x2e] = hw->red_lamp_off / 256;
a_bRegs[0x2f] = hw->red_lamp_off & 0xFF;
a_bRegs[0x30] = hw->green_lamp_on / 256;
a_bRegs[0x31] = hw->green_lamp_on & 0xFF;
a_bRegs[0x32] = hw->green_lamp_off / 256;
a_bRegs[0x33] = hw->green_lamp_off & 0xFF;
a_bRegs[0x34] = hw->blue_lamp_on / 256;
a_bRegs[0x35] = hw->blue_lamp_on & 0xFF;
a_bRegs[0x36] = hw->blue_lamp_off / 256;
a_bRegs[0x37] = hw->blue_lamp_off & 0xFF;
return sanei_lm983x_write( dev->fd, 0x2c,
&a_bRegs[0x2c], 0x37-0x2c+1, SANE_TRUE );
}
/** usb_LampOn
*
*/
static SANE_Bool usb_LampOn( pPlustek_Device dev,
SANE_Bool fOn, SANE_Bool fResetTimer )
@ -1202,7 +1238,6 @@ static void usb_StartLampTimer( pPlustek_Device dev )
}
/** usb_StopLampTimer
*
*/
static void usb_StopLampTimer( pPlustek_Device dev )
{
@ -1251,6 +1286,13 @@ static SANE_Bool usb_Wait4Warmup( pPlustek_Device dev )
u_long dw;
struct timeval t;
pHWDef hw = &dev->usbDev.HwSetting;
if( hw->bReg_0x29 != 1 ) {
DBG(_DBG_INFO,"Warmup: skipped for CIS devices\n" );
return SANE_TRUE;
}
/*
* wait until warmup period has been elapsed
*/

Wyświetl plik

@ -7,7 +7,7 @@
* @brief Image processing functions for copying and scaling image lines.
*
* Based on sources acquired from Plustek Inc.<br>
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* - 0.40 - starting version of the USB support
@ -21,6 +21,7 @@
* - fixed endless loop bug
* - fixed a bug in usb_GrayScalePseudo16 function
* - fixed a bug in usb_GrayDuplicatePseudo16 function
* - removed the scaler stuff for CIS devices
* .
* <hr>
* This file is part of the SANE package.
@ -1481,77 +1482,69 @@ static void usb_GetImageProc( struct Plustek_Device *dev )
*/
static SANE_Int usb_ReadData( struct Plustek_Device *dev )
{
u_long dw, dwRet, dwBytes, dwAdjust;
u_long dw, dwRet, dwBytes, pl;
pScanDef scanning = &dev->scanning;
pHWDef hw = &dev->usbDev.HwSetting;
DBG( _DBG_READ, "usb_ReadData()\n" );
dwAdjust = 1;
/* for 1 channel color, we have to adjust the phybytes... */
if( hw->bReg_0x26 & _ONE_CH_COLOR ) {
if( scanning->sParam.bDataType == SCANDATATYPE_Color ) {
dwAdjust = 3;
}
}
pl = a_bRegs[0x4e] * hw->wDRAMSize/128;
while( scanning->sParam.Size.dwTotalBytes ) {
if( usb_IsEscPressed()) {
DBG( _DBG_INFO, "usb_ReadData() - Cancel detected...\n" );
return 0;
}
if( scanning->sParam.Size.dwTotalBytes > scanning->dwBytesScanBuf )
dw = scanning->dwBytesScanBuf;
else
dw = scanning->sParam.Size.dwTotalBytes;
scanning->sParam.Size.dwTotalBytes -= dw;
if(!scanning->sParam.Size.dwTotalBytes && dw < (m_dwPauseLimit * 1024))
if(!scanning->sParam.Size.dwTotalBytes && dw < (pl * 1024))
{
if(!(a_bRegs[0x4e] = (u_char)ceil((double)dw /
(4.0 * hw->wDRAMSize)))) {
a_bRegs[0x4e] = 1;
}
a_bRegs[0x4f] = 0;
sanei_lm983x_write( dev->fd, 0x4e, &a_bRegs[0x4e], 2, SANE_TRUE );
}
while( scanning->bLinesToSkip ) {
DBG( _DBG_READ, "Skipping %u lines\n", scanning->bLinesToSkip );
dwBytes = scanning->bLinesToSkip*scanning->sParam.Size.dwPhyBytes;
dwBytes *= dwAdjust;
if (dwBytes > scanning->dwBytesScanBuf) {
dwBytes = scanning->dwBytesScanBuf;
scanning->bLinesToSkip -= scanning->dwLinesScanBuf;
} else {
scanning->bLinesToSkip = 0;
}
}
if( !usb_ScanReadImage( dev, scanning->pbGetDataBuf, dwBytes ))
return 0;
}
if( usb_ScanReadImage( dev, scanning->pbGetDataBuf, dw )) {
dumpPic( "plustek-pic.raw", scanning->pbGetDataBuf, dw );
if( scanning->dwLinesDiscard ) {
DBG( _DBG_READ, "Discarding %lu lines\n",
scanning->dwLinesDiscard );
dwRet = dw / (scanning->sParam.Size.dwPhyBytes * dwAdjust);
dwRet = dw / scanning->sParam.Size.dwPhyBytes;
if (scanning->dwLinesDiscard > dwRet) {
scanning->dwLinesDiscard -= dwRet;
dwRet = 0;
@ -1561,19 +1554,19 @@ static SANE_Int usb_ReadData( struct Plustek_Device *dev )
}
} else {
dwRet = dw / (scanning->sParam.Size.dwPhyBytes * dwAdjust);
}
dwRet = dw / scanning->sParam.Size.dwPhyBytes;
}
scanning->pbGetDataBuf += scanning->dwBytesScanBuf;
if( scanning->pbGetDataBuf >= scanning->pbScanBufEnd ) {
scanning->pbGetDataBuf = scanning->pbScanBufBegin;
}
}
if( dwRet )
return dwRet;
}
}
return 0;
}

Wyświetl plik

@ -7,7 +7,7 @@
* @brief Some I/O stuff.
*
* Based on sources acquired from Plustek Inc.<br>
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* History:
@ -18,6 +18,7 @@
* - 0.44 - added dump registers and dumpPic functions
* - beautyfied output of ASIC detection
* - 0.45 - fixed dumpRegs
* - added dimension stuff to dumpPic
* .
* <hr>
* This file is part of the SANE package.
@ -76,8 +77,16 @@
#define usbio_ReadReg(fd, reg, value) \
sanei_lm983x_read (fd, reg, value, 1, 0)
typedef struct {
u_char depth;
u_long x;
u_long y;
} PicDef, *pPicDef;
static PicDef dPix;
/**
*
*/
static void dumpPic( char* name, SANE_Byte *buffer, u_long len )
{
@ -86,10 +95,27 @@ static void dumpPic( char* name, SANE_Byte *buffer, u_long len )
if( DBG_LEVEL < _DBG_DUMP )
return;
if( NULL == buffer )
fp = fopen( name, "w+b" );
else
fp = fopen( name, "a+b" );
if( NULL == buffer ) {
DBG( _DBG_DUMP, "Creating file '%s'\n", name );
fp = fopen( name, "w+b" );
if( NULL != fp ) {
if( 0 != dPix.x ) {
DBG( _DBG_DUMP, "> X=%lu, Y=%lu, depth=%u\n",
dPix.x, dPix.y, dPix.depth );
if( dPix.depth > 8 )
fprintf( fp, "P6\n%lu %lu\n65535\n", dPix.x, dPix.y );
else
fprintf( fp, "P6\n%lu %lu\n255\n", dPix.x, dPix.y );
}
}
} else {
fp = fopen( name, "a+b" );
}
if( NULL == fp ) {
DBG( _DBG_DUMP, "Can not open file '%s'\n", name );
@ -100,6 +126,24 @@ static void dumpPic( char* name, SANE_Byte *buffer, u_long len )
fclose( fp );
}
/**
*/
static void dumpPicInit( pScanParam sd, char* name )
{
dPix.x = sd->Size.dwPhyBytes;
if( sd->bDataType == SCANDATATYPE_Color )
dPix.x /= 3;
if( sd->bBitDepth > 8 )
dPix.x /= 2;
dPix.y = sd->Size.dwLines;
dPix.depth = sd->bBitDepth;
dumpPic( name, NULL, 0 );
}
/**
* dump the LM983x registers
*/
@ -194,7 +238,7 @@ static SANE_Bool usbio_WriteReg( SANE_Int handle,
/* retry loop... */
for( i = 0; i < 100; i++ ) {
_UIO( sanei_lm983x_write_byte( handle, reg, value ));
sanei_lm983x_write_byte( handle, reg, value );
/* Flush register 0x02 when register 0x58 is written */
if( 0x58 == reg ) {

Wyświetl plik

@ -7,7 +7,7 @@
* @brief Creating and manipulating lookup tables.
*
* Based on sources acquired from Plustek Inc.<br>
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* - 0.40 - starting version of the USB support

Wyświetl plik

@ -7,7 +7,7 @@
* @brief Scanning...
*
* Based on sources acquired from Plustek Inc.<br>
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* - 0.40 - starting version of the USB support
@ -18,6 +18,9 @@
* - removed usb_IsEscPressed
* - 0.45 - fixed the special setting stuff for CanoScan
* - fixed pixel calculation for binary modes
* - fixed cancel hang problem
* - fixed CIS PhyBytes adjustment
* - removed CanoScan specific setting stuff
* .
* <hr>
* This file is part of the SANE package.
@ -81,10 +84,10 @@ static SANE_Bool m_fStart = SANE_FALSE;
/* Prototype... */
static SANE_Bool usb_DownloadShadingData( pPlustek_Device, u_char );
/**
* @param val1 -
* @param val2 -
* @return
/** returns the min of the two values val1 and val2
* @param val1 - first parameter
* @param val2 - second parameter
* @return val1 if val1 < val2, else val1
*/
static u_long usb_min( u_long val1, u_long val2 )
{
@ -94,10 +97,10 @@ static u_long usb_min( u_long val1, u_long val2 )
return val1;
}
/**
* @param val1 -
* @param val2 -
* @return
/** returns the max of the two values val1 and val2
* @param val1 - first parameter
* @param val2 - second parameter
* @return val1 if val1 > val2, else val2
*/
static u_long usb_max( u_long val1, u_long val2 )
{
@ -107,14 +110,14 @@ static u_long usb_max( u_long val1, u_long val2 )
return val2;
}
/**
/** Set the horizontal DPI divider.
* Affected registers:<br>
* 0x09 - Horizontal DPI divider HDPI_DIV<br>
*
* @param dev - pointer to our device structure,
* it should contain all we need
* @param xdpi - user specified horizontal resolution
* @return -
* @return - the function returns the "normalized" horizontal resolution.
*/
static u_short usb_SetAsicDpiX( pPlustek_Device dev, u_short xdpi )
{
@ -202,11 +205,14 @@ static u_short usb_SetAsicDpiY( pPlustek_Device dev, u_short ydpi )
u_short wMinDpi, wDpi;
wMinDpi = sCaps->OpticDpi.y / sCaps->bSensorDistance;
if(0 != sCaps->bSensorDistance )
wMinDpi = sCaps->OpticDpi.y / sCaps->bSensorDistance;
else
wMinDpi = 75;
/* Here we might have to check against the MinDpi value ! */
wDpi = (ydpi + wMinDpi - 1) / wMinDpi * wMinDpi;
/*
* HEINER: added '*2'
*/
@ -288,8 +294,7 @@ static void usb_SetColorAndBits( pPlustek_Device dev, pScanParam pParam )
}
}
/**
* Calculated basic image settings like the number of physical bytes per line
/** Calculate basic image settings like the number of physical bytes per line
* etc...
* Affected registers:<br>
* 0x22/0x23 - Data Pixels Start<br>
@ -314,11 +319,14 @@ static void usb_GetScanRect( pPlustek_Device dev, pScanParam pParam )
/* HEINER: check ADF stuff... */
#if 0
if(pParam->bCalibration != PARAM_Gain && pParam->bCalibration != PARAM_Offset && ScanInf.m_fADF)
wDataPixelStart = 2550 * sCaps->OpticDpi.x / 300UL - (u_short)(m_dHDPIDivider * pParam->Size.dwValidPixels + 0.5);
if(pParam->bCalibration != PARAM_Gain &&
pParam->bCalibration != PARAM_Offset && ScanInf.m_fADF)
wDataPixelStart = 2550 * sCaps->OpticDpi.x / 300UL -
(u_short)(m_dHDPIDivider * pParam->Size.dwValidPixels + 0.5);
else
#endif
wDataPixelStart = (u_short)((u_long) pParam->Origin.x * sCaps->OpticDpi.x / 300UL);
wDataPixelStart = (u_short)((u_long) pParam->Origin.x *
sCaps->OpticDpi.x / 300UL);
/* Data output from NS983X should be times of 2-byte and every line
* will append 2 status bytes
@ -326,34 +334,50 @@ static void usb_GetScanRect( pPlustek_Device dev, pScanParam pParam )
if (pParam->bBitDepth == 1)
{
/* Pixels should be times of 16 */
pParam->Size.dwPhyPixels = (pParam->Size.dwValidPixels + 15UL) & 0xfffffff0UL;
pParam->Size.dwPhyPixels =
(pParam->Size.dwValidPixels + 15UL) & 0xfffffff0UL;
pParam->Size.dwPhyBytes = pParam->Size.dwPhyPixels / 8UL + 2UL;
}
else if (pParam->bBitDepth == 8)
{
/* Pixels should be times of 2 */
pParam->Size.dwPhyPixels = (pParam->Size.dwValidPixels + 1UL) & 0xfffffffeUL;
pParam->Size.dwPhyBytes = pParam->Size.dwPhyPixels * pParam->bChannels + 2UL;
pParam->Size.dwPhyPixels =
(pParam->Size.dwValidPixels + 1UL) & 0xfffffffeUL;
pParam->Size.dwPhyBytes =
pParam->Size.dwPhyPixels * pParam->bChannels + 2UL;
if((hw->bReg_0x26 & _ONE_CH_COLOR) &&
(pParam->bDataType == SCANDATATYPE_Color)) {
pParam->Size.dwPhyBytes *= 3;
}
}
else /* pParam->bBitDepth == 16 */
{
pParam->Size.dwPhyPixels = pParam->Size.dwValidPixels;
pParam->Size.dwPhyBytes = pParam->Size.dwPhyPixels * 2 * pParam->bChannels + 2UL;
pParam->Size.dwPhyBytes =
pParam->Size.dwPhyPixels * 2 * pParam->bChannels + 2UL;
if((hw->bReg_0x26 & _ONE_CH_COLOR) &&
(pParam->bDataType == SCANDATATYPE_Color)) {
pParam->Size.dwPhyBytes *= 3;
}
}
/* Compute data start pixel */
wDataPixelStart = (u_short)((u_long) pParam->Origin.x * sCaps->OpticDpi.x / 300UL);
wDataPixelStart = (u_short)((u_long)pParam->Origin.x *
sCaps->OpticDpi.x / 300UL);
/*
* during the calibration steps, we read the entire CCD data
*/
if (pParam->bCalibration != PARAM_Gain && pParam->bCalibration != PARAM_Offset)
{
if((pParam->bCalibration != PARAM_Gain) &&
(pParam->bCalibration != PARAM_Offset)) {
/* HEINER: check ADF stuff... */
#if 0
if(ScanInf.m_fADF)
if(ScanInf.m_fADF) {
wDataPixelStart = 2550 * sCaps->OpticDpi.x / 300UL -
(u_short)(m_dHDPIDivider * pParam->Size.dwValidPixels + 0.5);
(u_short)(m_dHDPIDivider * pParam->Size.dwValidPixels + 0.5);
}
#endif
wDataPixelStart += hw->wActivePixelsStart;
}
@ -364,6 +388,15 @@ static void usb_GetScanRect( pPlustek_Device dev, pScanParam pParam )
DBG( _DBG_INFO, "* DataPixelStart=%u, LineEnd=%u\n",
wDataPixelStart, wLineEnd );
if( wDataPixelStart & 1 ) {
wDataPixelStart++;
wLineEnd++;
DBG( _DBG_INFO, "* DataPixelStart=%u, LineEnd=%u (ADJ)\n",
wDataPixelStart, wLineEnd );
}
a_bRegs[0x22] = _HIBYTE( wDataPixelStart );
a_bRegs[0x23] = _LOBYTE( wDataPixelStart );
@ -435,14 +468,32 @@ static void usb_GetScanRect( pPlustek_Device dev, pScanParam pParam )
if( hw->motorModel == MODEL_HuaLien && sCaps->OpticDpi.x == 600)
pParam->Origin.y = pParam->Origin.y * 297 / 298;
DBG( _DBG_INFO, "* Full Steps to Skip at Start = 0x%04x\n", pParam->Origin.y );
DBG(_DBG_INFO,"* Full Steps to Skip at Start = 0x%04x\n",pParam->Origin.y);
a_bRegs[0x4a] = _HIBYTE( pParam->Origin.y );
a_bRegs[0x4b] = _LOBYTE( pParam->Origin.y );
}
/** preset scan stepsize and fastfeed stepsize
*/
static void usb_PresetStepSize( pPlustek_Device dev, pScanParam pParam )
{
u_short ssize;
double mclkdiv = pParam->dMCLK;
pHWDef hw = &dev->usbDev.HwSetting;
ssize = (u_short)((double)dwCrystalFrequency / ( mclkdiv * 8.0 *
(double)m_bCM * hw->dMaxMotorSpeed * 4.0 * (double)hw->wMotorDpi));
a_bRegs[0x46] = _HIBYTE( ssize );
a_bRegs[0x47] = _LOBYTE( ssize );
a_bRegs[0x48] = _HIBYTE( ssize );
a_bRegs[0x49] = _LOBYTE( ssize );
DBG( _DBG_INFO2, "* StepSize(Preset) = %u (0x%04x)\n", ssize, ssize );
}
/** calculate default phase difference DPD
*
*/
static void usb_GetDPD( pPlustek_Device dev )
{
@ -490,8 +541,7 @@ static void usb_GetDPD( pPlustek_Device dev )
a_bRegs[0x53] = (u_char)(dpd & 0xFF);
}
/**
* Plusteks' poor-man MCLK calculation...
/** Plusteks' poor-man MCLK calculation...
* at least we give the master clock divider and adjust the step size
* and integration time (for 14/16 bit modes)
*/
@ -588,8 +638,7 @@ static double usb_GetMCLKDivider( pPlustek_Device dev, pScanParam pParam )
return m_dMCLKDivider;
}
/**
* calculate the step size of each scan step
/** calculate the step size of each scan step
*/
static void usb_GetStepSize( pPlustek_Device dev, pScanParam pParam )
{
@ -618,7 +667,6 @@ static void usb_GetStepSize( pPlustek_Device dev, pScanParam pParam )
}
/**
*
*/
static void usb_GetLineLength( pPlustek_Device dev )
{
@ -873,7 +921,6 @@ static void usb_GetMotorParam( pPlustek_Device dev, pScanParam pParam )
}
/**
*
*/
static void usb_GetPauseLimit( pPlustek_Device dev, pScanParam pParam )
{
@ -934,7 +981,6 @@ static void usb_GetPauseLimit( pPlustek_Device dev, pScanParam pParam )
}
/** usb_GetScanLinesAndSize
*
*/
static void usb_GetScanLinesAndSize( pPlustek_Device dev, pScanParam pParam )
{
@ -969,7 +1015,6 @@ static void usb_GetScanLinesAndSize( pPlustek_Device dev, pScanParam pParam )
}
/** function to preset/reset the merlin registers
*
*/
static SANE_Bool usb_SetScanParameters( pPlustek_Device dev, pScanParam pParam )
{
@ -999,9 +1044,12 @@ static SANE_Bool usb_SetScanParameters( pPlustek_Device dev, pScanParam pParam )
*/
pParam->PhyDpi.x = usb_SetAsicDpiX( dev, pParam->UserDpi.x );
pParam->PhyDpi.y = usb_SetAsicDpiY( dev, pParam->UserDpi.y );
usb_SetColorAndBits( dev, pParam );
usb_GetScanRect ( dev, pParam );
usb_PresetStepSize( dev, pParam );
if( dev->caps.dwFlag & SFLAG_ADF ) {
if( pParam->bCalibration == PARAM_Scan ) {
@ -1108,75 +1156,24 @@ static SANE_Bool usb_SetScanParameters( pPlustek_Device dev, pScanParam pParam )
a_bRegs[0x07] = 0;
/* Set register values */
/* set unused registers to 0 */
memset( &a_bRegs[0x03], 0, 3 );
memset( &a_bRegs[0x5C], 0, 0x7F-0x5C+1 );
memset( &a_bRegs[0x5f], 0, 0x7f-0x5f+1 );
usbio_ReadReg( dev->fd, 0x69, &a_bRegs[0x69] );
/* set the merlin registers */
_UIO(sanei_lm983x_write( dev->fd, 0x08, &a_bRegs[0x08], 0x7f - 0x08+1, SANE_TRUE));
/* 0x08 - 0x5a (not 0x28) */
_UIO(sanei_lm983x_write( dev->fd, 0x08, &a_bRegs[0x08], 0x27 - 0x08+1, SANE_TRUE));
_UIO(sanei_lm983x_write( dev->fd, 0x29, &a_bRegs[0x29], 0x5a - 0x29+1, SANE_TRUE));
/* 0x03 - 0x05 */
_UIO(sanei_lm983x_write( dev->fd, 0x03, &a_bRegs[0x03], 3, SANE_TRUE));
/* special settings for CANON... */
if( dev->usbDev.vendor == 0x4a9 ) {
a_bRegs[0x5c] = 0x01;
a_bRegs[0x70] = 0x73;
}
/* 0x5C - 0x7F */
_UIO(sanei_lm983x_write( dev->fd, 0x5c, &a_bRegs[0x5c], 0x7f - 0x5c +1, SANE_TRUE));
usbio_WriteReg( dev->fd, 0x5a, a_bRegs[0x5a] );
usbio_WriteReg( dev->fd, 0x5b, a_bRegs[0x5b] );
if( !usbio_WriteReg( dev->fd, 0x07, 0 ))
usleep( 50 );
if( !usbio_WriteReg( dev->fd, 0x07, 0 ))
return SANE_FALSE;
/* special procedure for CANON... */
if( dev->usbDev.vendor == 0x4a9 ) {
SANE_Byte tmp;
if( dev->usbDev.product == 0x2206 ||
dev->usbDev.product == 0x2207) {
usbio_WriteReg( dev->fd, 0x5a, 0x92 );
usbio_WriteReg( dev->fd, 0x5b, 0x19 );
usbio_ReadReg ( dev->fd, 0x09, &tmp );
usbio_WriteReg( dev->fd, 0x09, tmp );
usbio_WriteReg( dev->fd, 0x5a, 0x12 );
usbio_WriteReg( dev->fd, 0x5b, 0x11 );
usbio_WriteReg( dev->fd, 0x59, 0x24 );
} else {
usbio_WriteReg( dev->fd, 0x5b, 0x11 );
usbio_WriteReg( dev->fd, 0x5b, 0x91 );
usbio_ReadReg ( dev->fd, 0x5a, &tmp );
usbio_WriteReg( dev->fd, 0x5a, 0x14 );
usbio_ReadReg ( dev->fd, 0x09, &tmp );
usbio_WriteReg( dev->fd, 0x09, tmp );
usbio_WriteReg( dev->fd, 0x5a, 0x16 );
usbio_WriteReg( dev->fd, 0x59, 0x66 );
}
}
DBG( _DBG_INFO, "usb_SetScanParameters() done.\n" );
return SANE_TRUE;
}
/*.............................................................................
*
/**
*/
static SANE_Bool usb_ScanBegin( pPlustek_Device dev, SANE_Bool fAutoPark )
{
@ -1281,7 +1278,6 @@ static SANE_Bool usb_ScanEnd( pPlustek_Device dev )
}
/**
*
*/
static SANE_Bool usb_IsDataAvailableInDRAM( pPlustek_Device dev )
{
@ -1333,8 +1329,7 @@ static SANE_Bool usb_IsDataAvailableInDRAM( pPlustek_Device dev )
return SANE_FALSE;
}
/*.............................................................................
*
/**
*/
static SANE_Bool usb_ScanReadImage( pPlustek_Device dev,
void *pBuf, u_long dwSize )
@ -1404,6 +1399,13 @@ static SANE_Bool usb_ScanReadImage( pPlustek_Device dev,
res = sanei_lm983x_read(dev->fd, 0x00, (u_char *)pBuf, dwSize, SANE_FALSE);
/* check for pressed ESC button, as sanei_lm983x_read() may take some time
*/
if( usb_IsEscPressed()) {
DBG(_DBG_INFO,"usb_ScanReadImage() - Cancel detected...\n");
return SANE_FALSE;
}
DBG( _DBG_READ, "usb_ScanReadImage() done, result: %d\n", res );
if( SANE_STATUS_GOOD == res ) {
@ -1416,7 +1418,6 @@ static SANE_Bool usb_ScanReadImage( pPlustek_Device dev,
}
/**
*
*/
static void usb_GetImageInfo( pImgDef pInfo, pWinInfo pSize )
{
@ -1451,7 +1452,6 @@ static void usb_GetImageInfo( pImgDef pInfo, pWinInfo pSize )
}
/**
*
*/
static void usb_SaveImageInfo( pPlustek_Device dev, pImgDef pInfo )
{

Wyświetl plik

@ -7,7 +7,7 @@
* @brief Calibration routines.
*
* Based on sources acquired from Plustek Inc.<br>
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* - 0.40 - starting version of the USB support
@ -19,6 +19,7 @@
* - added dump of shading data
* - 0.45 - added coarse calibration for CIS devices
* - added _WAF_SKIP_FINE to skip the results of fine calibration
* - CanoScan fixes
* .
* <hr>
* This file is part of the SANE package.
@ -65,7 +66,11 @@
#define _MAX_GAIN_LOOPS 10 /**< max number of loops for coarse calibration */
#define _SHADING_BUF (12000*3) /**< max size of the shafing buffer */
#define _MAX_SHAD 0x4000
#define _SHADING_BUF (_MAX_SHAD*3) /**< max size of the shading buffer */
#define _CIS_GAIN 1
#define _CIS_OFFS 4
static u_short a_wWhiteShading[_SHADING_BUF] = {0};
static u_short a_wDarkShading[_SHADING_BUF] = {0};
@ -76,7 +81,6 @@ static RGBUShortDef Gain_Hilight;
static RGBUShortDef Gain_NegHilight;
static RGBByteDef Gain_Reg;
static u_long dwShadingLines = 64;
static u_long m_dwPixels;
static u_long dwPos;
@ -96,6 +100,72 @@ static double dRed, dGreen, dBlue;
static u_short m_wHilight = 4 /*0*/; /* check the windows registry... */
static u_short m_wShadow = 4 /*0*/; /* check the windows registry... */
/**
*/
static void usb_line_statistics( char *cmt, u_short* buf,
u_long dim_x, SANE_Bool color )
{
int i, end;
u_long dw, imad, imid, alld, cld, cud;
u_short mid, mad, aved, lbd, ubd, tmp;
pMonoWordDef pvd, pvd2;
pvd = pvd2 = (pMonoWordDef)buf;
if( color )
end = 3;
else
end = 1;
for( i = 0; i < end; i++ ) {
mid = 0xFFFF;
mad = 0;
imid = 0;
imad = 0;
alld = 0;
cld = 0;
cud = 0;
for( dw = 0; dw < dim_x; pvd++, dw++ ) {
tmp = _LOBYTE(pvd->Mono) * 256 + _HIBYTE(pvd->Mono);
if( tmp > mad ) {
mad = tmp;
imad = dw;
}
if( tmp < mid ) {
mid = tmp;
imid = dw;
}
alld += tmp;
}
aved = (u_short)(alld/dim_x);
lbd = aved - 0.05*aved;
ubd = aved + 0.05*aved;
for( dw = 0; dw < dim_x; pvd2++, dw++ ) {
tmp = _LOBYTE(pvd2->Mono) * 256 + _HIBYTE(pvd2->Mono);
if( tmp > ubd ) {
cud++;
} else if( tmp < lbd ) {
cld++;
}
}
DBG( _DBG_INFO2, "Color[%u] (%s) : "
"min=%u(%lu) max=%u(%lu) ave=%u\n",
i, cmt, mid, imid, mad, imad, aved);
DBG( _DBG_INFO2, "5%%: %u (%lu), %u (%lu)\n", lbd, cld,ubd,cud);
}
}
/** usb_SetMCLK
* get the MCLK out of our table
*/
@ -565,7 +635,7 @@ static SANE_Bool usb_AdjustGain( pPlustek_Device dev, int fNegative )
pScanDef scanning = &dev->scanning;
pDCapsDef scaps = &dev->usbDev.Caps;
pHWDef hw = &dev->usbDev.HwSetting;
u_long dw, bytes2get;
u_long dw;
SANE_Bool fRepeatITA = SANE_TRUE;
if( usb_IsEscPressed())
@ -574,7 +644,15 @@ static SANE_Bool usb_AdjustGain( pPlustek_Device dev, int fNegative )
bMaxITA = 0xff;
DBG( _DBG_INFO2, "usb_AdjustGain()\n" );
if( hw->bReg_0x26 & _ONE_CH_COLOR ) {
a_bRegs[0x3b] =
a_bRegs[0x3c] =
a_bRegs[0x3d] = _CIS_GAIN;
/* don't blame on me - I know it's shitty... */
goto show_sets;
}
/*
* define the strip to scan for coarse calibration
* done at 300dpi
@ -588,7 +666,7 @@ static SANE_Bool usb_AdjustGain( pPlustek_Device dev, int fNegative )
if( hw->bReg_0x26 & _ONE_CH_COLOR &&
m_ScanParam.bDataType == SCANDATATYPE_Color ) {
m_ScanParam.Size.dwBytes *=3;
m_ScanParam.Size.dwBytes *= 3;
}
m_ScanParam.Origin.x = (u_short)((u_long) hw->wActivePixelsStart *
@ -613,14 +691,8 @@ TOGAIN:
return SANE_FALSE;
}
bytes2get = m_ScanParam.Size.dwPhyBytes;
if( hw->bReg_0x26 & _ONE_CH_COLOR &&
m_ScanParam.bDataType == SCANDATATYPE_Color ) {
bytes2get *=3;
}
if( !usb_ScanBegin( dev, SANE_FALSE) ||
!usb_ScanReadImage( dev, pScanBuffer, bytes2get ) ||
!usb_ScanReadImage( dev, pScanBuffer, m_ScanParam.Size.dwPhyBytes ) ||
!usb_ScanEnd( dev )) {
DBG( _DBG_ERROR, "usb_AdjustGain() failed\n" );
return SANE_FALSE;
@ -631,10 +703,10 @@ TOGAIN:
sprintf( tmp, "coarse-gain-%u.raw", i++ );
dumpPic( tmp, NULL, 0 );
dumpPic( tmp, pScanBuffer, bytes2get );
dumpPicInit( &m_ScanParam, tmp );
dumpPic( tmp, pScanBuffer, m_ScanParam.Size.dwPhyBytes );
usb_Swap((u_short *)pScanBuffer, bytes2get );
usb_Swap((u_short *)pScanBuffer, m_ScanParam.Size.dwPhyBytes );
if( fNegative ) {
@ -701,7 +773,7 @@ TOGAIN:
if( m_ScanParam.bDataType == SCANDATATYPE_Color ) {
RGBUShortDef max_rgb, min_rgb, tmp;
RGBUShortDef max_rgb, min_rgb, tmp_rgb;
u_long dwR, dwG, dwB;
u_long dwDiv = 10;
u_long dwLoop1 = m_ScanParam.Size.dwPhyPixels / dwDiv, dwLoop2;
@ -756,22 +828,20 @@ TOGAIN:
/* on CIS scanner, we use the min value, on CCD the max value
* for adjusting the gain
*/
tmp = max_rgb;
tmp_rgb = max_rgb;
if( hw->bReg_0x26 & _ONE_CH_COLOR )
tmp = min_rgb;
tmp_rgb = min_rgb;
DBG(_DBG_INFO2, "CUR(R,G,B)= 0x%04x(%u), 0x%04x(%u), 0x%04x(%u)\n",
tmp.Red, tmp.Red, tmp.Green, tmp.Green, tmp.Blue, tmp.Blue);
tmp_rgb.Red, tmp_rgb.Red, tmp_rgb.Green,
tmp_rgb.Green, tmp_rgb.Blue, tmp_rgb.Blue);
m_dwIdealGain = IDEAL_GainNormal;
/* min(min(rgb.wRed, rgb.wGreen), rgb.wBlue) */
if( hw->bReg_0x26 & _ONE_CH_COLOR )
m_dwIdealGain = 0xff00;
a_bRegs[0x3b] = usb_GetNewGain( tmp.Red );
a_bRegs[0x3c] = usb_GetNewGain( tmp.Green );
a_bRegs[0x3d] = usb_GetNewGain( tmp.Blue );
a_bRegs[0x3b] = usb_GetNewGain( tmp_rgb.Red );
a_bRegs[0x3c] = usb_GetNewGain( tmp_rgb.Green );
a_bRegs[0x3d] = usb_GetNewGain( tmp_rgb.Blue );
if( !_IS_PLUSTEKMOTOR(hw->motorModel)) {
@ -782,17 +852,17 @@ TOGAIN:
m_dwIdealGain = IDEAL_GainNormal;
if( adjLampSetting( CHANNEL_red, min_rgb.Red, m_dwIdealGain,
if( adjLampSetting( CHANNEL_red, tmp_rgb.Red, m_dwIdealGain,
hw->red_lamp_on, &hw->red_lamp_off )) {
adj = SANE_TRUE;
}
if( adjLampSetting( CHANNEL_green, min_rgb.Green, m_dwIdealGain,
if( adjLampSetting( CHANNEL_green, tmp_rgb.Green, m_dwIdealGain,
hw->green_lamp_on, &hw->green_lamp_off )) {
adj = SANE_TRUE;
}
if( adjLampSetting( CHANNEL_blue, min_rgb.Blue, m_dwIdealGain,
if( adjLampSetting( CHANNEL_blue, tmp_rgb.Blue, m_dwIdealGain,
hw->blue_lamp_on, &hw->blue_lamp_off)){
adj = SANE_TRUE;
}
@ -877,7 +947,7 @@ TOGAIN:
} else {
u_short w_max = 0, w_min = 0xffff, tmp;
u_short w_max = 0, w_min = 0xffff, w_tmp;
for( dw = 0; dw < m_ScanParam.Size.dwPhyPixels; dw++ ) {
if( w_max < ((u_short*)pScanBuffer)[dw])
@ -886,15 +956,17 @@ TOGAIN:
w_min = ((u_short*)pScanBuffer)[dw];
}
tmp = w_max;
w_tmp = w_max;
if( hw->bReg_0x26 & _ONE_CH_COLOR )
tmp = w_min;
w_tmp = w_min;
a_bRegs[0x3b] = a_bRegs[0x3c] = a_bRegs[0x3d] = usb_GetNewGain(tmp);
a_bRegs[0x3b] =
a_bRegs[0x3c] =
a_bRegs[0x3d] = usb_GetNewGain(w_tmp);
DBG(_DBG_INFO2, "MAX(G)= 0x%04x(%u)\n", w_max, w_max );
DBG(_DBG_INFO2, "MIN(G)= 0x%04x(%u)\n", w_min, w_min );
DBG(_DBG_INFO2, "CUR(G)= 0x%04x(%u)\n", tmp, tmp );
DBG(_DBG_INFO2, "CUR(G)= 0x%04x(%u)\n", w_tmp, w_tmp );
m_dwIdealGain = IDEAL_GainNormal;
@ -905,7 +977,7 @@ TOGAIN:
/* on CIS devices, we can control the lamp off settings */
if( hw->bReg_0x26 & _ONE_CH_COLOR ) {
if( adjLampSetting( CHANNEL_green, w_min, m_dwIdealGain,
if( adjLampSetting( CHANNEL_green, w_tmp, m_dwIdealGain,
hw->green_lamp_on, &hw->green_lamp_off )) {
adj = SANE_TRUE;
}
@ -943,6 +1015,8 @@ TOGAIN:
}
}
}
show_sets:
DBG( _DBG_INFO2, "REG[0x3b] = %u\n", a_bRegs[0x3b] );
DBG( _DBG_INFO2, "REG[0x3c] = %u\n", a_bRegs[0x3c] );
DBG( _DBG_INFO2, "REG[0x3d] = %u\n", a_bRegs[0x3d] );
@ -984,10 +1058,6 @@ static void usb_GetNewOffset( u_long *pdwSum, u_long *pdwDiff,
/* IDEAL_Offset is currently set to 0x1000 = 4096 */
u_long dwIdealOffset = IDEAL_Offset;
/* for CIS to 2048 */
if( a_bRegs[0x26] & _ONE_CH_COLOR )
dwIdealOffset = 0x800;
if( pdwSum[channel] > dwIdealOffset ) {
/* Over ideal value */
@ -1033,7 +1103,7 @@ static SANE_Bool usb_AdjustOffset( pPlustek_Device dev )
signed char cOffset[3];
u_char bExpect[3];
int i;
u_long dw, dwPixels, bytes2get;
u_long dw, dwPixels;
u_long dwDiff[3], dwSum[3];
pHWDef hw = &dev->usbDev.HwSetting;
@ -1042,6 +1112,12 @@ static SANE_Bool usb_AdjustOffset( pPlustek_Device dev )
return SANE_FALSE;
DBG( _DBG_INFO2, "usb_AdjustOffset()\n" );
if( hw->bReg_0x26 & _ONE_CH_COLOR ) {
a_bRegs[0x38] =
a_bRegs[0x39] =
a_bRegs[0x3a] = _CIS_OFFS;
return SANE_TRUE;
}
m_ScanParam.Size.dwLines = 1; /* for gain */
m_ScanParam.Size.dwPixels = 2550;
@ -1102,18 +1178,10 @@ static SANE_Bool usb_AdjustOffset( pPlustek_Device dev )
i = 0;
bytes2get = m_ScanParam.Size.dwPhyBytes;
if( hw->bReg_0x26 & _ONE_CH_COLOR ) {
if( m_ScanParam.bDataType == SCANDATATYPE_Color )
bytes2get *= 3;
}
DBG( _DBG_INFO2, "S.dwPixels = %lu\n", m_ScanParam.Size.dwPixels );
DBG( _DBG_INFO2, "dwPixels = %lu\n", dwPixels );
DBG( _DBG_INFO2, "dwPhyBytes = %lu\n", m_ScanParam.Size.dwPhyBytes );
DBG( _DBG_INFO2, "dwPhyPixels = %lu\n", m_ScanParam.Size.dwPhyPixels );
DBG( _DBG_INFO2, "bytes2get = %lu\n", bytes2get );
while( cAdjust ) {
@ -1121,7 +1189,7 @@ static SANE_Bool usb_AdjustOffset( pPlustek_Device dev )
* read data (a white calibration strip - hopefully ;-)
*/
if((!usb_ScanBegin(dev, SANE_FALSE)) ||
(!usb_ScanReadImage(dev,pScanBuffer,bytes2get)) ||
(!usb_ScanReadImage(dev,pScanBuffer,m_ScanParam.Size.dwPhyBytes)) ||
!usb_ScanEnd( dev )) {
DBG( _DBG_ERROR, "usb_AdjustOffset() failed\n" );
return SANE_FALSE;
@ -1129,8 +1197,8 @@ static SANE_Bool usb_AdjustOffset( pPlustek_Device dev )
sprintf( tmp, "coarse-off-%u.raw", i++ );
dumpPic( tmp, NULL, 0 );
dumpPic( tmp, pScanBuffer, bytes2get );
dumpPicInit( &m_ScanParam, tmp );
dumpPic( tmp, pScanBuffer, m_ScanParam.Size.dwPhyBytes );
if( m_ScanParam.bDataType == SCANDATATYPE_Color ) {
@ -1209,7 +1277,7 @@ static SANE_Bool usb_AdjustOffset( pPlustek_Device dev )
return SANE_TRUE;
}
/** this function tries to find out some suitable values for thed dark
/** this function tries to find out some suitable values for the dark
* fine calibration. If the device owns a black calibration strip
* (never saw one yet - _WAF_BLACKFINE is set then), the data is simply
* copied. If not, then the white strip is read with the lamp switched
@ -1303,7 +1371,6 @@ static void usb_GetDarkShading( pPlustek_Device dev, u_short *pwDest,
static SANE_Bool usb_AdjustDarkShading( pPlustek_Device dev )
{
char tmp[40];
u_long bytes2get;
pScanDef scanning = &dev->scanning;
pDCapsDef scaps = &dev->usbDev.Caps;
pHWDef hw = &dev->usbDev.HwSetting;
@ -1369,14 +1436,8 @@ static SANE_Bool usb_AdjustDarkShading( pPlustek_Device dev )
usb_SetScanParameters( dev, &m_ScanParam );
bytes2get = m_ScanParam.Size.dwPhyBytes;
if( hw->bReg_0x26 & _ONE_CH_COLOR &&
m_ScanParam.bDataType == SCANDATATYPE_Color ) {
bytes2get *=3;
}
if((!usb_ScanBegin(dev, SANE_FALSE)) ||
(!usb_ScanReadImage(dev,pScanBuffer, bytes2get)) ||
(!usb_ScanReadImage(dev,pScanBuffer, m_ScanParam.Size.dwPhyBytes)) ||
(!usb_ScanEnd( dev ))) {
/* on error, reset the lamp settings*/
@ -1402,8 +1463,8 @@ static SANE_Bool usb_AdjustDarkShading( pPlustek_Device dev )
sprintf( tmp, "fine-black.raw" );
dumpPic( tmp, NULL, 0 );
dumpPic( tmp, pScanBuffer, bytes2get );
dumpPicInit( &m_ScanParam, tmp );
dumpPic( tmp, pScanBuffer, m_ScanParam.Size.dwPhyBytes );
usleep(500 * 1000); /* Warm up lamp again */
@ -1450,6 +1511,8 @@ static SANE_Bool usb_AdjustDarkShading( pPlustek_Device dev )
a_bRegs[0x45] |= 0x10;
usb_line_statistics( "Dark", a_wDarkShading, m_ScanParam.Size.dwPhyPixels,
scanning->sParam.bDataType == SCANDATATYPE_Color?1:0);
return SANE_TRUE;
}
@ -1466,6 +1529,7 @@ static SANE_Bool usb_AdjustWhiteShading( pPlustek_Device dev )
pHWDef hw = &dev->usbDev.HwSetting;
u_char *pBuf = pScanBuffer;
u_long dw, dwLines, dwRead;
u_long dwShadingLines;
pMonoWordDef pValue;
u_long* pdw;
int i;
@ -1484,16 +1548,10 @@ static SANE_Bool usb_AdjustWhiteShading( pPlustek_Device dev )
else
dwShadingLines = 32;
/* NOTE: m_wHilight + m_wShadow < dwShadingLines */
m_wHilight = 4;
m_wShadow = 4;
#if 0
/* NOTE: m_wHilight + m_wShadow < dwShadingLines */
dwShadingLines = 8;
m_wHilight = 2;
m_wShadow = 2;
#endif
m_ScanParam = scanning->sParam;
m_ScanParam.Origin.y = 0;
m_ScanParam.bBitDepth = 16;
@ -1507,7 +1565,8 @@ static SANE_Bool usb_AdjustWhiteShading( pPlustek_Device dev )
#endif
m_ScanParam.UserDpi.y = scaps->OpticDpi.y;
/* } */
m_ScanParam.Size.dwBytes = m_ScanParam.Size.dwPixels * 2 * m_ScanParam.bChannels;
m_ScanParam.Size.dwBytes = m_ScanParam.Size.dwPixels * 2 *
m_ScanParam.bChannels;
if( hw->bReg_0x26 & _ONE_CH_COLOR &&
m_ScanParam.bDataType == SCANDATATYPE_Color ) {
@ -1555,8 +1614,6 @@ static SANE_Bool usb_AdjustWhiteShading( pPlustek_Device dev )
}
sprintf( tmp, "fine-white.raw" );
dumpPic( tmp, NULL, 0 );
DBG( _DBG_INFO2, "FINE WHITE Calibration Strip: %s\n", tmp );
DBG( _DBG_INFO2, "Shad.-Lines = %lu\n", dwShadingLines );
DBG( _DBG_INFO2, "Lines = %lu\n", m_ScanParam.Size.dwLines );
@ -1586,6 +1643,10 @@ static SANE_Bool usb_AdjustWhiteShading( pPlustek_Device dev )
usleep(10 * 1000);
}
if( 0 == dwRead ) {
dumpPicInit( &m_ScanParam, tmp );
}
dumpPic( tmp, pBuf + dwRead, m_ScanParam.Size.dwTotalBytes );
if( usb_ScanEnd( dev )) {
@ -1603,20 +1664,23 @@ static SANE_Bool usb_AdjustWhiteShading( pPlustek_Device dev )
m_pSum = (u_long*)(pBuf + m_ScanParam.Size.dwPhyBytes *
dwShadingLines/*SHADING_Lines*/);
/*
* do some reordering on CIS based devices
* do some reordering on CIS based devices:
* from RRRRRRR.... GGGGGGGG.... BBBBBBBBB, create RGB RGB RGB ...
* to use the following code, originally written for CCD devices...
*/
if( hw->bReg_0x26 & _ONE_CH_COLOR ) {
#if 1
u_short *dest, *src;
u_long dww;
src = (u_short*)pBuf;
#endif
DBG( _DBG_INFO2, "PhyBytes = %lu\n", m_ScanParam.Size.dwPhyBytes );
DBG( _DBG_INFO2, "PhyPixels = %lu\n", m_ScanParam.Size.dwPhyPixels );
DBG( _DBG_INFO2, "Pixels = %lu\n", m_ScanParam.Size.dwPixels );
DBG( _DBG_INFO2, "Bytes = %lu\n", m_ScanParam.Size.dwBytes );
DBG( _DBG_INFO2, "Channels = %u\n", m_ScanParam.bChannels );
#if 1
for( dwLines = dwShadingLines; dwLines; dwLines-- ) {
dest = a_wWhiteShading;
@ -1632,7 +1696,7 @@ static SANE_Bool usb_AdjustWhiteShading( pPlustek_Device dev )
memcpy( src, dest, m_ScanParam.Size.dwPhyPixels * 3 * 2 );
src = &src[m_ScanParam.Size.dwPhyPixels * 3];
}
#endif
m_ScanParam.bChannels = 3;
}
@ -1862,120 +1926,8 @@ static SANE_Bool usb_AdjustWhiteShading( pPlustek_Device dev )
}
}
if( hw->bReg_0x26 & _ONE_CH_COLOR ) {
#if 1
u_short *dest, *src;
u_long dww;
src = (u_short*)a_wWhiteShading;
dest = (u_short*)pScanBuffer;
for( dw=dww=0; dw < m_ScanParam.Size.dwPhyPixels; dw++, dww+=3 ) {
dest[dw] = src[dww];
dest[m_ScanParam.Size.dwPhyPixels + dw] = src[dww + 1];
dest[m_ScanParam.Size.dwPhyPixels * 2 + dw] = src[dww + 2];
}
/* copy line back ... */
memcpy( src, dest, m_ScanParam.Size.dwPhyPixels * 3 * 2 );
#endif
}
/* do some statistic on the result buffer */
{
int end;
u_long ima, imi, all, cl, cu;
u_long imad, imid, alld, cld, cud;
u_short mi, ma, ave, lb, ub;
u_short mid, mad, aved, lbd, ubd;
pMonoWordDef pv, pvd, pvd2;
pv = pValue = (pMonoWordDef)a_wWhiteShading;
pvd = pvd2 = (pMonoWordDef)a_wDarkShading;
if( scanning->sParam.bDataType == SCANDATATYPE_Color )
end = 3;
else
end = 1;
for( i = 0; i < end; i++ ) {
mi = mid = 0xFFFF;
ma = mad = 0;
imi = imid = 0;
ima = imad = 0;
all = alld = 0;
cl = cld = 0;
cu = cud = 0;
for( dw = 0; dw < m_ScanParam.Size.dwPhyPixels; pValue++, pvd++, dw++ ) {
if( pValue->Mono > ma ) {
ma = pValue->Mono;
ima = dw;
}
if( pValue->Mono < mi ) {
mi = pValue->Mono;
imi = dw;
}
all += pValue->Mono;
if( pvd->Mono > mad ) {
mad = pvd->Mono;
imad = dw;
}
if( pvd->Mono < mid ) {
mid = pvd->Mono;
imid = dw;
}
alld += pvd->Mono;
}
ave = (u_short)(all/m_ScanParam.Size.dwPhyPixels);
lb = ave - 0.995*ave;
ub = ave + 0.995*ave;
aved = (u_short)(alld/m_ScanParam.Size.dwPhyPixels);
lbd = aved - 0.995*aved;
ubd = aved + 0.995*aved;
for( dw = 0; dw < m_ScanParam.Size.dwPhyPixels; pv++, pvd2++, dw++ ) {
if( pv->Mono > ub ) {
cu++;
} else if( pv->Mono < lb ) {
cl++;
}
if( pvd2->Mono > ubd ) {
cud++;
} else if( pvd2->Mono < lbd ) {
cld++;
}
#if 0
if( i== 1 || i == 0 )
pv->Mono = 0;
#endif
}
DBG( _DBG_INFO2, "Color[%u] (White): "
"min=%u(%lu) max=%u(%lu) ave=%u\n",
i, mi, imi, ma, ima, ave );
DBG( _DBG_INFO2, "99.5%%: %u (%lu), %u (%lu)\n", lb, cl, ub, cu );
DBG( _DBG_INFO2, "Color[%u] (Dark) : "
"min=%u(%lu) max=%u(%lu) ave=%u\n",
i, mid, imid, mad, imad, aved);
DBG( _DBG_INFO2, "99.5%%: %u (%lu), %u (%lu)\n", lbd, cld,ubd,cud);
}
}
usb_line_statistics( "White", a_wWhiteShading, m_ScanParam.Size.dwPhyPixels,
scanning->sParam.bDataType == SCANDATATYPE_Color?1:0);
return SANE_TRUE;
}
@ -1999,7 +1951,6 @@ static void usb_ResizeWhiteShading( double dAmp, u_short *pwShading, int iGain )
}
/**
*
*/
static void usb_PrepareCalibration( pPlustek_Device dev )
{
@ -2052,12 +2003,14 @@ static int usb_DoCalibration( pPlustek_Device dev )
/* Go to shading position
*/
DBG( _DBG_INFO, "goto shading position\n" );
if( !(hw->bReg_0x26 & _ONE_CH_COLOR)) {
DBG( _DBG_INFO, "goto shading position\n" );
/* HEINER: Currently not clear why Plustek didn't use the ShadingOriginY
* for all modes
* It should be okay to remove this and reference to the ShadingOriginY
*/
/* HEINER: Currently not clear why Plustek didn't use the ShadingOriginY
* for all modes
* It should be okay to remove this and reference to the ShadingOriginY
*/
#if 0
if( scanning->sParam.bSource == SOURCE_Negative ) {
@ -2071,21 +2024,22 @@ static int usb_DoCalibration( pPlustek_Device dev )
} else {
#endif
DBG( _DBG_INFO, "ShadingOriginY=%lu\n",
DBG( _DBG_INFO, "ShadingOriginY=%lu\n",
(u_long)dev->usbDev.pSource->ShadingOriginY );
if((hw->motorModel == MODEL_HuaLien) && (scaps->OpticDpi.x == 600)) {
if (!usb_ModuleMove(dev, MOVE_ToShading,
if((hw->motorModel == MODEL_HuaLien) && (scaps->OpticDpi.x==600)) {
if (!usb_ModuleMove(dev, MOVE_ToShading,
(u_long)dev->usbDev.pSource->ShadingOriginY)) {
return _E_LAMP_NOT_IN_POS;
}
} else {
if( !usb_ModuleMove(dev, MOVE_Forward,
return _E_LAMP_NOT_IN_POS;
}
} else {
if( !usb_ModuleMove(dev, MOVE_Forward,
(u_long)dev->usbDev.pSource->ShadingOriginY)) {
return _E_LAMP_NOT_IN_POS;
return _E_LAMP_NOT_IN_POS;
}
}
}
/* }*/
/* }*/
}
DBG( _DBG_INFO, "shading position reached\n" );

Wyświetl plik

@ -11,7 +11,7 @@
* Original code taken from sane-0.71<br>
* Copyright (C) 1997 Hypercore Software Design, Ltd.<br>
* Also based on the work done by Rick Bronson<br>
* Copyright (C) 2000-2002 Gerhard Jaeger <gerhard@gjaeger.de><br>
* Copyright (C) 2000-2003 Gerhard Jaeger <gerhard@gjaeger.de><br>
*
* History:
* - 0.30 - initial version
@ -57,6 +57,7 @@
* - 0.45 - added additional flags
* - added WIFSIGNALED to check result of child termination
* - changed readImage interface for USB devices
* - homeing of USB scanner is now working correctly
*.
* <hr>
* This file is part of the SANE package.
@ -130,7 +131,7 @@
#include "sane/sanei.h"
#include "sane/saneopts.h"
#define BACKEND_VERSION "0.45-5"
#define BACKEND_VERSION "0.45-6"
#define BACKEND_NAME plustek
#include "sane/sanei_backend.h"
#include "sane/sanei_config.h"
@ -442,7 +443,6 @@ static SANE_Bool getReaderProcessExitCode( Plustek_Scanner *scanner )
}
/**
*
*/
static SANE_Status close_pipe( Plustek_Scanner *scanner )
{
@ -458,7 +458,6 @@ static SANE_Status close_pipe( Plustek_Scanner *scanner )
}
/**
*
*/
static void sig_chldhandler( int signo )
{
@ -467,26 +466,26 @@ static void sig_chldhandler( int signo )
/** signal handler to kill the child process
*/
static RETSIGTYPE reader_process_sigterm_handler( int signal )
static RETSIGTYPE reader_process_sigterm_handler( int signo )
{
DBG( _DBG_PROC, "reader_process: terminated by signal %d\n", signal );
DBG( _DBG_PROC, "reader_process: terminated by signal %d\n", signo );
_exit( SANE_STATUS_GOOD );
}
static RETSIGTYPE usb_reader_process_sigterm_handler( int signal )
static RETSIGTYPE usb_reader_process_sigterm_handler( int signo )
{
DBG( _DBG_PROC, "reader_process: terminated by signal %d\n", signal );
DBG( _DBG_PROC, "reader_process: terminated by signal %d\n", signo );
cancelRead = SANE_TRUE;
}
static RETSIGTYPE sigalarm_handler( int signal )
static RETSIGTYPE sigalarm_handler( int signo )
{
_VAR_NOT_USED( signal );
_VAR_NOT_USED( signo );
DBG( _DBG_PROC, "ALARM!!!\n" );
}
/** executed as a child process
* read the data from the driver and send the to the parent process
* read the data from the driver and send them to the parent process
*/
static int reader_process( Plustek_Scanner *scanner, int pipe_fd )
{
@ -589,7 +588,7 @@ static SANE_Status do_cancel( Plustek_Scanner *scanner, SANE_Bool closepipe )
if( scanner->reader_pid > 0 ) {
DBG( _DBG_PROC,"killing reader_process\n" );
DBG( _DBG_PROC, ">>>>>>>> killing reader_process <<<<<<<<\n" );
/* tell the driver to stop scanning */
if( _ASIC_IS_USB != scanner->hw->caps.AsicID ) {
@ -1152,7 +1151,8 @@ static SANE_Status attach( const char *dev_name, pCnfDef cnf,
SANE_Status status;
Plustek_Device *dev;
DBG(_DBG_SANE_INIT, "attach (%s, %p, %p)\n", dev_name, cnf, (void *)devp);
DBG( _DBG_SANE_INIT, "attach (%s, %p, %p)\n",
dev_name, (void *)cnf, (void *)devp);
/* already attached ?*/
for( dev = first_dev; dev; dev = dev->next ) {
@ -1556,7 +1556,7 @@ SANE_Status sane_get_devices(const SANE_Device ***device_list,
Plustek_Device *dev;
DBG(_DBG_SANE_INIT, "sane_get_devices (%p, %ld)\n",
device_list, (long) local_only);
(void *)device_list, (long) local_only);
/* already called, so cleanup */
if( devlist )

Wyświetl plik

@ -11,7 +11,7 @@
*
* original code taken from sane-0.71<br>
* Copyright (C) 1997 Hypercore Software Design, Ltd.<br>
* Copyright (C) 2001-2002 Gerhard Jaeger <gerhard@gjaeger.de>
* Copyright (C) 2001-2003 Gerhard Jaeger <gerhard@gjaeger.de>
*
* History:
* - 0.30 - initial version

Wyświetl plik

@ -256,9 +256,24 @@
:interface "USB"
:status :stable
:model "UMAX 3450"
:interface "USB"
:status :stable
:comment "TPA not supported"
:model "UMAX 5400"
:interface "USB"
:status :untested
:status :stable
;* COMPAQ ******************************************************************************************
:mfg "Compaq"
:url "http://www.compaq.com/"
:model "S4-100"
:interface "USB"
:status :stable
:comment "Identical to UMAX 3400"
;* CANON *******************************************************************************************

Wyświetl plik

@ -1,17 +1,19 @@
Plustek-USB-TODO.txt (2003-03-03) Gerhard Jäger <gerhard@gjaeger.de>
Plustek-USB-TODO.txt (2003-05-08) Gerhard Jäger <gerhard@gjaeger.de>
====================================================================
TODO (in general):
- more documentation/comments on the different functions
- Move documents to its correct SANE place
- Move documents to its correct SANE place
- improve calibration
- auto-warmup
- sensor movement speedup
- auto-warmup
- sensor movement speedup ffw/rev
- add plustek.conf presettings to interface for frontends
KNOWN BUGS/Limitations:
Model Description Workaround
------------------------------------------------------------------------------
HP 2100c Straight Line Bug none
EPSON Photo Negative Scanning quality bad none
Canon fine calibration does not work none
@ -21,19 +23,22 @@ Canon 1240 gray mode too bright none
********************************* DONE ***************************************
HP 2100c hits against scan-bed fixed
Genius Devices not recognized fixed
EPSON Photo Permanently warmup on TPA scanning fixed
EPSON Photo Transparency mode does not work fixed
HP 2100c hits against scan-bed fixed
Genius Devices not recognized fixed
EPSON Photo Permanently warmup on TPA scanning fixed
EPSON Photo Transparency mode does not work fixed
correctly
all binary mode does not work correctly done
Canon 16bit gray mode does not work done
EPSON 1250/60 Motor control settings are wrong fixed
CanoScan 1240 added
EPSON + HP vertical line bug fixed
HP blooming on 42bit >=400dpi fixed
all binary mode does not work correctly done
Canon 16bit gray mode does not work done
EPSON 1250/60 Motor control settings are wrong fixed
CanoScan 1240 added
EPSON + HP vertical line bug fixed
HP blooming on 42bit >=400dpi fixed
UMAX5400 bad picture quality fixed
UMAX3400 Straight Line Bug fixed
Make the color modes > 8bit work correctly done
make mono/gray modes work on Canon scanners done
copy picture line by line to backend done
Make the color modes > 8bit work correctly done
make mono/gray modes work on Canon scanners done
copy picture line by line to backend done
cancel function does not work correctly in large resolutions fixed

Wyświetl plik

@ -1,4 +1,4 @@
Plustek-USB.txt (2003-01-11) Gerhard Jäger <gerhard@gjaeger.de>
Plustek-USB.txt (2003-05-08) Gerhard Jäger <gerhard@gjaeger.de>
================================================================
NOTE:
@ -58,7 +58,7 @@ Hewlett Packard
Vendor ID: 0x03F0
Product ID Device-description and status
0x0505 HP Scanjet 2100c - mostly working
0x0505 HP Scanjet 2100c - working
0x0605 HP Scanjet 2200c - working
EPSON
@ -74,8 +74,8 @@ UMAX
Vendor ID: 0x1606
Product ID Device-description and status
0x0060 UMAX 3400/3450 - working
0x0160 UMAX 5400 - not tested
0x0060 UMAX 3400/3450 - working (TPA on 3450 not supported)
0x0160 UMAX 5400 - working
CANON
=====
@ -88,20 +88,6 @@ Product ID Device-description and status
0x220D N670U - mostly working
0x220E N1240U - mostly working
AVISION
=======
Vendor ID: 0x????
Product ID Device-description and status
0x???? AV630CS - not integrated
ARTEC
=====
Vendor ID: 0x????
Product ID Device-description and status
0x???? Artec 1236 - not integrated
How to use and configure the Plustek USB backend
------------------------------------------------
@ -191,6 +177,52 @@ i.e. on SuSE system > 7.x
An alternative way is to use the hotplug utilities.
Using hotplug utilities and libusb
----------------------------------
When using libusb with SANE, then you should also use the hotplug utilities to
automatically setup your device nodes (at least the permissions) and prevent
scanner.o from loading.
Assuming, that these utilites are properly installed on your box, you have
to tweak and add some files.
In directory (where of course the config files reside):
/etc/hotplug
Append the line
scanner
to file
blacklist
This prevents the scanner module from the usb-subsystem to be loaded.
Next thing is to add a new line in
usb.usermap:
usbscanner 0x0003 0x1606 0x0160 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00 000000
The example line shows the vendor ID of UMAX 0x1606 and the product ID of the 5400
0x0160 - these values must match the ones of your scanner.
Last step is adding a script in
/etc/hotplug/usb/
It is called "usbscanner" (don't forget the executable rights)
-------------------------------------------------
# !/bin/bash
if [ "${ACTION}" = add ] && [ -f "${DEVICE}" ]
then
chgrp users "${DEVICE}"
chmod ug+rw "${DEVICE}"
fi
-------------------------------------------------
This script will correct the access right to your scanner device when the device
is plugged in.
Debugging your USB scanner (written by Kev Green)
-------------------------------------------------
@ -407,3 +439,6 @@ Symbols:
CM - Color Mode (unitless), 3 for channel pixel rate color, else 1
-------------------------

Wyświetl plik

@ -1,7 +1,7 @@
Plustek.changes (2003-01-11) Gerhard Jäger <gerhard@gjaeger.de>
Plustek.changes (2003-05-08) Gerhard Jäger <gerhard@gjaeger.de>
===============================================================
V 0.45 (2003-01-10)
V 0.45 (2003-05-08)
- Starting this changelog
- Updates since V 0.44:
@ -10,4 +10,7 @@ V 0.45 (2003-01-10)
* made CanoScan N650U and N670U work
* fixed EPSON 1260 motor killer-bug
* improved TPA scanning
* fixed TPA warmup bug on EPSON 1260/Photo
* fixed Genius device detection problem
* Added Compaq S4-100 (identical to UMAX3400)