USB

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
supagu
Member
Member
Posts: 46
Joined: Sat Apr 07, 2007 1:24 am

USB

Post by supagu »

im getting started with a USB implementation because i have a USB keyboard and mouse.

Currently my OS only supports text output so im very new to things, only got me os compiling the other day.

I've read up on the specs and stuff, it all sort of makes sence. But all the documents seem to lack is the super low level stuff.

any way, It appears USB stuff happens on IRQ10, but i get no interupts on irq10 when i run my os and mash some buttons on the keyboard.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

No low level stuff? Did you check here on the Wiki?
C8H10N4O2 | #446691 | Trust the nodes.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

When I test my OS I use a USB mouse, PS/2 keyboard. Can I recommend that you turn on Legacy USB support in your BIOS settings? This basically emulates PS/2 functionality on the mouse and keyboard if they are USB devices. I use it for my mouse and it works perfectly. Once you have working input via PS/2 (and memory management etc...) you can then branch out into supporting USB devices.
User avatar
mystran
Member
Member
Posts: 670
Joined: Thu Mar 08, 2007 11:08 am

Post by mystran »

My keyboard, if it's connected to USB port, works as a PS/2 keyboard, until you do a reset on the keyboard controller. Once you do that, my BIOS decides to stop it's Legacy emulation, and you are left without a keyboard.

Easily solved by plugging the keyboard into PS/2 port with an adapter (that came with the keyboard) though some stuff like the wheel doesn't work properly that way (if it's connected as PS/2 it simply sends up/down key events.. in USB the keyboard actually identifies as two decides: a keyboard and mouse, and the mouse never sends anything but wheel events). Not that I use any of that stuff normally..
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
Post Reply