home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!das-news.harvard.edu!husc-news.harvard.edu!husc-news!dpb
- From: dpb@huelings.harvard.edu (David Baker)
- Newsgroups: comp.sys.mac.programmer
- Subject: Serial question
- Message-ID: <DPB.93Jan26163809@scws6.harvard.edu>
- Date: 27 Jan 93 00:38:09 GMT
- Article-I.D.: scws6.DPB.93Jan26163809
- Distribution: comp
- Organization: Department of Psychology, Harvard University
- Lines: 34
- Nntp-Posting-Host: scws6.harvard.edu
-
- I tried to test out the serial port with the following porgram, and I got the
- same problem I had had in the project I'm working on, which is that the
- machine freezes during the FSWrite call. When I enter MacsBug, I am in a loop
- in _vSyncWait. Does anyone know what I'm doing wrong?
-
- main()
- {
- int num,count=4,err;
- char duh[10];
-
- strcpy(duh,"ATZ\n");
-
- err=OpenDriver("\p.Aout",&num);
- printf("Open error: %d\n",err);
- err=FSWrite(num,&count,duh);
- printf("Write error: %d\n",err);
- err=CloseDriver(num);
- printf("Close error: %d\n",err);
- }
-
- Thanks,
- David
- Department of Psychology
- Harvard University
- --
- --------------------------------------+----------------------------------------
- David P. Baker |
- Work: dpb@huelings.harvard.edu | The only reason we think we're free is
- Home: baker4@husc.harvard.edu | that we cannot imagine the alternative.
- Office: William James Hall 844 |
- Department of Psychology |
- Harvard University | N.B.: If responding by mail, please
- (617) 495-3773 | use my "Work" address above.
- --------------------------------------+----------------------------------------
-