Article View: net.micro.mac
Article #7420Re: Wierdness with serial drivers
From: wade blomgren
Date: Mon, 29 Sep 1986 16:17
Date: Mon, 29 Sep 1986 16:17
24 lines
1730 bytes
1730 bytes
In article <15852@ucbvax.BERKELEY.EDU>, deboor@ucbarpa.Berkeley.EDU (CS55 Porting Project) writes:
> Has anyone else had problems using the FSRead() and FSWrite() routines?
>
> I am using them to read from and write to the modem port (sPortA).
> I have opened the drivers (".AIn" and ".AOut") and used SerReset() to get
> the baud rates etc set correctly, but when I go to write a character to the
> port the machine hangs inside FSWrite().
>
> I have read through IM several times to see if I missed something, but I can't
> find it.
Depending on which development system you are using, you could be a victim of
type mis-matching. For example, when porting a C application from SUMacC to
LightspeedC I encountered *exactly* the same problem. It turned out that the
character count parameter for the FS routines needed to be declared as 'long'
in LightspeedC but had somehow worked as type 'int' in SUMacC. Also make sure
you evaluate the results of all the Serial Driver functions (they return type
OSErr) to make sure everything worked OK when opening and initializing the
driver.
Wade Blomgren
UC San Diego, ACS
....!sdcsvax!sdacs!wade
Technical Details
Message-ID:
<609@sdcc12.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!think!nike!ucbcad!ucbvax!sdcsvax!sdcc6!sdcc12!st94wbReferences:
<15852@ucbvax.BERKELEY.EDU>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!think!nike!ucbcad!ucbvax!sdcsvax!sdcc6!sdcc12!st94wb From: st94wb@sdcc12.UUCP (wade blomgren) Newsgroups: net.micro.mac Subject: Re: Wierdness with serial drivers Message-ID: <609@sdcc12.UUCP> Date: Mon, 29-Sep-86 12:17:11 EDT Article-I.D.: sdcc12.609 Posted: Mon Sep 29 12:17:11 1986 Date-Received: Wed, 1-Oct-86 01:33:58 EDT References: <15852@ucbvax.BERKELEY.EDU> Organization: U.C. San Diego, Academic Computer Center Lines: 24 Summary: type mismatch