Hi,

On 2010.05.12 16:21, Mindaugas Kavaliauskas wrote:
I've very surprised :( I expected to be some way to wait for line change
event in POSIX/UNIX/Linux. I just guessed that there is a way to make
line change to emit error condition, ex.,
ioctl(fd, TIO_ERROR_ON_CHANGE, TIO_DSR));

Looking to Wine source I found some text about TIOCMIWAIT, the sad part of story is that it says: "TIOCMIWAIT is not adequate" and Wine uses 10ms pooling to emulate Windows behaviour, see: dlls/ntdll/serial.c:wait_for_event()

Google finds some samples of code that implements
   ioctl( fd, TIOCMIWAIT, wait_mask ),
ex.:
http://www.linuxquestions.org/questions/programming-9/serial-port-programming-285597/
http://www.dslreports.com/forum/r21801613-Linux-Interrupt-based-on-serial-port-pin


Regards,
Mindaugas
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to