Linux serial port interrupts

This is a discussion on Linux serial port interrupts within the Linux Programming forums, part of the Platform Specific Boards category; Hello, I've been searching all over for c++ serial port interfacing, I've found plenty of basic reading/writing using termios and ...

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    1

    Linux serial port interrupts

    Hello,

    I've been searching all over for c++ serial port interfacing, I've found plenty of basic reading/writing using termios and various other libraries, but I can't seem to find much on the control signals.

    What I want to do is to use something like interrupts (blocking, waiting, etc.) to catch when a control signal is changes (dsr, carrier detect, etc. ) and execute a function.

    I've been able to find this in windows, but it needs the download of the huge windows platform sdk and vidual c++ express to use, and my main pc runs debian, so, a way in linux is what I'm hunting for.

    The polling method seems quite cpu heavy and may not catch all the signals (since it can only poll at regular intervals).

    Thank you for reading.

    Cheers

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,765
    Probably a good place to start - http://www.lvr.com/serport.htm
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. serial port to poll on request
    By infineonintern in forum C++ Programming
    Replies: 2
    Last Post: 06-11-2009, 07:52 AM
  2. Can't Read From Serial Port
    By HalNineThousand in forum Linux Programming
    Replies: 14
    Last Post: 03-20-2008, 06:56 PM
  3. Serial port programming in Linux
    By g4j31a5 in forum C++ Programming
    Replies: 1
    Last Post: 09-28-2006, 09:24 PM
  4. need guidance to connect to serial port
    By gnychis in forum Linux Programming
    Replies: 1
    Last Post: 06-02-2005, 11:10 AM
  5. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-08-2003, 04:59 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21