Link to home
Start Free TrialLog in
Avatar of nickolas
nickolas

asked on

interrupt driven serial communication...

  I am trying to write an interrupt driven serial port program using C, and I was wondering if anyone have amy idea if this is possible. My Unix system supports POSIX termios.h and aio.h, will my answer lies within these two include files?
   Fundamentally, I would like to send a string of commands out of my serial port and proceed with other task. In the background I would like to have an interrupt handler that continously read the in-coming buffer for a full length string return data. I don't want to hang the system on the read process because of the my process is under real-time.
Avatar of nickolas
nickolas

ASKER

Adjusted points to 200
Use select(), or poll(), or pthreads, or asynchronous I/O.

You could also set VMIN and VTIME with the <termios.h> API.

ASKER CERTIFIED SOLUTION
Avatar of dhm
dhm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial