From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b321573c2e5269d2 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!feeder.erje.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Asynchronous I/O on a serial device Date: Sun, 12 Jun 2011 00:23:37 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1307856228 32670 69.95.181.76 (12 Jun 2011 05:23:48 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sun, 12 Jun 2011 05:23:48 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Xref: g2news2.google.com comp.lang.ada:20737 Date: 2011-06-12T00:23:37-05:00 List-Id: "Kim Rostgaard Christensen" wrote in message news:it0noa$ce3$1@munin.nbi.dk... > Hi there > > I am desperately trying to implement a protocol on top of a serial > transport. > > I am running Debian, and for the moment using /dev/ttyACM0 for reading. > This works fine using standard the Text_IO package and In_File. > Only, when I need to write to the device It fails because It is in In_File > mode - Obviously. > Reset on the file handle gives me a USE_ERROR exception, probably due to > it being a special file - please correct me if I am wrong. Stream_IO allows changing the mode of an open stream (specifically to handle this sort of problem). But whether that is allowed in your specific compiler I can't say -- you'll have to experiment. Randy.