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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a05:620a:134d:: with SMTP id c13mr23647000qkl.322.1580242682724; Tue, 28 Jan 2020 12:18:02 -0800 (PST) X-Received: by 2002:a05:6830:1185:: with SMTP id u5mr16457666otq.147.1580242682238; Tue, 28 Jan 2020 12:18: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!g89no8451383qtd.0!news-out.google.com!o19ni1304qtr.1!nntp.google.com!g89no8451378qtd.0!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 28 Jan 2020 12:18:01 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=199.204.203.152; posting-account=XGCYegoAAADY19DGgU_zTfTSbVlfUJ_a NNTP-Posting-Host: 199.204.203.152 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: GNATCOLL-Mmap example From: Philip Munts Injection-Date: Tue, 28 Jan 2020 20:18:02 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:57979 Date: 2020-01-28T12:18:01-08:00 List-Id: On Tuesday, January 28, 2020 at 11:11:12 AM UTC-8, Philip Munts wrote: > Or better yet, use my libsimpleio: > > https://github.com/pmunts/libsimpleio > > The sysfs API for GPIO is now deprecated. > Here is a quick example using libsimpleio: WITH GPIO.libsimpleio; WITH RaspberryPi; PROCEDURE test_gpio IS outp : CONSTANT GPIO.Pin := GPIO.libsimpleio.Create(RaspberryPi.GPIO18, GPIO.Output); BEGIN LOOP outp.Put(True); outp.Put(False); END LOOP; END test_gpio; On a Raspberry Pi 4, which is what happens to be plugged in today, I measured a 360 kHz square wave at GPIO 18. Never mess around with memory mapped I/O unless you need insanely high performance. Then you would probably want to use DMA anyway. Phil