[sane-devel] CanoScan Lide 110 on Solaris 10 (10/09) SPARC

stef stef.dev at free.fr
Thu Mar 17 05:22:31 UTC 2011


Le Wednesday 16 March 2011 23:34:18 Olaf Zimmermann, vous avez écrit :
> On Wed, 2011-03-16 at 21:20, stef wrote:
> > 	Hello,
> > 	
> > 	patch will be welcome. I didn't knew bsuint16, and it seems no backend
> > 
> > use it.
> 
> ;-)
> 
> *** backend/genesys_low.c.orig  Wed Mar 16 11:10:54 2011
> --- backend/genesys_low.c       Wed Mar 16 20:38:14 2011
> ***************
> *** 65,70 ****
> --- 65,79 ----
>   #include "../include/_stdint.h"
>   #include "genesys_low.h"
> 
> + uint16_t bsuint16(uint16_t v)
> + {
> + #ifdef WORDS_BIGENDIAN
> +     return (v << 8) | (v >> 8);
> + #else
> +     return(v);
> + #endif
> + }
> +
>   /*
> ------------------------------------------------------------------------
> */
>   /*                  functions calling ASIC specific
> functions               */
>   /*
> ------------------------------------------------------------------------
> */
> ***************
> *** 262,272 ****
>            reg, sane_strstatus (status));
>         return status;
>       }
> !   *val=value & 0xff;
>     DBG( DBG_io2,
> "sanei_genesys_read_hregister(0x%02x)=0x%02x\n",reg,value & 0xff);
> 
>     /* check usb link status */
> !   if((value & 0xff00) != 0x5500)
>       {
>         DBG (DBG_error,"sanei_genesys_read_hregister: invalid read,
> scanner unplugged ?\n");
>         status=SANE_STATUS_IO_ERROR;
> --- 271,281 ----
>            reg, sane_strstatus (status));
>         return status;
>       }
> !   *val=bsuint16(value) & 0xff;
>     DBG( DBG_io2,
> "sanei_genesys_read_hregister(0x%02x)=0x%02x\n",reg,value & 0xff);
> 
>     /* check usb link status */
> !   if((bsuint16(value) & 0xff00) != 0x5500)
>       {
>         DBG (DBG_error,"sanei_genesys_read_hregister: invalid read,
> scanner unplugged ?\n");
>         status=SANE_STATUS_IO_ERROR;
> ***************
> *** 384,394 ****
>            reg, sane_strstatus (status));
>         return status;
>       }
> !   *val=value & 0xff;
>     DBG( DBG_io2,
> "sanei_genesys_read_gl847_register(0x%02x)=0x%02x\n",reg,value & 0xff);
> 
>     /* check usb link status */
> !   if((value & 0xff00) != 0x5500)
>       {
>         DBG (DBG_error,"sanei_genesys_read_gl847_register: invalid read,
> scanner unplugged ?\n");
>         status=SANE_STATUS_IO_ERROR;
> --- 393,403 ----
>            reg, sane_strstatus (status));
>         return status;
>       }
> !   *val=bsuint16(value) & 0xff;
>     DBG( DBG_io2,
> "sanei_genesys_read_gl847_register(0x%02x)=0x%02x\n",reg,value & 0xff);
> 
>     /* check usb link status */
> !   if((bsuint16(value) & 0xff00) != 0x5500)
>       {
>         DBG (DBG_error,"sanei_genesys_read_gl847_register: invalid read,
> scanner unplugged ?\n");
>         status=SANE_STATUS_IO_ERROR;

	Hello,

	I've applied it.

Thanks,
	Stef



More information about the sane-devel mailing list