YDeeps1 wrote:So I followed the steps in the mouse forum post to initialise the mouse and enable IRQs but my question is how do I get those interrupts/irqs from USB mice? Emulators work fine however testing it on my machine yields no input. I do see it says I must receive such data streams from the "USB bus" but is there any general guidance towards specifically getting that work for USB mice? I'd rather avoid writing a full fledged USB driver until I really have to. Thanks.
Well, it depends. Are you still in real-mode? If so, getting mouse movements from a USB mouse is emulated and programmed just like getting mouse movements from a PS2 mouse, as long as the hardware emulates the mouse. Most, if not all modern machines do this.
If you have moved to protected mode, you probably don't want to hear it, but you will have to write a (mostly) <quote>full fledged USB driver until I really have to.</quote>
What hardware do you have, which of the four controllers do you wish to use, and how much effort do you wish to put into USB? Depending on your answer, I have different recommendations.
If you don't want to put much effort into USB, stick with the xHCI controller and forget about the other three. If you wish to learn about USB, I would start with UHCI (and possibly OHCI), skip EHCI altogether, and then go to xHCI.
I have
written a book that describes all four controllers and one of the chapters is specifically for USB mice.
Whether you read my book or not, I try to help with every USB question on this forum. After reading other documentation, the wiki for this site for instance, and other resources, start building your base, and when you have a question, feel free to ask.
Ben
-
http://www.fysnet.net/the_universal_serial_bus.htm