Hi again,
Thanks for the answer. I have got the book Linux Device Drivers 3 and I
have read a couple of chapters in it. Though I have some basic questions
anyhow:
I want to experiment with a simple device driver code for a USB mouse. I
have found source code for a USB mouse device driver at
/usr/src/linux-2.6.16.16/drivers/usb/input/usbmouse.c.
I have tested to compile this code and load it into the kernel with insmod.
Now I want to test my device driver in some way, that is, I want to see
that the mouse is using the device driver that I loaded into the kernel.
As I understand it, I have to create a node in /dev and "connect" the
device driver to that node in some way. For instance, if I write cat
/dev/input/mice, I can see some bizarre characters printed in the terminal
as I move the mouse. I guess that I want to create a node
/dev/my_mouse_driver and "attach" my driver to that node and see what
happens when I move the mouse.
Later, I want to write my own device driver code that "answers", that is,
prints with printk to /var/log/messages as I press the buttons on the
mouse. Do you have some suggestions of how to do it?
Thanks a lot in advance.
/ mgr