⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.kbd

📁 超小usb协议栈
💻 KBD
字号:
This is a simple USB keyboard driver written from Linus'USB driver (started with Greg's usb-0.03b.tar.gz sourcetree)It works fine with my BTC keyboard but I'm still investigatingtrouble with my MS keyboard (trouble starts with an inabilityto set into boot protocol mode, though, this very well couldbe all due to crappy hardware).Anyway, I would appreciate you taking a look if you haveany USB keyboards lying around.  Oh also, I'm doing this onUHCI so sorry if it breaks with OHCI.-hamKeyboard patch--------------Instead of using the multiple keyboard patch and then running into allof the kernel version problems that the current Linux-USB project hashad, I'm just mapping the USB keycodes to the standard AT-101 keycodesand sending them directly to "handle_scancode".This may or may not be considered a hack.  Anyway it is effective, andI think safe, and allows USB keyboards to coexist with a serialkeyboard (oh yeah, one side effect is that you can for example holddown the control key on the serial keyboard and press "a" on the USBkeyboard and you get Control-a like with Windows USB) and worksfine for console and X.You do need to make a *tiny* patch the kernel source tree so that thefunction "handle_scancode" is exported from keyboard.c though.  $ cd /usr/src/linux  $ patch -p0 < kbd.patchAnd, of course, then, you need to rebuild and install the kernel.** [Vojtech]: Alternately, just 'insmod kbd-stub', if you don't wantto use the keyboard and are too lazy to patch the kernel.Keyboard map------------I'm including a stupid utility "mkmap" which generates the USB->serialkeymap.  It takes in maps/serial.map (the current serial keymap,generated by "dumpkeys"), maps/usb.map (the USB keymap), andmaps/fixup.map (fixes for e0 keys and misc.) and spits out keymap.cAnyway, it is not beautiful but should serve its purpose for themoment.Other changes-------------uhci.c:  * added a context value to the irq callback function    (this is exactly like the "dev_id" field to request_irq)  * played with uhci_reset_port to get better hot-plug results    (eg. do a wait_ms(200) before calling uhci_reset_port)usb.c:  * disconnect all devices after uhci-control thread is killed  * skip over the HID descriptor  * disconnect the high-level driver in usb_disconnect

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -