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

2005-05-18 Thread Christopher Faylor
On Wed, May 18, 2005 at 10:10:28AM +0200, [EMAIL PROTECTED] wrote: >>I wonder if you're just seeing the effects of a buffer on the comm >>device itself not draining even though Windows has flushed everything >>from its own memory. > >I'm not reading any buffer, the idea of my program is the followi

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

2005-05-18 Thread pbenito
Hi Christopher, thanks for your attention, I've been working on it, and I've found a workaround for the problem using the ioperm libraries, accessing the UART LSR register of the serial port. In this way I'm able to know exactly when the output buffer is empty. >I wonder if you're just seeing

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

2005-05-17 Thread Christopher Faylor
On Mon, May 16, 2005 at 10:22:00AM +0100, [EMAIL PROTECTED] wrote: >I'm trying to use the serial port with Cygwin, and here is my problem: > >I can successfully write on the line, but I need to switch the RTS and DTR >lines just AFTER the last byte is written in the line. I put the bytes that >I wa

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

2005-05-16 Thread pbenito
Hi, I'm trying to use the serial port with Cygwin, and here is my problem: I can successfully write on the line, but I need to switch the RTS and DTR lines just AFTER the last byte is written in the line. I put the bytes that I want in the line with the command Write and I wait for the last byte