Page 1 of 1
USB support (keyboard)
Posted: Sat Sep 27, 2003 9:02 am
by HOS
Since there has been an interest in this topic, i decided to ask the question. How does one go about supporting a USB device such as a keyboard. i have a usb keyboard that works in the bios, but once i get to my OS (even in rmode calling bios for keyboard input) the usb keyboard does not work anymore. needless to say, it does not work in pmode either.
To support a USB device, is it a matter of enabling the usb port and reading from it or what? is the bios needed for information for USB devices?
Re:USB support (keyboard)
Posted: Sun Sep 28, 2003 10:36 am
by Schol-R-LEA
Well, the obvious place to start is the
USB home page, which has the full specs available for download. While quite dense, they are relatively readable as standards documents go ::)
As for tutorials, those are rather sparse on the ground; not only has USB been slow to be adopted in the PC world, writing a driver for USB is considerably harder than the equivalent for, say, the PS/2 mouse and keyboard ports. The reasons for this are clear from the name: it is bus system (technically, the topology is a pyramidal star, but that's not the point) which can be used to connect to any peripheral (in theory). This means, among other things, that you need a driver both for the USB host, as well as for each USB device supported.
Despite this, a Google search does bring up a few potentially useful pages:
http://www.lvr.com/usb.htm
http://people.freenet.de/dieterp/main.htm#P5
Also, the OSRC does not fail us, though their material is rather dated:
http://www.nondot.org/~sabre/os/article ... nectBuses/
There are a number of books on the subject; a quick Amazon search should bring up several. Most of them, however, are on hardware design, and usually assume a Windows host environment.
Posted: Wed Mar 19, 2008 6:27 am
by Philip
ok, let's discuss about programming the usb devices
can we start with usb keyboard
how to read data from usb keyboard?
Posted: Wed Mar 19, 2008 6:42 am
by JamesM
Read the USB Human Interface Device specification.
Or, use bochs or qemu so that you can use a PS2 keyboard while your kernel is still in the initial stages.
Posted: Wed Mar 19, 2008 7:28 am
by xyzzy
RTFM. You could also have carried on this discussion in your other thread, rather than digging up a 5 year old thread...
Posted: Thu Mar 20, 2008 6:24 am
by jal
AlexExtreme wrote:RTFM. You could also have carried on this discussion in your other thread, rather than digging up a 5 year old thread...
Well, it at least shows he used the forum's search functionality. That's more than some do.
JAL