This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Keyboard and mouse drivers for eCos
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Chris Garry <cgarry at sweeneydesign dot co dot uk>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: Tue, 15 Jul 2003 15:32:44 +0200
- Subject: Re: [ECOS] Keyboard and mouse drivers for eCos
- References: <00bf01c34ad4$7e12a860$500ba8c0@jasper>
On Tue, Jul 15, 2003 at 02:25:00PM +0100, Chris Garry wrote:
> I've been working on a VNC server for eCos, and need to add keyboard
> and mouse drivers. Is there a standard API for these drivers in eCos?
>
> For example:
> I can open my mouse device with something like:
>
> int mouse_fd;
> mouse_fd = open("/dev/vnc_mouse", O_RDONLY | O_NONBLOCK);
>
> but what form should the data from the read operation take:
>
> int bytes_read;
> char data[8];
> bytes_read = read(mouse_fd, data, 8);
>
> If there isn't a standard, does anybody have any ideas for a suitable format?
Take a look at packages/devs/kbd/arm/* and packages/devs/touch
That might give you some ideas. Basically, these devices are just char
devices in the good old unix sense.
What you layer above that would depend on the application and probably
the type of mouse on the other end etc.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss