delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/18/10:31:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Wed, 18 May 2005 10:28:22 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Serial programming - Writing bytes in a blocking mode - Problem with tcdrain() ?
Message-ID: <20050518142822.GA4502@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <OFD5CBE7A0 DOT 8D91228D-ONC1257005 DOT 002999DA AT cetenasa DOT es>
Mime-Version: 1.0
In-Reply-To: <OFD5CBE7A0.8D91228D-ONC1257005.002999DA@cetenasa.es>
User-Agent: Mutt/1.5.8i

On Wed, May 18, 2005 at 10:10:28AM +0200, pbenito AT cemitec DOT com 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 following: Put
>the RTS signal low, write some bytes, wait until everything is transmitted
>and then raise again the RTS signal...

I didn't say you were reading any buffer.  Most modern serial devices
contain buffers so when you send a byte to a com device 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-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019