Re: tcdrain

2006-05-11 Thread Karel Kulhavy
On Wed, May 10, 2006 at 05:14:30PM +0100, Dave Korn wrote: On 10 May 2006 14:05, Karel Kulhavy wrote: Hello It looks like tcdrain in cygwin doesn't wait until data are transmitted, but just drains the software buffer, and doesn't drain the buffer in the 16550A chip. Can you please

tcdrain

2006-05-10 Thread Karel Kulhavy
Hello It looks like tcdrain in cygwin doesn't wait until data are transmitted, but just drains the software buffer, and doesn't drain the buffer in the 16550A chip. Can you please confirm that this is really how Cygwin works? I got data corrupted because of this because the data rate

RE: tcdrain

2006-05-10 Thread Dave Korn
On 10 May 2006 14:05, Karel Kulhavy wrote: Hello It looks like tcdrain in cygwin doesn't wait until data are transmitted, but just drains the software buffer, and doesn't drain the buffer in the 16550A chip. Can you please confirm that this is really how Cygwin works? Nope, but I can

Re: tcdrain

2006-05-10 Thread Christopher Faylor
On Wed, May 10, 2006 at 03:04:41PM +0200, Karel Kulhavy wrote: It looks like tcdrain in cygwin doesn't wait until data are transmitted, but just drains the software buffer, and doesn't drain the buffer in the 16550A chip. Can you please confirm that this is really how Cygwin works? The source

Re: Serial programming - Writing bytes in a blocking mode - Problem with tcdrain() ?

2005-05-18 Thread pbenito
the RTS signal... I plugged the oscilloscope to see those two signals and this is what it happened: (See attached file: Signals - tcdrain.PNG) To me, seeing this I think that tcdrain is not doing what it is supposed to do. Then I used the ioperm, reading the LSR register to check when the output

Re: Serial programming - Writing bytes in a blocking mode - Problem with tcdrain() ?

2005-05-18 Thread Christopher Faylor
know about this buffer. tcdrain() will only report that the byte has left the OS buffer. It won't know if the byte is still sitting in the device's buffer. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation

Re: Serial programming - Writing bytes in a blocking mode - Problem with tcdrain() ?

2005-05-17 Thread Christopher Faylor
in the line with the command Write and I wait for the last byte to be written with tcdrain() and then I switch the RTS and RTS lines. But when I see the signals in the oscilloscope I realized that the tcdrain call is not waiting till the output buffer is empty and I switch the RTS and DTR lines

Serial programming - Writing bytes in a blocking mode - Problem with tcdrain() ?

2005-05-16 Thread pbenito
byte to be written with tcdrain() and then I switch the RTS and RTS lines. But when I see the signals in the oscilloscope I realized that the tcdrain call is not waiting till the output buffer is empty and I switch the RTS and DTR lines before I write all the bytes !! I attach my code, is it something