2009年10月1日 星期四

USB Human Interface Device (HID)

The Linux USB sub-system
http://www.linux-usb.org/USB-guide/book1.html
USB Human Interface Device (HID) Configuration
http://www.linux-usb.org/USB-guide/x194.html
看起來像是2.4的,不過還是提供了不少有用的資訊

modprobe hid.ko;modprobe usbhid;
mount -t usbfs none /proc/bus/usb;mkdir /dev/input -p;

//mouse
modprobe mousedev.ko;
mknod /dev/input/mice c 13 63;
//keyboard
modprobe evdev.ko;modprobe xtkbd.ko;
a=0;while [ $a -le 10 ] ; do mknod /dev/input/event$a c 13 $(($a+64));a=$(($a+1));done;
modprobe atkbd.ko;

//to test mouse...
hexdump /dev/input/mice;
//to test keyboard, usually at event0...
a=0;while ! hexdump /dev/input/event${a} ; do a=$(($a+1));if [ $a -gt 10 ] ; then break; fi;done;
a=0;while ! hexdump /dev/input/event${a} ; do a=$(($a+1));if [ $a -gt 10 ] ; then a=0; fi;done;



The Linux keyboard and console HOWTO
http://tldp.org/HOWTO/Keyboard-and-Console-HOWTO.html
Keyboard-and-Console-HOWTO.pdf
http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/pdf/Keyboard-and-Console-HOWTO.pdf

the standalone Boot Protocol (HIDBP)
full featured HID driver

USB Human Interface Device (HID)


CONFIG_HID_SUPPORT
Defined at drivers/hid/Kconfig:4

沒有留言: