Path: utzoo!utgpu!water!watmath!clyde!bellcore!decvax!mcnc!gatech!hao!boulder!sunybcs!bingvaxu!leah!itsgw!imagine!pawl21.pawl.rpi.edu!jesup From: jesup@pawl21.pawl.rpi.edu (Randell E. Jesup) Newsgroups: comp.sys.amiga Subject: Re: Multiple serial ports (was Re: Need help with signals) Message-ID: <202@imagine.PAWL.RPI.EDU> Date: 9 Jan 88 02:05:53 GMT References: <2245@cup.portal.com> <22374@ucbvax.BERKELEY.EDU> <194@imagine.PAWL.RPI.EDU> <1359@sugar.UUCP> Sender: news@imagine.PAWL.RPI.EDU Reply-To: beowulf!lunge!jesup@steinmetz.UUCP Organization: RPI Public Access Workstation Lab - Troy, NY Lines: 30 In article <1359@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes: >AmigaDOS already HAS a method for binding names to devices. It's called >AmigaDOS. You can get the device info for any open file from the file >system. > >#include > fh = Open("SER:", ACCESS_WRITE); > FH = (struct FileHandle *)(fh<<2); > >Hmmm. The documentation is a mite skimpy on where to go from there. It seems >like it should be possible to go with it... send serial port messages to the >fh_Port in the structure. But what's the fh_Type feild? >-- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter Unfortunately, AmigaDos handlers are not designed to be a means of access to the underlying devices. In fact there may not BE an underlying device (ex: Ram:), or there may be different ones at different times (prt:), or there may be multiple devices at the same time (none presently). The fields in a filehandle structure, while named, are not documented and I believe most of the values are private to the handler. The fh_Port field is the MsgPort to send HANDLER requests to. P.S. I am crossposting this to BIX // Randell Jesup Lunge Software Development // Dedicated Amiga Programmer 13 Frear Ave, Troy, NY 12180 \\// lunge!jesup@beowulf.UUCP (518) 272-2942 \/ (uunet!steinmetz!beowulf!lunge!jesup)