summaryrefslogtreecommitdiff
path: root/sanei/sanei_lm983x.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 16:59:49 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 16:59:49 +0200
commit1687222e1b9e74c89cafbb5910e72d8ec7bfd40f (patch)
treed78102ce30207c63e7608eeba743efd680c888dc /sanei/sanei_lm983x.c
parent58912f68c2489bcee787599837447e0d64dfd61a (diff)
New upstream version 1.0.28upstream/1.0.28
Diffstat (limited to 'sanei/sanei_lm983x.c')
-rw-r--r--sanei/sanei_lm983x.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sanei/sanei_lm983x.c b/sanei/sanei_lm983x.c
index 5b41985..62dfad9 100644
--- a/sanei/sanei_lm983x.c
+++ b/sanei/sanei_lm983x.c
@@ -4,7 +4,7 @@
Copyright (C) 2002-2004 Gerhard Jaeger <gerhard@gjaeger.de>
This file is part of the SANE package.
-
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
@@ -96,20 +96,20 @@ sanei_lm983x_write( SANE_Int fd, SANE_Byte reg,
DBG( 15, "sanei_lm983x_write: fd=%d, reg=%d, len=%d, increment=%d\n", fd,
reg, len, increment);
-
+
if( reg > _LM9831_MAX_REG ) {
DBG( 1, "sanei_lm983x_write: register out of range (%u>%u)\n",
reg, _LM9831_MAX_REG );
return SANE_STATUS_INVAL;
}
-
+
for( bytes = 0; len > 0; ) {
max_len = _MIN( len, _MAX_TRANSFER_SIZE );
command_buffer[0] = 0; /* write */
command_buffer[1] = reg; /* LM983x register */
-
+
if( increment == SANE_TRUE ) {
command_buffer[0] += 0x02; /* increase reg? */
command_buffer[1] += bytes;
@@ -122,7 +122,7 @@ sanei_lm983x_write( SANE_Int fd, SANE_Byte reg,
size = (max_len + _CMD_BYTE_CNT);
result = sanei_usb_write_bulk( fd, command_buffer, &size );
-
+
if( SANE_STATUS_GOOD != result )
return result;
@@ -183,7 +183,7 @@ sanei_lm983x_read( SANE_Int fd, SANE_Byte reg,
if( SANE_STATUS_GOOD != result )
return result;
-
+
if( size != _CMD_BYTE_CNT) {
DBG( 1, "sanei_lm983x_read: short write while writing command "
"(%d/_CMD_BYTE_CNT)\n", result);
@@ -228,7 +228,7 @@ SANE_Bool sanei_lm983x_reset( SANE_Int fd )
DBG( 15, "sanei_lm983x_reset()\n" );
for( i = 0; i < _MAX_RETRY; i++ ) {
-
+
/* Read the command register and check that the reset bit is not set
* If it is set, clear it and return false to indicate that
* the bit has only now been cleared