home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17976 < prev    next >
Encoding:
Text File  |  1992-12-31  |  2.6 KB  |  67 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!gatech!destroyer!ncar!noao!coyote!bbs
  3. From: cobra@coyote.datalog.com (Ken Thompson)
  4. Subject: Programming Help Needed
  5. Message-ID: <kkPLwB3w165w@coyote.datalog.com>
  6. Sender: bbs@coyote.datalog.com (Waffle System)
  7. Organization: Datalog Consulting, Tucson, AZ
  8. Date: Wed, 30 Dec 92 15:16:42 GMT
  9. Lines: 56
  10.  
  11.   Greetings:
  12.  
  13.  The following message is from a friend of mine...I know *very* little
  14. about C programming, and stretched my brain for a few milli-seconds &
  15. couldn't figure it out, so I'll forward it here...
  16.  
  17.  If you would be as kind ast to E-Mail your responses, I will collect
  18. them and forward them to my friend.  Thanks!         -Ken
  19.  
  20.  - - - - - - - - - - - (generic cutting line) - - - - - - - - - - - - - -
  21. Those who have done experimentation with the Serial port routines in C 
  22. or otherwise, please step forward
  23.  
  24. My problem:
  25.  
  26. I set up the typical things to do a serial port read such as open 
  27. up a MsgPort structure and then create a 'request block' with a 
  28. CreateExtIO() function.  I set up the baud rates and know that every-
  29. thing is working properly.
  30.  
  31. Now, I would like to receive one byte at a time from the serial port
  32. in real time.  No 2400 bytes per second or anything.  And, for every 
  33. one of those bytes from the serial port, I wish to get a MsgPort mes-
  34. sage sent to me for each one of those bits and then check for that mes-
  35. sage with a:
  36.  
  37. SerialPortSignal = 1 << ReadPortPtr->IOSer.io_Message.mn_ReplyPort->mp_Sig
  38. Bit
  39.  
  40. I wish to check two other message ports at the same time in the same
  41. manner.  One is from a window and the other from a timer.
  42.  
  43. Therefore, I wish to have three MessagePorts that all send me slow
  44. changing information, and I wish one of them to be from the serial
  45. port.
  46.  
  47. I can't use a 'Wait(Signals=SerialPortSignal (or) WindowPortSignal 
  48. (or) TimerPortSignal) because it locks up and I don't get any signals
  49. from either the timer or serial port if I do that.
  50.  
  51. Anybody got any code which may shed some light on this?
  52.  
  53. I don't wish to do continuous cycling and rechecking using the 
  54. CheckIO() function, I just want it to sit there until things are 
  55. done, or ready, then have it proceed.
  56.  
  57.  - - - - - - - - - - - (generic cutting line) - - - - - - - - - - - - - -
  58.  
  59.  Again, if responses could be E-mailed, it'd be appreciated...thanks!
  60.  
  61.  
  62.  
  63.            _____         ______________________   _____                
  64.        |/    |          | cobra@datalog.com   |     |        /\        
  65.        |\ en |hompson   | cobra@jab.tus.az.us |     |ucson, /--\rizona 
  66.      ------------------------------------------------------------------
  67.