[sane-devel] EPP write with sanei_pp

Gerhard Jaeger gerhard@gjaeger.de
Mon, 25 Apr 2005 11:43:21 +0200


On Monday 25 April 2005 06:27, Anderson Lizardo wrote:
> Gerhard Jaeger wrote:
> > first try and use the sanei_pp_outb_data function. if this does not work,
> > extend the sanei_pp lib by the needed functionality.
> 
> Tested, and it didn't work ;). Attached a (fairly simple) patch that
> adds the "sanei_pp_outb_epp" function.
> 
> Now I have geniusvp2 using sanei_pp and (hopefully) portable. I've
> noticed some performance loss though, if compared to the old ppdev code.
> I'm not sure if it's because the sanei_pp have "one-byte-per-call"
> functions only (and in fact I had to implement a loop on my code so I
> can write multiple bytes) or if it's overhead of the libieee1284 library
> itself.
> 
> > Don't use the libieee directly!
> 
> I'm not sure why not. Is it for better portability?
> 
> > AFAIR epp_write_data will be called inside the libieee, when the port
> > is set to EPP mode! In the end, write data for SPP/EPP should be the
> > same function, as they use the same port!
> 
> AFAIK, SPP data port is base+0 while EPP data port is base+4, and in EPP
> mode both are accessible, so when I tried to use sanei_pp_outb_data
> function I suppose it was trying to write to base+0.

Oh man, of course you're right, I missed that somehow :(
I have applied your patch and extended, so that the sanei_pp could
be used without libieee, simply by using in/out stuff, at least
on a x86 machine.

Please, if you need more functionality, i.e. bulk read/write, extend
the lib and send a patch. But please don't forget the non-libieee code!

Gerhard





>