This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: PS/2 Keyboard as I/O device
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Chuck McManis <ecos at mcmanis dot com>
- Cc: ECOS Discussion Group <ecos-discuss at sources dot redhat dot com>
- Date: 11 Aug 2003 06:12:02 -0600
- Subject: Re: [ECOS] PS/2 Keyboard as I/O device
- Organization: MLB Associates
- References: <5.2.1.1.2.20030810100930.01a19828@209.66.107.193>
On Sun, 2003-08-10 at 11:13, Chuck McManis wrote:
> Hello,
>
> Here are my thoughts on implementing a PS/2 device driver (keyboard and
> mice). I have some PS/2 support at the HAL layer that provides a simple
> read/write byte protocol (think a serial port only dumber :-) and I'm
> building a keyboard meta device and mouse meta device over that layer. The
> thought being that if ps2 peripherals existed on platforms other than PCs
> one could still use the keyboard and mouse layers. Thoughts? Should I not
> bother and just leave this stuff in my application?
>
We've done this before for some other platforms. Most of them actually
have a pseudo-tty device in the HAL (i.e. something which behaves much
like a serial port, providing input via the keyboard and output via a
screen). Many also export the device using the eCos I/O layer. In this
case, the actual device may be split up into /dev/kdb. The most common
use for such a device is with a windowing application (e.g. one that
uses MicroWindows), in which case what the /dev/kdb device exports is
a stream of event packets corresponding to the key up/down events.
Look in devs/kdb and devs/touch to see examples.
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss