On Fri, Feb 01, 2002 at 09:31:11AM +0100, Fabio Degiovanni wrote:
> Hello,
>       I would like to program a serial interrupt under Linux in an ANSI C
> code. Where can I found information and examples?
> Thank you
> Fabio Degiovanni

Are you trying to write your own device driver for a serial port? Or
are you just trying to write a C (or whatever) program that uses a
serial port?

Unless you are doing the first of those, you don't ever touch interrupts
on any Unix-like system. Any "real OS" will provide you with services for
using serial communications devices, and LInux certainly falls into that
category.

You open a serial port just like it was a file (which it is), set the
parameters (speed, parity, etc.) with ioctl() calls, then read()/write(),
and when you're done use close(), just like a file.

I suggest you look for the Linux Serial Programming HOWTO (that name is
from memory, it may be slightly different) for all the gory details.

Fred
-- 
---- Fred Smith -- [EMAIL PROTECTED] -----------------------------
   "For the word of God is living and active. Sharper than any double-edged 
   sword, it penetrates even to dividing soul and spirit, joints and marrow; 
              it judges the thoughts and attitudes of the heart."  
---------------------------- Hebrews 4:12 (niv) ------------------------------



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to