diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-02-12 17:36:10 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-02-12 17:36:10 +0100 |
commit | e0d94cf4d39395df1e2c6bb4d967200298c13881 (patch) | |
tree | be5c7cace6697afc753c152d13ad5145d0884a42 /backend/plustek-pp_io.c | |
parent | 527bedac30eb120915718eb7997e6dacd583512e (diff) | |
parent | 84357741a6a6e6430f199b2c3f7498e0e97da9ad (diff) |
Update upstream source from tag 'upstream/1.2.1'
Update to upstream version '1.2.1'
with Debian dir a9bb43f754a5c9a361b076af3635cc767b7e652e
Diffstat (limited to 'backend/plustek-pp_io.c')
-rw-r--r-- | backend/plustek-pp_io.c | 63 |
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 ......................................................*/ |