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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:294d:: with SMTP id p74-v6mr20081477itp.36.1534777106179; Mon, 20 Aug 2018 07:58:26 -0700 (PDT) X-Received: by 2002:aca:2b06:: with SMTP id i6-v6mr1069840oik.0.1534777105959; Mon, 20 Aug 2018 07:58:25 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!w19-v6no3347930itb.0!news-out.google.com!g5-v6ni5135iti.0!nntp.google.com!w19-v6no3347925itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 20 Aug 2018 07:58:25 -0700 (PDT) In-Reply-To: <8e67da71-4f34-497e-9593-d2409c6ba7e0@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=136.163.203.6; posting-account=HFCrOQoAAABZD_f-UUbYHm3lJDIrh-UX NNTP-Posting-Host: 136.163.203.6 References: <8e67da71-4f34-497e-9593-d2409c6ba7e0@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3d4bdc93-c80f-4603-adc0-fea29aa304af@googlegroups.com> Subject: Re: file descriptor of a serial port From: joakimds@kth.se Injection-Date: Mon, 20 Aug 2018 14:58:26 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:54188 Date: 2018-08-20T07:58:25-07:00 List-Id: Den m=C3=A5ndag 20 augusti 2018 kl. 16:33:15 UTC+2 skrev jan.de...@gmail.co= m: > 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. Hallo Jan, You could try to copy-paste the contents of GNAT.Serial_Communications into= a package of your own choice and then make changes to the code as you wish= , 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. Best regards, Joakim