Quote:
Originally Posted by kislaykishore
I wanted to write a driver based to control mouse functions using C library functions.
|
Using C library functions for the device drivers means you want to write the user-space device drivers since
libc provides a wrapper to the functions used by the kernel.
Check out the links shown here:
http://www.gnu.org/software/hurd/ope....html#index3h1
and I found this interesting:
http://www.freesoftwaremagazine.com/...nux?page=0%2C0
C library cannot be used to writing kernel space device drivers since it works in user space.
However as a replacement you have to use kernel level functions.
cd to this directory:
Code:
/usr/src/linux-<your kernel version>/include/linux
You'll find here the source files of functions used by the kernel replacing the glibc library functions.
and check out this too:
http://tldp.org/HOWTO/Module-HOWTO/