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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:ac8:5205:: with SMTP id r5mr23516262qtn.230.1580242623093; Tue, 28 Jan 2020 12:17:03 -0800 (PST) X-Received: by 2002:aca:cdd6:: with SMTP id d205mr3927646oig.90.1580242622952; Tue, 28 Jan 2020 12:17:02 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!g89no8448882qtd.0!news-out.google.com!o19ni1304qtr.1!nntp.google.com!g89no8448870qtd.0!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 28 Jan 2020 12:17:02 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2001:8b0:ca:2:0:0:0:fd; posting-account=TiHetgoAAACluCgYkPc8-TWs6dBNgSne NNTP-Posting-Host: 2001:8b0:ca:2:0:0:0:fd References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6a365294-65bb-4bd5-82d1-69d7b5aac04b@googlegroups.com> Subject: Re: GNATCOLL-Mmap example From: Bob Goddard <1963bib@googlemail.com> Injection-Date: Tue, 28 Jan 2020 20:17:03 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:57978 Date: 2020-01-28T12:17:02-08:00 List-Id: On Tuesday, 28 January 2020 20:07:56 UTC, Dmitry A. Kazakov wrote: > On 2020-01-28 19:53, Bob Goddard wrote: > > On Tuesday, 28 January 2020 08:25:25 UTC, Dmitry A. Kazakov wrote: > >> On 2020-01-25 22:52, Bob Goddard wrote: > >> > >>> I need to map the RPi's GPIO memory addresses so that I can do what I need to do. > >> > >> See files under: > >> > >> /sys/class/gpio > >> > >> You can use standard Ada I/O to read and set GPIO pins. E.g. > >> > >> /sys/class/gpio/gpio/XXX/value > > > > This was the way I started, but could not get it to read anything. It just blocks trying to read a single character. My c code works fine using the wiringPi libs. > > If I correctly remember you should rewind the file after each reading. It did not get that far. It blocks right at the start.