Article View: comp.sys.amiga.tech
Article #11282Re: DTR and serial.device
From: Eric Green
Date: Wed, 01 Feb 1989 03:36
Date: Wed, 01 Feb 1989 03:36
33 lines
2085 bytes
2085 bytes
in article <15000@oberon.USC.EDU>, papa@pollux.usc.edu (Marco Papa) says:
> In article <10511@well.UUCP> jimbo@well.UUCP (Jim Bolton) writes:
>>looking at the way I handle DTR. Currently to drop DTR I close the serial
>>device, wait 1 second, and then reopen the serial device.
> ....
>>So, I would like to know if it is possible to inhibit DTR on the Amiga's
>>RS-232 serial port and if so could you point me in the right direction.
>
> This is some code that might be helpful to you. [Gee, I come back after a week
> at the MIT X Conference and I am back 350 messages, gulp!].
[... some C code to hack directly at the CIA to turn off the DTR bit]
Note that hacking straight at the CIA will *BREAK* if you are using a
multiserial card and accessing any serial device other than unit 0.
Now that we are FINALLY getting multi-serial cards, PLEASE don't do
something brain-damaged like this!
If you want your program to work with a multiserial card, do the
hardware-DTR hack only for unit 0. And even then it may be
inappropriate. E.g., I was looking at what would be involved to get
current programs to run in a multiserial environment, and came up with
the idea of sending a command to the new serial.device telling it,
"OK, the next thing coming in will say that it's unit 0, but actually
open it as unit 5."
Your current scheme, closing the serial.device, probably will break
the least when used in a multiserial environment.
--
| // Eric Lee Green P.O. Box 92191, Lafayette, LA 70509 |
| // ..!{ames,decwrl,mit-eddie,osu-cis}!killer!elg (318)989-9849 |
| \X/ >> In Hell you need 4Mb to Multitask << |
Technical Details
Message-ID:
<6992@killer.DALLAS.TX.US>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!killer!elgReferences:
<15000@oberon.USC.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!killer!elg From: elg@killer.DALLAS.TX.US (Eric Green) Newsgroups: comp.sys.amiga.tech Subject: Re: DTR and serial.device Message-ID: <6992@killer.DALLAS.TX.US> Date: 1 Feb 89 03:36:52 GMT References: <15000@oberon.USC.EDU> Distribution: usa Organization: The Unix(R) Connection, Dallas, Texas Lines: 33