Subject: wscons attachment
To: None <tech-kern@NetBSD.ORG>
From: Lennart Augustsson <augustss@cs.chalmers.se>
List: tech-kern
Date: 07/25/1998 17:06:43
I've been doing wscons attachments for USB mice and keyboards and
I have some observations about the design of it.

First, attaching a mouse and a keyboard looks slightly different.
In the mouse case the "method table", struct wsmouse_accessops, is passed
as a part of the attach argument.  In the keyboard case the methods are part
of the attach argument.  I think the mouse method is nicer.

Second, the mouse methods inclued enable&disable methods that are
called on open and close.  The keyboard has no corresponding routines.
Again, I prefer the mouse way, since I need those enable&disable
methods to open and close the interrupt pipe to the keyboard.

Third, this is just a minor not.  The mouse timestamp has clock tick
resolution, whereas the keyboard uses microseconds.

Comments?  Is there any chance of having the keyboard attach look more
like the mouse?

        -- Lennart