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: Information about a serialport



At 14:00 +0200 31/5/01, Jakob Sprogxe Jakobsen wrote:
I would like to get information about Stop bits, parity, databits and
baudrate from a serialport.

I cannot find any function in either Serial.h or Devices.h that does that.

I presume you're targetting Mac OS 8/9. If not, let me know because this answer is not valid on Mac OS X.

Are you trying to read the current configuration of the port, or determine what the port's capable of?

If the former, there is, AFAIK, no way of doing this. You just have to remember what you last set the port to.

If the latter, you can solve a limited part of the problem using the Communications Resource Manager. Once you've found the port using CRMSearch (see the example in TN 1119) you can look at the ratedSpeed field of the CRMSerialRecord to determine the port's maximum speed.

<http://developer.apple.com/technotes/tn/tn1119.html>

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware




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.