[Ilugc] Linux device drivers: code examples

  • From: cyborg4k@xxxxxxxxx (Shakthi Kannan)
  • Date: Thu May 12 20:40:00 2005

Greetings!

The original code examples of Alessandro Rubini and
Jonathan Corbett's "Linux Device Drivers" were too
long with lot of ifdefs, and I found it difficult to
follow them. 

Hence I decided to modify them, and also write simple
application code wherever needed. There are 14 driver
examples that have been written and tested for the 2.4
Linux kernel:

hello-ex1/
  init_module and cleanup_module

current-ex2/
  prints current process PID

register-chrdev-ex3/
  registers character driver

param-ex4/
  passing parameters to a driver

read-ex5/
  reading from the driver

readminor-ex6/
  reading from a specific minor number

write-ex7/
  writing to a driver

writeminor-ex8/
  writing to a specific minor number

kmalloc-ex9/
  kmalloc usage

ioctl-ex10/
  simple ioctl example

waitsleep-ex11/
  sleep and awakening example

fasync-ex12/
  asynchronous reader example

sbull-ex13/
  simple block device driver

snull-ex14/
  simple network loopback device driver

The examples don't cover all the aspects of Linux
device drivers, but, are meant for newbies who are
entering into the field of device driver programming.

You can get the above code examples from here:

http://www.shakthimaan.com -> Downloads

I would appreciate any feedback/suggestions w.r.t the
above.

With regards,

SK

--
proudly anti-micro$oft
--------------------------------------------------------------------------
Shakthi Kannan, MS
Software Engineer, Specsoft (Hexaware Technologies)
http://www.shakthimaan.com
98407-87007 (M)
--------------------------------------------------------------------------


                
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

Other related posts:

  • » [Ilugc] Linux device drivers: code examples - Shakthi Kannan