home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!nic.csu.net!csus.edu!netcom.com!edan
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Serial Drivers -- Please Help
- Message-ID: <1993Jan21.090812.12059@netcom.com>
- From: edan@netcom.com (Edan Shalev)
- Date: Thu, 21 Jan 1993 09:08:12 GMT
- References: <1993Jan20.043451.26994@murdoch.acc.Virginia.EDU>
- Organization: Netcom Online Communications Services (408-241-9760 login: guest)
- Lines: 53
-
- well I just wrote a program using the serial driver (yes i know its out
- dated, but the CTB was making my life hell) I have basically the same
- setup as you do, so it should work fine.. this is copied and pasted right
- out of my code..
-
- OSErr serialinit()
- {
- OSErr err;
- SerShk flags;
-
- if ((err = RAMSDOpen(sPortA))) return err;
- if ( (err = SerReset( ainRefNum,baud2400 + data8 + stop10 +noParity)))
- { RAMSDClose(sPortA);
- return err;
- }
-
- /* give the serial manager a SERBUFSIZ buffer */
- if (! (sermgrbuf = (char *)NewPtr (SERBUFSIZ))) {
- err = SerSetBuf(ainRefNum, sermgrbuf, SERBUFSIZ);
- }
- if ( (err = SerReset( aoutRefNum,baud2400 + data8 + stop10 +noParity)))
- { RAMSDClose(sPortA);
- return err;
- }
-
- /* set handshaking */
- flags.fXOn = TRUE;
- flags.fInX = TRUE;
- flags.xOn = XONCHAR;
- flags.xOff = XOFFCHAR;
- if (( err = SerHShake(ainRefNum,&flags))){
- RAMSDClose(sPortA);
- return err;
- }
-
- if (!( inbuf = (char *) NewPtr(SERBUFSIZ))) return MemError();
- return 0;
- }
-
- im surprised it still supported, but it works.. im using THINK w/sys 7 also..
-
- anyway hope it helps!
-
- since im already posting somthing.. I might as well ask a question..
- Im using TE functions to process incoming data, and i find it is very slow!
- (i kinda didnt want to have to write all the copy/selection/paste/scroll
- routines, so i tried text edit) but it is too slow, is there any trick
- to TE? it looks like im at 300 baud (when running at 2400)
-
- thanks
-
- edan
-
-