delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/07/21/13:40:24

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <18573752.post@talk.nabble.com>
Date: Mon, 21 Jul 2008 10:39:53 -0700 (PDT)
From: skaught <schaught AT yahoo DOT com>
To: cygwin AT cygwin DOT com
Subject: Using Readfile to get serial port data with Cygwin...
MIME-Version: 1.0
X-Nabble-From: schaught AT yahoo DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

I'm trying to pull data from the serial port using a C++ program in Cygwin,
but can't find the answers on how the data comes through.  My programming is
a bit rusty, so please go easy on me...  :)

I have a device that puts out a constant stream of data to the serial port
and I always want to access the latest byte of data.  I don't want any of
the data to be stored in a buffer, I always want to read the current byte
being transmitted.  I found some code online that pulls in the data from the
serial port with readfile, but I'm not sure if readfile pulls in the data
the way that I want.  Does anyone know if readfile always pulls the latest
byte when accessing the serial port or if there is a buffer of some sort?

Thanks!


-- 
View this message in context: http://www.nabble.com/Using-Readfile-to-get-serial-port-data-with-Cygwin...-tp18573752p18573752.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
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