Thread: Linux serial port interrupts

  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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    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.

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, 06:52 AM
  2. Can't Read From Serial Port
    By HalNineThousand in forum Linux Programming
    Replies: 14
    Last Post: 03-20-2008, 05:56 PM
  3. Serial port programming in Linux
    By g4j31a5 in forum C++ Programming
    Replies: 1
    Last Post: 09-28-2006, 08:24 PM
  4. need guidance to connect to serial port
    By gnychis in forum Linux Programming
    Replies: 1
    Last Post: 06-02-2005, 10: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