kopia lustrzana https://gitlab.com/sane-project/backends
Minor fix for startup reset.
Removed unnecessary calls to usbio_ResetLM983x().merge-requests/1/head
rodzic
168204528d
commit
a79e3e83f6
|
@ -40,6 +40,8 @@
|
|||
* - 0.48 - added function usb_CheckAndCopyAdjs()
|
||||
* - 0.49 - changed autodetection
|
||||
* - added support for LiDE25 (pid 0x2220)
|
||||
* - 0.50 - minor fix for startup reset
|
||||
* removed unnecessary calls to usbio_ResetLM983x()
|
||||
* .
|
||||
* <hr>
|
||||
* This file is part of the SANE package.
|
||||
|
@ -167,7 +169,7 @@ static void usb_CheckAndCopyAdjs( Plustek_Device *dev )
|
|||
/**
|
||||
* assign the values to the structures used by the currently found scanner
|
||||
*/
|
||||
static void usb_initDev( pPlustek_Device dev, int idx, int handle, int vendor )
|
||||
static void usb_initDev( Plustek_Device *dev, int idx, int handle, int vendor )
|
||||
{
|
||||
char *ptr;
|
||||
char tmp_str1[PATH_MAX];
|
||||
|
@ -261,7 +263,6 @@ static void usb_initDev( pPlustek_Device dev, int idx, int handle, int vendor )
|
|||
if( dev->initialized >= 0 )
|
||||
return;
|
||||
|
||||
usbio_ResetLM983x ( dev );
|
||||
usb_IsScannerReady( dev );
|
||||
|
||||
sParam.bBitDepth = 8;
|
||||
|
@ -306,7 +307,7 @@ static void usb_initDev( pPlustek_Device dev, int idx, int handle, int vendor )
|
|||
/**
|
||||
* will be used for retrieving a Plustek device
|
||||
*/
|
||||
static int usb_CheckForPlustekDevice( int handle, pPlustek_Device dev )
|
||||
static int usb_CheckForPlustekDevice( int handle, Plustek_Device *dev )
|
||||
{
|
||||
char tmp[50];
|
||||
char pcbStr[10];
|
||||
|
@ -320,9 +321,7 @@ static int usb_CheckForPlustekDevice( int handle, pPlustek_Device dev )
|
|||
*/
|
||||
DBG( _DBG_INFO, "Trying to get the pcbID of a Plustek device...\n" );
|
||||
|
||||
/*
|
||||
* get the PCB-ID
|
||||
*/
|
||||
/* get the PCB-ID */
|
||||
result = sanei_lm983x_read( handle, 0x59, reg59s, 3, SANE_TRUE );
|
||||
if( SANE_STATUS_GOOD != result ) {
|
||||
sanei_usb_close( handle );
|
||||
|
@ -402,11 +401,9 @@ static void usbDev_shutdown( Plustek_Device *dev )
|
|||
DBG( _DBG_INFO, "Switching lamp off...\n" );
|
||||
usb_LampOn( dev, SANE_FALSE, SANE_FALSE );
|
||||
}
|
||||
|
||||
dev->fd = -1;
|
||||
sanei_usb_close( handle );
|
||||
}
|
||||
|
||||
usb_StopLampTimer( dev );
|
||||
}
|
||||
|
||||
|
@ -427,7 +424,6 @@ static SANE_Bool usb_IsDeviceInList( char *usbIdStr )
|
|||
if( 0 == strncmp( Settings[i].pIDString, usbIdStr, 13 ))
|
||||
return SANE_TRUE;
|
||||
}
|
||||
|
||||
return SANE_FALSE;
|
||||
}
|
||||
|
||||
|
@ -700,9 +696,10 @@ static int usbDev_open( Plustek_Device *dev, DevList *devs, int keep_lock )
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* need to set the handle and the detected chiptype... */
|
||||
dev->fd = handle;
|
||||
usbio_ResetLM983x ( dev );
|
||||
usb_IsScannerReady( dev );
|
||||
dev->usbDev.HwSetting.chip = (version==3 ? _LM9831:_LM9832);
|
||||
usbio_ResetLM983x( dev );
|
||||
dev->fd = -1;
|
||||
|
||||
dev->usbDev.vendor = vendor;
|
||||
|
@ -783,7 +780,7 @@ static int usbDev_close( Plustek_Device *dev )
|
|||
*/
|
||||
static int usbDev_getCaps( Plustek_Device *dev )
|
||||
{
|
||||
pDCapsDef scaps = &dev->usbDev.Caps;
|
||||
DCapsDef *scaps = &dev->usbDev.Caps;
|
||||
|
||||
DBG( _DBG_INFO, "usbDev_getCaps()\n" );
|
||||
|
||||
|
@ -803,7 +800,7 @@ static int usbDev_getCaps( Plustek_Device *dev )
|
|||
/** usbDev_getCropInfo
|
||||
* function to set the image relevant stuff
|
||||
*/
|
||||
static int usbDev_getCropInfo( Plustek_Device *dev, pCropInfo ci )
|
||||
static int usbDev_getCropInfo( Plustek_Device *dev, CropInfo *ci )
|
||||
{
|
||||
WinInfo size;
|
||||
|
||||
|
@ -862,7 +859,7 @@ static int usbDev_setMap( Plustek_Device *dev, SANE_Word *map,
|
|||
|
||||
/**
|
||||
*/
|
||||
static int usbDev_setScanEnv( Plustek_Device *dev, pScanInfo si )
|
||||
static int usbDev_setScanEnv( Plustek_Device *dev, ScanInfo *si )
|
||||
{
|
||||
DCapsDef *caps = &dev->usbDev.Caps;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue