kopia lustrzana https://gitlab.com/sane-project/backends
cleanup work.
rodzic
4a8bf3059c
commit
c3f2e4b7a6
|
@ -165,10 +165,12 @@ typedef const struct mode_param
|
||||||
#define _SCANNER_PAPEROUT 0x4000000
|
#define _SCANNER_PAPEROUT 0x4000000
|
||||||
|
|
||||||
/* for GetLensInformation */
|
/* for GetLensInformation */
|
||||||
|
#if 0
|
||||||
#define SOURCE_Reflection 0
|
#define SOURCE_Reflection 0
|
||||||
#define SOURCE_Transparency 1
|
#define SOURCE_Transparency 1
|
||||||
#define SOURCE_Negative 2
|
#define SOURCE_Negative 2
|
||||||
#define SOURCE_ADF 3
|
#define SOURCE_ADF 3
|
||||||
|
#endif
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Section 6 - additional definitions
|
* Section 6 - additional definitions
|
||||||
|
|
|
@ -736,7 +736,7 @@ typedef struct _SCANDEF
|
||||||
ULong dwScanOrigin; /* where to start the scan */
|
ULong dwScanOrigin; /* where to start the scan */
|
||||||
Bool fRefreshState; /* refresh ? */
|
Bool fRefreshState; /* refresh ? */
|
||||||
Bool fMotorBackward;
|
Bool fMotorBackward;
|
||||||
UChar motorPower; /* how to driver the motor */
|
UChar motorPower; /* how to drive the motor */
|
||||||
|
|
||||||
ULong dwMinReadFifo;
|
ULong dwMinReadFifo;
|
||||||
ULong dwMaxReadFifo;
|
ULong dwMaxReadFifo;
|
||||||
|
|
|
@ -556,7 +556,7 @@ static int ioP98ReadWriteTest( pScanData ps )
|
||||||
IODataToRegister( ps, ps->RegMemoryHigh, 0 );
|
IODataToRegister( ps, ps->RegMemoryHigh, 0 );
|
||||||
|
|
||||||
/* fill to buffer */
|
/* fill to buffer */
|
||||||
IOMoveDataToScanner( ps, buffer, 1280 );
|
IOMoveDataToScanner( ps, buffer, _MEMTEST_SIZE );
|
||||||
|
|
||||||
IODataToRegister( ps, ps->RegModeControl, _ModeMappingMem );
|
IODataToRegister( ps, ps->RegModeControl, _ModeMappingMem );
|
||||||
IODataToRegister( ps, ps->RegMemoryLow, 0 );
|
IODataToRegister( ps, ps->RegMemoryLow, 0 );
|
||||||
|
|
|
@ -69,8 +69,7 @@ static RegDef p12CcdStop[] = {
|
||||||
|
|
||||||
/*************************** local functions *********************************/
|
/*************************** local functions *********************************/
|
||||||
|
|
||||||
/*.............................................................................
|
/** init the stuff according to the buttons
|
||||||
* init the stuff according to the buttons
|
|
||||||
*/
|
*/
|
||||||
static void p12ButtonSetup( pScanData ps, Byte nrOfButtons )
|
static void p12ButtonSetup( pScanData ps, Byte nrOfButtons )
|
||||||
{
|
{
|
||||||
|
@ -84,12 +83,11 @@ static void p12ButtonSetup( pScanData ps, Byte nrOfButtons )
|
||||||
ps->sCaps.dwFlag |= (SFLAG_MULTIFUNC | SFLAG_BUTTONOPT);
|
ps->sCaps.dwFlag |= (SFLAG_MULTIFUNC | SFLAG_BUTTONOPT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*.............................................................................
|
/** According to what we have detected, set the other stuff
|
||||||
* According to what we have detected, set the other stuff
|
|
||||||
*/
|
*/
|
||||||
static void p12InitiateComponentModel( pScanData ps )
|
static void p12InitiateComponentModel( pScanData ps )
|
||||||
{
|
{
|
||||||
/* preset some stuff and do te differences later */
|
/* preset some stuff and do the differences later */
|
||||||
ps->Device.buttons = 0;
|
ps->Device.buttons = 0;
|
||||||
ps->Device.Model1Mono = _BUTTON_MODE + _CCD_SHIFT_GATE + _SCAN_GRAYTYPE;
|
ps->Device.Model1Mono = _BUTTON_MODE + _CCD_SHIFT_GATE + _SCAN_GRAYTYPE;
|
||||||
ps->Device.Model1Color = _BUTTON_MODE + _CCD_SHIFT_GATE;
|
ps->Device.Model1Color = _BUTTON_MODE + _CCD_SHIFT_GATE;
|
||||||
|
|
|
@ -163,13 +163,7 @@ typedef long long TimerDef, *pTimerDef;
|
||||||
* timer topics
|
* timer topics
|
||||||
*/
|
*/
|
||||||
#ifndef __KERNEL__
|
#ifndef __KERNEL__
|
||||||
#if 0
|
|
||||||
# warning "outb as delay!!!!"
|
|
||||||
# define _DO_UDELAY(usecs) { int i; for( i = usecs; i--; ) outb(0, 0x80); }
|
|
||||||
#else
|
|
||||||
# define _DO_UDELAY(usecs) sanei_pp_udelay(usecs)
|
# define _DO_UDELAY(usecs) sanei_pp_udelay(usecs)
|
||||||
#endif
|
|
||||||
|
|
||||||
# define _DODELAY(msecs) { int i; for( i = msecs; i--; ) _DO_UDELAY(1000); }
|
# define _DODELAY(msecs) { int i; for( i = msecs; i--; ) _DO_UDELAY(1000); }
|
||||||
#else
|
#else
|
||||||
# define _DO_UDELAY(usecs) udelay(usecs)
|
# define _DO_UDELAY(usecs) udelay(usecs)
|
||||||
|
|
|
@ -103,34 +103,6 @@ typedef struct {
|
||||||
/*
|
/*
|
||||||
* here we have some structs internally used
|
* here we have some structs internally used
|
||||||
*/
|
*/
|
||||||
/* CHECK: replace current stuff by this - looks much better !!! */
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
typedef struct _IMAGESIZE
|
|
||||||
{
|
|
||||||
DWORD dwPixels;
|
|
||||||
DWORD dwBytes;
|
|
||||||
DWORD dwLines;
|
|
||||||
DWORD dwBytesCh;
|
|
||||||
} IMAGESIZE, *PIMAGESIZE;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _IMAGEDEF
|
|
||||||
{
|
|
||||||
IMAGESIZE Image;
|
|
||||||
DWORD dwVxDFlag;
|
|
||||||
DWORD dwScanFlag;
|
|
||||||
CROPRECT Area;
|
|
||||||
XY Dpi;
|
|
||||||
WORD wDataType;
|
|
||||||
WORD wBrightness;
|
|
||||||
WORD wPhyDpiY;
|
|
||||||
WORD wResult;
|
|
||||||
WORD Reserved;
|
|
||||||
} IMAGEDEF, *PIMAGEDEF;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ULong dwVxdFlag;
|
ULong dwVxdFlag;
|
||||||
ULong dwScanFlag;
|
ULong dwScanFlag;
|
||||||
|
|
|
@ -324,9 +324,7 @@ static int ppDev_setMap( Plustek_Device *dev, SANE_Word *map,
|
||||||
ioctl( dev->fd, _PTDRV_SETMAP, &m );
|
ioctl( dev->fd, _PTDRV_SETMAP, &m );
|
||||||
|
|
||||||
/* we ignore the return values */
|
/* we ignore the return values */
|
||||||
|
|
||||||
free( buf );
|
free( buf );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue