home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22250 < prev    next >
Encoding:
Text File  |  1993-01-27  |  1.6 KB  |  47 lines

  1. 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
  2. From: dpb@huelings.harvard.edu (David Baker)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Serial question
  5. Message-ID: <DPB.93Jan26163809@scws6.harvard.edu>
  6. Date: 27 Jan 93 00:38:09 GMT
  7. Article-I.D.: scws6.DPB.93Jan26163809
  8. Distribution: comp
  9. Organization: Department of Psychology, Harvard University
  10. Lines: 34
  11. Nntp-Posting-Host: scws6.harvard.edu
  12.  
  13. I tried to test out the serial port with the following porgram, and I got the
  14. same problem I had had in the project I'm working on, which is that the
  15. machine freezes during the FSWrite call.  When I enter MacsBug, I am in a loop
  16. in _vSyncWait.  Does anyone know what I'm doing wrong?
  17.  
  18. main()
  19. {
  20.     int num,count=4,err;
  21.     char duh[10];
  22.     
  23.     strcpy(duh,"ATZ\n");
  24.     
  25.     err=OpenDriver("\p.Aout",&num);
  26.     printf("Open error: %d\n",err);
  27.     err=FSWrite(num,&count,duh);
  28.     printf("Write error: %d\n",err);
  29.     err=CloseDriver(num);
  30.     printf("Close error: %d\n",err);
  31. }
  32.  
  33. Thanks,
  34. David
  35. Department of Psychology
  36. Harvard University
  37. --
  38. --------------------------------------+----------------------------------------
  39. David P. Baker                  | 
  40. Work: dpb@huelings.harvard.edu          | The only reason we think we're free is 
  41. Home: baker4@husc.harvard.edu          | that we cannot imagine the alternative.
  42. Office: William James Hall 844          |    
  43.     Department of Psychology      | 
  44.     Harvard University          |    N.B.: If responding by mail, please
  45.     (617) 495-3773              |          use my "Work" address above.
  46. --------------------------------------+----------------------------------------
  47.