Re: serial port driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 01, 2001 at 03:30:52PM +0000, prasanna um wrote:
>         I am a newbie in kernel programming.
> I am learning how to write device drivers.
> My present object is to write a small kernel mode driver, which will help 
> me to communicate between two PC's using the serial port. I have read that 
> i can do that from the user mode, using the existing serial port driver 
> (serial.c). But since i want to learn the kernel concepts, i would like to 
> write a kernel mode driver which does the same.

Don't do that. The most important thing you have to learn is that a
kernel implements mechanisms, not policy. Policy should be handled in
userspace, and as a matter of fact it is much easier to do policy in
userspace.

> I am still at the begining of it, but i have some basic doubts. I would 
> like to know how to trigger the interrupt on the serial port ( i have 
> registered interrupt 4) and selected 0x02f8 - 0x02ff as the resources. I 
> have enabled the interrupt by writing 0x07 to 0x02f9. But when i write a 
> character to the 0x02f8, i do my interrupt handler is not getting accesed. 
> I am not sure how to proceed. Kindly suggest

Try the parallel port, much easier to understand. "Linux device drivers
2nd edition" contains an example on how to use the parallel port (and
the book can be downloaded for free).


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty
of Information Technology and Systems, Delft University of Technology,
PO BOX 5031, 2600 GA Delft, The Netherlands  Phone: +31-15-2783635
Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux