On Wednesday 04 April 2001 07:35, Kalyanaraman, Sivakumar (CTS) wrote:

> > Hi,
>
> sorry if  i sound foolish, the question is as  follows.
>
> how do i read the keyboard from a RT application ? I do not want to use a
> user-space thread that reads and sends me info thru a FIFO.
> since it is a PC, do I read the keyboard controller ports (60H-63H)
> directly ? will this work ??

It should, but you'd probably have to disengage the Linux keyboard ISR to get 
it to work properly. (That is, don't share the IRQ with Linux, as the 
standard driver would mess up you communication with the keyboard.)


> Or can the linux device drivers be used for this in any way ???

Well, yeah, bet it won't be more real time than the kernel driver. I'm not 
sure how, or if it can be done without hacking the Linux driver, but it 
should be possible to install some hook for RTL to use. Beware of the sync 
issues, though; the kernel driver code probably can't run safely in RTL 
context, so direct calls are out!

The easiest way would probably be to connect one (or two, if you need to talk 
to the keyboard as well) RTL FIFOs to some hack in the driver to interface 
with your RTL threads. Not sure about the blocking and waking up stuff here, 
but it shouldn't be a problem; the RTL APIs you need are available AFAIK.


//David

.- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> [EMAIL PROTECTED] -'
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to