home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!gatech!destroyer!ncar!noao!coyote!bbs
- From: cobra@coyote.datalog.com (Ken Thompson)
- Subject: Programming Help Needed
- Message-ID: <kkPLwB3w165w@coyote.datalog.com>
- Sender: bbs@coyote.datalog.com (Waffle System)
- Organization: Datalog Consulting, Tucson, AZ
- Date: Wed, 30 Dec 92 15:16:42 GMT
- Lines: 56
-
- Greetings:
-
- The following message is from a friend of mine...I know *very* little
- about C programming, and stretched my brain for a few milli-seconds &
- couldn't figure it out, so I'll forward it here...
-
- If you would be as kind ast to E-Mail your responses, I will collect
- them and forward them to my friend. Thanks! -Ken
-
- - - - - - - - - - - - (generic cutting line) - - - - - - - - - - - - - -
- Those who have done experimentation with the Serial port routines in C
- or otherwise, please step forward
-
- My problem:
-
- I set up the typical things to do a serial port read such as open
- up a MsgPort structure and then create a 'request block' with a
- CreateExtIO() function. I set up the baud rates and know that every-
- thing is working properly.
-
- Now, I would like to receive one byte at a time from the serial port
- in real time. No 2400 bytes per second or anything. And, for every
- one of those bytes from the serial port, I wish to get a MsgPort mes-
- sage sent to me for each one of those bits and then check for that mes-
- sage with a:
-
- SerialPortSignal = 1 << ReadPortPtr->IOSer.io_Message.mn_ReplyPort->mp_Sig
- Bit
-
- I wish to check two other message ports at the same time in the same
- manner. One is from a window and the other from a timer.
-
- Therefore, I wish to have three MessagePorts that all send me slow
- changing information, and I wish one of them to be from the serial
- port.
-
- I can't use a 'Wait(Signals=SerialPortSignal (or) WindowPortSignal
- (or) TimerPortSignal) because it locks up and I don't get any signals
- from either the timer or serial port if I do that.
-
- Anybody got any code which may shed some light on this?
-
- I don't wish to do continuous cycling and rechecking using the
- CheckIO() function, I just want it to sit there until things are
- done, or ready, then have it proceed.
-
- - - - - - - - - - - - (generic cutting line) - - - - - - - - - - - - - -
-
- Again, if responses could be E-mailed, it'd be appreciated...thanks!
-
-
-
- _____ ______________________ _____
- |/ | | cobra@datalog.com | | /\
- |\ en |hompson | cobra@jab.tus.az.us | |ucson, /--\rizona
- ------------------------------------------------------------------
-