Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to do a blocking read from a serial device?



Hi Sean,

On Jul 10, 2006, at 10:34 AM, Sean McBride wrote:

Is there anyway to have read() block until the requested length is
ready?  Is my only other choice some kind of loop that calls read() and
usleep() over and over?  If so, how do I choose a sleep duration?

Take a look at termios(4). That should answer your question.

--gc
____________________________________________________________________
Garth Cummings  email@hidden
Sr. Software Engineer
Apple Developer Technical Support



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >How to do a blocking read from a serial device? (From: "Sean McBride" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.