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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada / Automation fellows Date: Sun, 29 Mar 2015 11:52:06 +0200 Organization: cbb software GmbH Message-ID: <8w3c2aqts200.1k223teddlba0.dlg@40tude.net> References: <00d45b3c-0cde-4208-88a9-c79ec8100408@googlegroups.com> <1xmowzmu1ex3u.l4fxgvqvgbqg.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: w2sqUGEBZqsVBYNL7Ky3Kg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:25323 Date: 2015-03-29T11:52:06+02:00 List-Id: On Sun, 29 Mar 2015 10:56:07 +0200, Björn Lundin wrote: > On 2015-03-28 15:55, Dmitry A. Kazakov wrote: > >>>> >>>> A short question. How do you access GPIO on Raspberry Pi? Over the text >>>> file devices? >>>> >>>> We access GPIO, analogue inputs and PWM output through text files. It looks >>>> crazy to me. Is there a better way? > > I forgot to mention 'Mastering the Raspberry Pi' > by Warren Gay. > http://www.apress.com/9781484201824 > > He describes the Pi in *great* detail. > And there is a chapter (12) on GPIO where he explores > > * GPIO via sysfs > * GPIO events/interupts. Also via sysfs - get a notification/callback > when an IO-port changes state > > and > * GPIO via memory mapped file > > > a short c-module to map the GPIO part of memory and then > * set_bit > * get_bit > > functions to manipulate the IO-ports without sysfs Thanks. We considered most of this, I believe, and decided for device tree. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de