summaryrefslogtreecommitdiff
path: root/backend/plustek-pp_io.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-02-12 17:35:53 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-02-12 17:35:53 +0100
commit84357741a6a6e6430f199b2c3f7498e0e97da9ad (patch)
tree23e8d66ede9506b94c76fb36910ca3c7dd15c74e /backend/plustek-pp_io.c
parent302276dc1b90cfc972fb726ca94a23b18f4b0088 (diff)
New upstream version 1.2.1upstream/1.2.1upstream
Diffstat (limited to 'backend/plustek-pp_io.c')
-rw-r--r--backend/plustek-pp_io.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/backend/plustek-pp_io.c b/backend/plustek-pp_io.c
index af3e8c4..45ffe8b 100644
--- a/backend/plustek-pp_io.c
+++ b/backend/plustek-pp_io.c
@@ -257,21 +257,11 @@ static Bool fnEPPRead( pScanData ps, pUChar pBuffer, ULong ulSize )
if( _IS_ASIC98(ps->sCaps.AsicID)) {
-#ifndef __KERNEL__
sanei_pp_set_datadir( ps->pardev, SANEI_PP_DATAIN );
-#else
- _OUTB_CTRL( ps, (_CTRL_GENSIGNAL + _CTRL_DIRECTION));
- _DO_UDELAY( 1 );
-#endif
for( i = 0; i < ulSize; i++ )
pBuffer[i] = _INB_EPPDATA( ps );
-#ifndef __KERNEL__
sanei_pp_set_datadir( ps->pardev, SANEI_PP_DATAOUT );
-#else
- _OUTB_CTRL( ps, _CTRL_GENSIGNAL );
- _DO_UDELAY( 1 );
-#endif
} else {
for( i = 0; i < ulSize; i++ )
@@ -290,18 +280,12 @@ static Bool fnBiDirRead( pScanData ps, pUChar pBuffer, ULong ulSize )
start = _CTRL_START_BIDIREAD;
end = _CTRL_END_BIDIREAD;
-#ifndef __KERNEL__
sanei_pp_set_datadir( ps->pardev, SANEI_PP_DATAIN );
if( !sanei_pp_uses_directio()) {
start &= ~_CTRL_DIRECTION;
end &= ~_CTRL_DIRECTION;
}
-#else
- if( _IS_ASIC98(ps->sCaps.AsicID)) {
- _OUTB_CTRL( ps, (_CTRL_GENSIGNAL + _CTRL_DIRECTION));
- }
-#endif
switch( ps->IO.delay ) {
@@ -341,13 +325,7 @@ static Bool fnBiDirRead( pScanData ps, pUChar pBuffer, ULong ulSize )
}
-#ifndef __KERNEL__
sanei_pp_set_datadir( ps->pardev, SANEI_PP_DATAOUT );
-#else
- if( _IS_ASIC98(ps->sCaps.AsicID)) {
- _OUTB_CTRL( ps, _CTRL_GENSIGNAL );
- }
-#endif
return _TRUE;
}
@@ -953,45 +931,4 @@ _LOC void IOReadScannerImageData( pScanData ps, pUChar pBuf, ULong size )
ps->OpenScanPath( ps );
}
-#ifdef __KERNEL__
-
-/** the wrapper functions to support delayed and non-delayed I/O
- */
-_LOC void IOOut( Byte data, UShort port )
-{
- DBG( DBG_IOF, "outb(0x%04x, 0x%02x)\n", port, data );
- outb( data, port );
-}
-
-_LOC void IOOutDelayed( Byte data, UShort port )
-{
- DBG( DBG_IOF, "outb_p(0x%04x, 0x%02x)\n", port, data );
- outb_p( data, port );
-}
-
-_LOC Byte IOIn( UShort port )
-{
-#ifdef DEBUG
- Byte data = inb( port );
-
- DBG( DBG_IOF, "inb(0x%04x) = 0x%02x\n", port, data );
- return data;
-#else
- return inb( port );
-#endif
-}
-
-_LOC Byte IOInDelayed( UShort port )
-{
-#ifdef DEBUG
- Byte data = inb_p( port );
-
- DBG( DBG_IOF, "inb_p(0x%04x) = 0x%02x\n", port, data );
- return data;
-#else
- return inb_p( port );
-#endif
-}
-#endif /* guard __KERNEL__ */
-
/* END PLUSTEK-PP_IO.C ......................................................*/