From: Vojtech P. <vo...@su...> - 2002-04-15 12:15:05
|
On Mon, Apr 15, 2002 at 08:41:33PM +1000, Brad Hards wrote: > On Mon, 15 Apr 2002 17:40, Vojtech Pavlik wrote: > > Yes, if this is cleaner. I have much bigger worries about the size of > > 'long' in EVIOCGBIT and /proc/bus/input/devices output on archs that > > support mixed 32/64-bit binaries (SPARC, PPC, x86-64). > Oh. Ugly. Yeah. setbit() et al work on longs, and longs are OK in an API which isn't on a mixed 32/64-bit arch. But since the 32/64 bit stuff happens, it gets pretty ugly. > I thought that those definitions were purely internal - I hadn't got that far > into the detail of the API. Unfortunately they are not - they can't be - apps need to know what valuators, keys, whatever the device has. > I'll continue along with the documentation/tutorial, and raise questions / > patches as appropriate. > > BTW: The documentation is for USB HID, to try to answer questions for > developers of products and userspace apps. > It covers hiddev, evdev, joystick (including force feedback), mouse and > keyboard. God bless you for that. It is really needed. And I never can get me to write docs. :( > I am doing hiddev and evdev in detail, since I think these are basically > undocumented. I've just done a couple of ioctl examples for each so far. > I am doing joystick by direct reference to the kernel docs - I may copy the > kernel files into the documentation (and docbook them) at a later stage and > add some examples, but the initial work work will be on evdev and hiddev, and > there is plenty there. That's exactly what's needed - actually joydev (and its api) is obsoleted by evdev. > What is missing is keyboard and mouse. I'd be willing to leave out keyboard > (because the stdin/scanf/getc semantic is probably enough. There isn't any keyboard API other than evdev and the console. > What I don't have > is mouse coverage. Does anyone have a good pointer to programming with the > PS2 variations? I was thinking about just pointing to libgpm, but that > doesn't really explain what comes out of /dev/input/mouse[0..30] when you > read. /dev/input/mouse[0..30] simulates (quite exactly, both directions) the protocol of Microsoft IntelliMouse Explorer. But no new applications should use it, evdev is more powerful and easier to write for. I hope both mousedev and joydev will not be needed by 2.6 (2.8) or so. -- Vojtech Pavlik SuSE Labs |