Re: Treating parallel port as serial device

From: Christopher Friesen (cfriesen@nortelnetworks.com)
Date: Tue Aug 28 2001 - 15:38:50 EST


Tony Hoyle wrote:

> What I need now is a driver that can read the input from a pin on the
> parallel port and treat it as serial input. It sounds like the kind of
> project that would have been done before, but I can't find anything that
> even comes close. Userspace probably wouldn't cut it as I'm reading as
> 9600 baud and usleep doesn't have nearly enough resolution.

Unless you need to drive this based on interrupts or you need to do other stuff
at the same time, you can use either SCHED_FIFO or SCHED_RR and nanosleep() from
userspace.

According to the man page, nanosleep() will busywait for pauses under 2ms if you
use one of the two realtime schedulers.

Chris

-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Aug 31 2001 - 21:00:31 EST