On Fri, Jun 01, 2001 at 10:32:56AM +0100, Tim Waugh wrote:
> On Mon, May 28, 2001 at 11:24:37PM +0100, Tim Waugh wrote:
>
> > I think that a step in the right direction would be to have a shared
> > library providing the same functionality as /dev/parport, and have
> > the library use the native OS support if available, and fall back to
> > inb/outb or whatever, failing if not root.
> >
> > (For the special case of collection IEEE 1284 Device IDs, there are
> > other fallbacks to try first involving /proc, and so this should be a
> > part of the interface.)
>
> FWIW, I have made a small start on this. Any suggestions about how
> the interface should look would be greatly appreciated.
>
> Thanks,
> Tim.
> */
I think that the functions might be like:
- sanei_parport_open():
does ioperm/iopl, /dev/io opening when no ppdev support
opens ppdev if available
- sanei_parport_info():
gives info about parport
- sanei_parport_lock() / sanei_parport_unlock():
parport locking, will act as a dummy function if there is no
ppdev, unless OS provides another way of locking
- sanei_parport_set_mode():
sets parport mode . Should be able when needed to effectively
set the mode, and not simply flag the next read/write
- sanei_parport_get_mode():
reads parport current mode
- sanei_parport_inb(), sanei_parport_outb(), sanei_parport_insb(),
sanei_parport_outsb(), sanei_parport_insl(), sanei_parport_outsl():
for raw access.
- sanei_parport_read()/sanei_parport_write():
reads and writes accordingly to the selected mode
- sanei_parport_close()
closes anything opened
Regards,
Stef
-- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
This archive was generated by hypermail 2b29 : Fri Jun 01 2001 - 09:24:46 PDT