Tim Waugh (tim@cyberelk.demon.co.uk)
Wed, 9 Jun 1999 15:59:04 +0100 (GMT)
On Wed, 9 Jun 1999, Sven Geggus wrote:
> What I would like to do exactly is to enable users connecting a printer or
> my device just as they need them.
Take a look at lp, plip, and so on. Basically, you get your driver to use
parport_enumerate to find out what ports there are,
parport_register_device to say that you have a device on a particular port
that you want to drive, and parport_claim to get hold of the port in order
to use it. While you have the port claimed, no other drivers can
interfere with it. When you've finished a small chunk of work, you can
release the port to let other drivers have a chance.
The fiddly bits are to do with clever sharing -- you can allow other
drivers to preempt you if you like, in which case it's wise to provide
preempt/wakeup functions.
To actually mess with the port registers, there are macros like
parport_write_control and parport_read_status to do the job.
Tim.
*/
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2.0b3 on Wed 09 Jun 1999 - 12:05:00 EDT