[Linux-parport] EPP writing address

Tim Waugh twaugh at redhat.com
Wed Jan 28 10:38:55 GMT 2004


On Wed, Jan 28, 2004 at 09:55:04AM +0100, Alessio PICCIOLI wrote:

> In EPP mode with ppdev module how can i dinstinguish using write command 
> between writing data and writing address ? 
> 
>  fd = fopen ( "/dev/parport0" , 0_RDWR ) ;
>  ioctl ( fd, PPCLAIM ) ;
>  int mode ;
>  mode = IEEE1284_MODE_EPP ;
>  ioctl ( fd , &mode ) ;
> 
>  /* WRITING DATA */ 
> 
>  write ( fd , const void *ptr , 1 ) ; 
> 
>  /* WRITING ADDRESS */ 

Set the IEEE1284_ADDR bit in 'mode' and set the mode again --
presumably you know you missed a PPSETMODE in the above ioctl.

Tim.
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-parport/attachments/20040128/d575a814/attachment.bin


More information about the Linux-parport mailing list