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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:6312:: with SMTP id p18-v6mr11854048iog.43.1534777960809; Mon, 20 Aug 2018 08:12:40 -0700 (PDT) X-Received: by 2002:aca:de07:: with SMTP id v7-v6mr1031577oig.5.1534777960670; Mon, 20 Aug 2018 08:12:40 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder4.usenet.farm!feed.usenet.farm!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!g24-v6no3365798iti.0!news-out.google.com!g5-v6ni5135iti.0!nntp.google.com!w19-v6no3357775itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 20 Aug 2018 08:12:40 -0700 (PDT) In-Reply-To: <3d4bdc93-c80f-4603-adc0-fea29aa304af@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=165.255.63.4; posting-account=orbgeAkAAADzWCTlruxuX_Ts4lIq8C5J NNTP-Posting-Host: 165.255.63.4 References: <8e67da71-4f34-497e-9593-d2409c6ba7e0@googlegroups.com> <3d4bdc93-c80f-4603-adc0-fea29aa304af@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: file descriptor of a serial port From: jan.de.kruyf@gmail.com Injection-Date: Mon, 20 Aug 2018 15:12:40 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:54189 Date: 2018-08-20T08:12:40-07:00 List-Id: On Monday, August 20, 2018 at 4:58:27 PM UTC+2, joak...@kth.se wrote: > Den m=C3=A5ndag 20 augusti 2018 kl. 16:33:15 UTC+2 skrev jan.de...@gmail.= com: > > On Monday, August 20, 2018 at 4:21:20 PM UTC+2, J-P. Rosen wrote: > > > Le 20/08/2018 =C3=A0 15:56, jan.....com a =C3=A9crit : > > > > Hallo, > > > >=20 > > > > I try to set up a custom baudrate on a serial port, which I believe > > > > is done with the C ioctl procedure. > > > >=20 > > > GNAT.Serial_Communications has a Set procedure to set various > > > parameters, including baud rate. No need to play with the low level. > > >=20 > > > --=20 > > > J-P. Rosen > > > Adalog > > > 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX > > > Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 > > > http://www.adalog.fr > >=20 > >=20 > > Thanks J-P but: > >=20 > > Pity, does not work. > >=20 > > type Data_Rate is > > (B75, B110, B150, B300, B600, B1200, B2400, B4800, B9600, > > B19200, B38400, B57600, B115200); > >=20 > > procedure Set > > (Port : Serial_Port; > > Rate : Data_Rate :=3D B9600; > > Bits : Data_Bits :=3D CS8; > > Stop_Bits : Stop_Bits_Number :=3D One; > > Parity : Parity_Check :=3D None; > > Block : Boolean :=3D True; > > Local : Boolean :=3D True; > > Flow : Flow_Control :=3D None; > > Timeout : Duration :=3D 10.0); > >=20 > >=20 > > I quit desperately need B100_000 to cure someone else's mess. > >=20 > > j. >=20 > Hallo Jan, >=20 > You could try to copy-paste the contents of GNAT.Serial_Communications in= to a package of your own choice and then make changes to the code as you wi= sh, for example adding a function that gives access to the file descriptor = or adding your own enumeration value B100_000 to the Data_Rate type. >=20 > Best regards, > Joakim Yes Joakim, I have done that for the test harness, but I tried to keep away from it as = it does not make very nice code. Thanks, j.