Page 1 of 1
PS/2 Driver?
Posted: Wed Nov 11, 2009 10:31 pm
by smeezekitty
I looked at the wiki page for ps/2 mouse and most of it is over my head.
pretty much the only part i caught is that you reset the mouse then you read 3 packets
first one is state second is X third is Y but any ideas on implementation?
Re: PS/2 Driver?
Posted: Thu Nov 12, 2009 2:25 am
by Combuster
Code: Select all
// wait for mouse
char status = read_byte();
// wait for mouse again
char dx = read_byte();
// wait for mouse once more
char dy = read_byte();
If that didn't answer the question...
Re: PS/2 Driver?
Posted: Thu Nov 12, 2009 4:56 am
by AJ
Hi,
smeezekitty wrote:I looked at the wiki page for ps/2 mouse and most of it is over my head.
pretty much the only part i caught is that you reset the mouse then you read 3 packets
first one is state second is X third is Y but any ideas on implementation?
Please do more background reading. Until your post, I had never read the Mouse wiki page and have never implemented a mouse driver. I just read the page now and feel confident about basic mouse programming - everything is there. As you continue with OS Dev and more proprietary devices, you'll need to be able to read datasheets or even reverse engineer to write your drivers.
If you know about how to do basic IO and are familiar with your programming language, give it a go and ask questions if you run in to specific problems. If not, then
learn how to do basic port IO and get familiar with your programming language.
Cheers,
Adam