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 drai

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

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 Cygwi

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 dat

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

2005-05-18 Thread Christopher Faylor
ce it may be stored in a buffer. Cygwin (and Window?) won't 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-s

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

2005-05-18 Thread pbenito
s transmitted and then raise again 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

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

2005-05-17 Thread Christopher Faylor
the bytes that >I want 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

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

2005-05-16 Thread pbenito
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 before I write all the bytes !! I attach my code, is it some