From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada / Automation fellows
Date: Sat, 28 Mar 2015 15:53:26 +0100
Date: 2015-03-28T15:53:26+01:00 [thread overview]
Message-ID: <1fh4f41s4s445.lwq0gzbtc9kl.dlg@40tude.net> (raw)
In-Reply-To: lyh9t5tk3w.fsf@pushface.org
On Sat, 28 Mar 2015 11:52:19 +0000, Simon Wright wrote:
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
>
>> 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?
>
> Is this through the /proc filesystem?
Through the device tree /sys/class/gpio/.../value contains '0' + LF + EOF
or '1' + LF + EOF. And needs lseek each time when read again.
> It goes against the grain, but it
> does hide the gruesomeness of an ioctl-based interface; and not really
> further removed from reality than presenting GPIO as a character
> device.
Strangle kind of reality where digital input is character...
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2015-03-28 14:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 10:37 Ada / Automation fellows slos
2015-03-26 15:11 ` Dmitry A. Kazakov
2015-03-27 21:19 ` slos
2015-03-28 9:05 ` Dmitry A. Kazakov
2015-03-28 22:36 ` slos
2015-03-29 9:30 ` Dmitry A. Kazakov
2015-03-29 2:06 ` David Botton
2015-03-29 9:44 ` Dmitry A. Kazakov
2015-03-29 14:37 ` David Botton
2015-03-26 21:05 ` Randy Brukardt
2015-03-27 21:46 ` slos
2015-03-27 15:34 ` Björn Lundin
2015-03-27 21:59 ` slos
2015-03-28 9:20 ` Dmitry A. Kazakov
2015-03-28 11:52 ` Simon Wright
2015-03-28 14:53 ` Dmitry A. Kazakov [this message]
2015-03-28 12:03 ` Björn Lundin
2015-03-28 14:55 ` Dmitry A. Kazakov
2015-03-29 8:56 ` Björn Lundin
2015-03-29 9:52 ` Dmitry A. Kazakov
2015-03-28 22:05 ` slos
2015-03-29 9:49 ` Dmitry A. Kazakov
2015-03-28 11:43 ` Björn Lundin
2015-03-28 22:47 ` slos
2015-03-29 8:57 ` Björn Lundin
2015-03-30 21:57 ` lgrphotography84
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox