Serialport Programming

Dear All ,
I want to write a new program for serial communication via /dev/ttyS0. I can now open the device via open() function.Then I can send some bytes via write() function. The problem is I want to receive data when they are ready on receive register. I don't want to check it in loop.Is it possible recognizing when some datas is received by interrupts? Could you give me some advices and examples about this.

Best Regards


  • I am not sure, since I don't program for Linux for quite some time, but you could use [b]select()[/b].
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion